Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I decreased logical volume lv_postgres size for a 5G. then redistributed free space to other lv lv_home, but didn't do resize2fs for the decreased volume lv_postgres'. At the next boot i fall into emergence mode and resize2fs lv_postgres dont't do the task saying "Please run e2fsck -f" and the last one say "Either the superblock or pt is likely to be corrupt" if i continue then on pass 5 get "error reading block while reading inode and block bitmaps" the fs size according to superblock is 2564096 blocks the physical size of device is 1253376 blocks i want to reduce volume from 9.78G to 4.78G to match required size

Which is a right way to correct size for volume?

share|improve this question
    
An additional Q is why system start only in emergency mode? i don't have an option to start normal mode? –  Yurij73 Mar 2 '13 at 9:47
    
If the system starts only in emergency mode, it means it has detected some serious inconsistency, that requires manual repair before continuing. Most probably the truncated/mangled volume. The data there is probably lost forever. –  vonbrand Mar 4 '13 at 20:42

2 Answers 2

If you shrinked your LV without shrinking your filesystem first, it's corrupt and the data on it is lost, since files were likely stored in the now longer accessible areas. Filesystems do not like this at all and you may not be able to repair it.

If you didn't write any data yet to the other LV which now occupies the space, your best bet is to restore the original LV layout (you may be able to find suitable backups in /etc/lvm/*/), undoing the LV resizes. If nothing was written the filesystem may still be intact and you can recover from there.

If you already grew the other filesystem to the same area, you'll just repeat The same problems with the home partitions.

share|improve this answer

i am not an expert but let me see whether i can help you. you had a logical volume lg1 and reduced it to 4.7G but did not run resize2fs before creating another logical volume lg2 from the freed space.

I believe you do not have any data on lg2.

Why cannot you

  • Delete logical volume lg2
  • Run resize2fs on lg1
  • Recreate lg2
share|improve this answer
    
i added a space to lv_home which (lv1) is almost full of data, so i don't want delete it. –  Yurij73 Mar 2 '13 at 9:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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