linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch
Date: Wed, 1 Dec 2010 11:04:53 +0100	[thread overview]
Message-ID: <20101201100453.GD29358@barkeeper1-xen.linbit> (raw)
In-Reply-To: <id4tfc$81m$1@dough.gmane.org>

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
there...

-- 
: 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.

  reply	other threads:[~2010-12-01 10:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01  7:28 [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch Johannes Graumann
2010-12-01 10:04 ` Lars Ellenberg [this message]
2010-12-01 10:10 ` [linux-lvm] [SOLVED]: " Johannes Graumann
2010-12-01 13:45   ` Johannes Graumann
2010-12-01 14:12     ` Lars Ellenberg
2010-12-01 14:23       ` Johannes Graumann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101201100453.GD29358@barkeeper1-xen.linbit \
    --to=lars.ellenberg@linbit.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).