[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Odd issue with mkfs.xfs under Lenny/amd64



I am replying to this because I found the answer. I hope this little bit of information helps others confused by the xfs documentation. while sunit and swidth have to be set with the block size value in 512 bytes (sunit) and as a multiple of that 512 bytes (swidth), The values returned by mkfs.xfs and xfs_info are listed as multiples of the block size. In most cases I believe this will be 4096 but is subject to change based on options. So the values I set were indeed being used but just displayed poorly. For my sunit value of 512 the (64*4096) is correct and my swidth value of 2560 (320*4096) is correct also. Hope this helps someone else....

Robert

Robert Goley wrote:
I have not used xfs in a couple years but want to for a new server. I have followed all the xfs documentation I could find. I believe my commands are correct but am not seeing the results I expected from the documentation. The issues occur with the sunit and swidth values. I have a hardware raid5 array with 6 disks and a 256k strip size. I have created a LVM volume using the -I option with 256k for the value. I am creating the xfs filesystem with the following command:

"mkfs.xfs -f -b size=4096 -l size=128m -d sunit=512,swidth=2560,agsize=3g -L test /dev/raidvg/test"

It displays this info...
meta-data=/dev/raidvg/test isize=256 agcount=34, agsize=786432 blks
        =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=26214400, imaxpct=25
        =                       sunit=64     swidth=320 blks
naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=32768, version=2
        =                       sectsz=512   sunit=64 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

I tried mounting with with the command recommended below as well as without options. mount -o sunit=512,swidth=2560,noatime,nodiratime,logbufs=8 /dev/raidvg/test /test

Here are the results from xfs_info:
meta-data=/dev/mapper/raidvg-test isize=256 agcount=34, agsize=786432 blks
        =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=26214400, imaxpct=25
        =                       sunit=64     swidth=320 blks
naming =version 2 bsize=4096 log =internal bsize=4096 blocks=32768, version=2
        =                       sectsz=512   sunit=64 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0



As you can see, these values do not match the settings I told it to use. If I use sunit=4096 and swidth=20480 values instead, It correctly shows the values I wanted in mkfs.xfs and xfs_info as long as I do not specify different values in the mount options. Using "mount /dev/raidvg/test /test" or "mount -o sunit=4096,swidth=20480,noatime,nodiratime,logbufs=8 /dev/raidvg/test /test" it will show the values I expected to see for my setup. Here is an xfs_info of those mounts.

meta-data=/dev/mapper/raidvg-test isize=256 agcount=34, agsize=786432 blks
        =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=26214400, imaxpct=25
        =                       sunit=512    swidth=2560 blks
naming =version 2 bsize=4096 log =internal bsize=4096 blocks=32768, version=2
        =                       sectsz=512   sunit=64 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0



Can anyone explain these results? It does not match up with anything I have found on the web. Is this a bug?

Robert


Reply to: