# weird xfs behaviour

## avx

Don't know, if it fits here, move if necessary.

I just got my new hdds, Samsung Spinpoint F1 (1TB), placed it in the pc and booted Knoppix-5.3 to move and dd some files over.

fdisk and hdparm reported the correct size, so all should be good. I created one partition with fdisk over the whole disk, then used cryptsetup and finally formatted it with xfs and mounted it. Before beginning my work I did an `df -h` to see how much space is really available and it showed 699GB, which is odd, cause it should have been something around 930gb. I formatted it a few times with different options(inode-size, etc.) but the problem remained. Knowing that xfs is capable of very large filesystems I've been completly puzzled and tried it with different filesystems. With ext2/3 I got 871gb and with jfs I got the whole 932gb. So, obviously there must have been something gone wrong with xfs. I formatted the disk once again with xfs and then had a look at the disk in gparted, where the whole 932gb were shown but with 233gb declared as used. After some fiddeling, I found the "check disk" option, did that and it reported an incorrect amount of magic numbers. gparted fixed the problem and now I can use the whole disk as intended.

So, since I found nothing on Google, is this a (known) bug, cause mkfs.xfs reported no errors, or should I have used another set of parameters?

To make it clear, the problem itself is fixed, but I'd like to know, what exactly caused it.

tia,

ph

----------

## wyvern5

Did you create a partition or install XFS on the raw device? (e.g. /dev/sda vs /dev/sda1)

----------

## avx

I created a partition over the whole drive, so

/dev/sdc -> fdisk -> /dev/sdc, /dev/sdc1 -> cryptsetup -> /dev/mapper/sdc1 -> mkfs.xfs /dev/mapper/sdc1

----------

