Odd issue with mkfs.xfs under Lenny/amd64
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: