[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch

On Wed, Dec 01, 2010 at 08:28:43AM +0100, Johannes Graumann wrote:
> Hi,
> I'm running debian testing and "/home" is an ext3 fs. I run the following 
> order of commands to shrink the fs and the corresponding partition:
> 	e2fsck -f /dev/mapper/mygroup-home
> 	resize2fs /dev/mapper/mygroup-home 55329357
> 	lvreduce -L 208.5g /dev/mapper/mygroup-home

	The  size  parameter specifies the requested new size of the filesystem.
	If no units are specified, the units of the size parameter shall be the
	filesystem blocksize of the filesystem.

 assuming 4k block size,
  55329357 * 4k Byte == 221317428 kB
221317428 / 1024 / 1024
	==> 211.some GiB

You reduced to 208.5, you truncated the file system.
Unless I did get it wrong myself ;)
> The latter was supposed to be .5g bigger than necessary (paranoia regarding 
> the data integrity kicking in).
> "e2fck /dev/mapper/mygroup-home" now stops with superblock/filesystem size 
> mismatch, but I can't grow the fs into the new partition size, as 
> "resize2fs" wants "e2fsck" (stopping with the mismatch) first.
> The fs is mountable and everything seems allright otherwise. 
> Any pointers on how to update the superblock's size statement?

Resize to >= 212g, preferably with the same logical extents mapping to
the same physical extents (look at your meta data backups).
Then fsck again. You may be lucky enough that nothing really was stored
in those truncated 3Gig, or that the PEs have not yet been recycled,
you are able to map them back, and the data that was there is still

: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]