xfs
[Top] [All Lists]

Re: Disk placement

To: Ash <ashrat@xxxxxxxxx>
Subject: Re: Disk placement
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 07 Oct 2004 09:36:26 -0500
Cc: XFS Linux <linux-xfs@xxxxxxxxxxx>
In-reply-to: <e96ff120041007071013f5e67e@mail.gmail.com>
References: <e96ff120041007071013f5e67e@mail.gmail.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040626)
Ash wrote:
Hi

Does XFS provide any control for the placement of files on disk ?
Something like policy modules for disk placement ?  clustering
of files for example ?

Thanks


Not explicitly, there are some useful facts about how xfs lays things out which you can use to get limited placement control.

XFS divides a filesystem into allocation groups, read the mkfs_xfs
man page. You can specify the size of allocation groups, and you can
get allocation groups to start on stripe boundaries in a raid setup.

The simple rules of placement are:

        XFS will attempt to place a new directory in a different allocation
        group than its parent inode.

        XFS will attempt to place a new file inode in the same allocation
        group as its parent inode.

        Blocks in a file (directory blocks in a directory) will prefer the same
        allocation group as the inode - in fact the same allocation group as the
        previous chunk in the file. It will also first look for a chunk of free
        space close to the previous one.

        If an allocation group is too full, or another cpu is currently
        allocating space from it, then the allocator will move on to another
        allocation group.

xfs_bmap can tell you all sorts of things about where the blocks of a file
are on the disk.

There has been talk in the past about allowing more explicit placement and
being able to map more directly onto the actual LUNs. I do not know if there
is work in progress to do this.

Steve




<Prev in Thread] Current Thread [Next in Thread>