linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch
@ 2010-12-01  7:28 Johannes Graumann
  2010-12-01 10:04 ` Lars Ellenberg
  2010-12-01 10:10 ` [linux-lvm] [SOLVED]: " Johannes Graumann
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Graumann @ 2010-12-01  7:28 UTC (permalink / raw)
  To: linux-lvm

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 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?

Thanks, Joh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch
  2010-12-01  7:28 [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch Johannes Graumann
@ 2010-12-01 10:04 ` Lars Ellenberg
  2010-12-01 10:10 ` [linux-lvm] [SOLVED]: " Johannes Graumann
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Ellenberg @ 2010-12-01 10:04 UTC (permalink / raw)
  To: linux-lvm

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [linux-lvm] [SOLVED]: lvm2 and partition shringkin: superblock/filesystem size mismatch
  2010-12-01  7:28 [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch Johannes Graumann
  2010-12-01 10:04 ` Lars Ellenberg
@ 2010-12-01 10:10 ` Johannes Graumann
  2010-12-01 13:45   ` Johannes Graumann
  1 sibling, 1 reply; 6+ messages in thread
From: Johannes Graumann @ 2010-12-01 10:10 UTC (permalink / raw)
  To: linux-lvm

mke2fs -b 4096 -t ext3 -S /dev/mapper/mygroup-home

on the unmounted file system solved my issue.

Joh

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 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?
> 
> Thanks, Joh
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] [SOLVED]: lvm2 and partition shringkin: superblock/filesystem size mismatch
  2010-12-01 10:10 ` [linux-lvm] [SOLVED]: " Johannes Graumann
@ 2010-12-01 13:45   ` Johannes Graumann
  2010-12-01 14:12     ` Lars Ellenberg
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Graumann @ 2010-12-01 13:45 UTC (permalink / raw)
  To: linux-lvm

And yes, by that I set the truncation of the FS (thanks, Lars for pointing 
that out) in stone ...

Joh

Johannes Graumann wrote:

> mke2fs -b 4096 -t ext3 -S /dev/mapper/mygroup-home
> 
> on the unmounted file system solved my issue.
> 
> Joh
> 
> 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 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?
>> 
>> Thanks, Joh
>> 
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] [SOLVED]: lvm2 and partition shringkin: superblock/filesystem size mismatch
  2010-12-01 13:45   ` Johannes Graumann
@ 2010-12-01 14:12     ` Lars Ellenberg
  2010-12-01 14:23       ` Johannes Graumann
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ellenberg @ 2010-12-01 14:12 UTC (permalink / raw)
  To: linux-lvm

On Wed, Dec 01, 2010 at 02:45:42PM +0100, Johannes Graumann wrote:
> And yes, by that I set the truncation of the FS (thanks, Lars for pointing 
> that out) in stone ...

Soo... did the fsck you ran immediately after the mke2fs -S complain,
or did you get away with no more than a fright?

	Lars

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] [SOLVED]: lvm2 and partition shringkin: superblock/filesystem size mismatch
  2010-12-01 14:12     ` Lars Ellenberg
@ 2010-12-01 14:23       ` Johannes Graumann
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Graumann @ 2010-12-01 14:23 UTC (permalink / raw)
  To: linux-lvm

There ware complaints about unmatching group sizes, so I guess I lost data.

Joh

Lars Ellenberg wrote:

> On Wed, Dec 01, 2010 at 02:45:42PM +0100, Johannes Graumann wrote:
>> And yes, by that I set the truncation of the FS (thanks, Lars for
>> pointing that out) in stone ...
> 
> Soo... did the fsck you ran immediately after the mke2fs -S complain,
> or did you get away with no more than a fright?
> 
> Lars
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-12-01 14:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01  7:28 [linux-lvm] lvm2 and partition shringkin: superblock/filesystem size mismatch Johannes Graumann
2010-12-01 10:04 ` Lars Ellenberg
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

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