1

I have a centos 7 machine and am trying to mount an xfs parition with a 4096 kb block size. when the xfs patition is unmounted:

 blockdev --getbsz  /dev/xvdc
4096

when mounting using

 mount -t xfs    -o   noatime /dev/xvdc /iops2

the mount operation works but I get this output afterwards:

 blockdev --getbsz  /dev/xvdc
512

I tried mounting using the following options which as I understand are supposed to explicitly state the desired blocksize (12 representing 2^12 bytes as specified in this doc http://linuxcommand.org/man_pages/mount8.html under xfs options):

mount -t xfs -o biosize=12 /dev/xvdc /iops2

and got this error:

mount: wrong fs type, bad option, bad superblock on /dev/xvdc,
       missing codepage or helper program, or other error

I went ahead and tried

mount -t xfs    -o   biosize=13 /dev/xvdc /iops2

which resulted in a succesful mounting, but still checking the blocksize resulted with wrong blocksize

 blockdev --getbsz  /dev/xvdc
512

If anyoine knows what causes this or at least how to fix it I'll be happy to see the solution.

-2

this is due to a small sector size. try this mkfs.xfs -s size=4096 -b size=4096 -f /dev/xvdc

  • 1
    OP is trying to mount an existing file system. You usually don't want to run mkfs on those ... – Sven Mar 21 '17 at 7:52
  • there is no way to change the sector size of an existing file system without harming data. in order to manage to mount the fs with the exisiing data he should either copy the data to a new file system with the proper sector size or make a backup of these files. – user3371266 Mar 21 '17 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.