I wanted to create a separate Logical Volume out of centos-home LV. I reduced the size of home lv using lvreduce command and created a new volume with 100%FREE space.

But when i tried to login to a user(other than root), IO error occurred. After reboot it started in maintenance mode and now i am not able to see my home volume.

mount -a

showing error

mount: /dev/mapper/centos-home : can't read superblock.

I tried doing resize2fs but i guess that works on ext file system only. xfs_repair showing same superblock error. any idea how to fix this issue?

migrated from stackoverflow.com Nov 27 '17 at 11:20

This question came from our site for professional and enthusiast programmers.

  • The comment about downvotes comes from when this was on Stack Overflow. It is now migrated and thus no longer downvoted. – tripleee Nov 27 '17 at 12:59

You shouldn't have reduced the LV before reducing the filesystem. You damaged your filesystem by truncating it. As you are using xfs, there were no way to reduce the partition easily.

Now, you may try to fsck the partition in case there is still something to save.

But I really hope for you that you have backups.

  • Yes is think that is the case. I Used an online tutorial to shrink the Home Partition where first line was to reduce the LV. Fortunately there was not much data so i can simply re-create the FileSystem (this time ext4).Can you provide exact step to reduce XFS filesystems as i tried searching for on internet by din't find any? – Krishnom Nov 27 '17 at 6:08

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.