I'm a bit hysterical right now because I am unable to mount my external hard drive. I formatted it to XFS about a month ago and moved some files there this morning (a virtual hard drive, among others, to save space on my filled local drive) and for some reason, the USB cable just came off. When I plugged it back, it refused to mount. I ran xfs_repair -L /dev/sdb1 and that didn't work. I ran xfs_admin -U generate /dev/sdb1 and I got a new kind of error:

xfs superblock has incompatible features (0x4)

or something along those lines. What can be done to fix the filesystem? Or at least if I can get a list of the files using xfs utilities, it would make a huge difference!


To quote Archimedes:

Eureka! I've found it!

The problem is that when you invoke the command xfs_admin -U generate /dev/sdXY the generate parameter causes xfs_admin to flip the incompatible bit to on, so that older kernels cannot use the filesystem. An explanation can be found in the following quote provided by RTFM:



-U uuid
          Set the UUID of the filesystem to uuid.  A sample UUID looks
          like this: "c1b9d5a2-f162-11cf-9ece-0020afc76f16".  The uuid
          may also be nil, which will set the filesystem UUID to the
          null UUID.  The uuid may also be generate, which will generate
          a new UUID for the filesystem.  Note that on CRC-enabled
          filesystems, this will set an incompatible flag such that
          older kernels will not be able to mount the filesystem.  To
          remove this incompatible flag, use restore, which will restore
          the original UUID and remove the incompatible feature flag as

To reverse this, simply run xfs_admin -U restore /dev/sdXY, and you should be able to mount the partition again. What's strange is that the machine that was used to generate the UUID is the machine that's running the latest kernel (4.2.5-1-ARCH, okay, maybe not the latest, but UUID should imply that this machine is not excluded from compatibility). Anyway what's important is that the problem was solved.

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.