Bug#669682: Bastian Blank <waldi at debian.org>

bwlee bwlee.sky at gmail.com
Tue May 1 05:32:43 UTC 2012


Thanks Bastian!

I finally found why this happened, it is really my fault plus some bad
blocks in disk.

The steps I have did in order:
1.  resize logical volume first,  this is the stupid step.
2.  resize2fs to shrink the file system size,  then found something wrong.
3.  so I tried to resize the logical volume back to the original size, it
seemed succeed.
4.  then I tried to use resize2fs, and want to change the size back too,
but failed even after I force check the file system by using "e2fsck -f".
  Here I noticed the number of blocks (4K) is 36637696,  but number of
blocks in logical volume is only 36635648.  there are 2048 blocks missed.

Fortunately,  the file system can be mounted with warning, and it seemed
most files are not destroyed.

So I think there must be a lot of bad blocks,  so I tried fsck with bad
blocks checking,  command is e2fsck -ck /dev/mapper/imrunning-home.
I am lucky,  this command finally fixed the file system.

then,  I did below to shrink the /home file system and logical volume
first,  then enlarge the /root file system as I expected.
correct steps :
1.  resize2fs  /dev/mapper/imrunning-home  [a smaller size]
2.  lvresize --size -delta  /dev/mapper/imrunning-home
3.  lvresize -r --size +delta /dev/mapper/imrunning-root     ( resize the
fs by -r)

So I think this is not a bug,  but there  are some space can be optimized
in resize2fs, it should do more checking before resizing.

Thanks for help!

-- 
Bwlee
~ I'm running!~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20120501/19544c74/attachment.html>


More information about the pkg-lvm-maintainers mailing list