linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] LVM resize broken file system....
@ 2013-01-27  6:51 Another Sillyname
  2013-01-28 10:03 ` Gabriel
  2013-01-28 10:55 ` Zdenek Kabelac
  0 siblings, 2 replies; 3+ messages in thread
From: Another Sillyname @ 2013-01-27  6:51 UTC (permalink / raw)
  To: linux-lvm@redhat.com

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

I had a 487G LVM that contained a single partition and a swap partition.

On the data partition I had 86G free that I needed to use elsewhere.

All the following have been done from a recovery disk so the data is all
still intact.

When I tried to resize to 400G it wouldn't  let me stating below mjnimum
size...

sudo resize2fs -p /dev/pathto/lvmdevice 400G

However mounting it df -h reports

                                                 Size      Used     Free
/dev/pathto/lvmdevice        487G   377G     86G

or in 4k blocks

/dev/pathto/lvmdevice         127571672     98643758    22449438

So I was forced to run the resize2fs in tye default 4k mode

sudo resize2fs -p /dev/pathto/lvmdevice 105000000

This should give me a sufficient overhead and finished correctly

I then did

sudo lvresize -L /dev/pathto/lvmdevice

This also appeared to be successful.

However I can't mount it as it's reporting wrong fs type, bad option etc
error.

I think I've identified the problem as a mismatch on ghe block count.

Even though I resized to 105000000 blocks I now see that df -h reported the
size as 103352144 before I did the  lvresize (I didn't notice at the time)

So I think the discrepancy between the  block count size reported by df at
103352144 and tune2fs at 105000000 is the error.

How can I change the block count number reported by tune2fs from 105000000
to 103352144 that will then allow me to run e2fsck again?

Thanks





-- 
Sent from Tablet

[-- Attachment #2: Type: text/html, Size: 1648 bytes --]

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

end of thread, other threads:[~2013-01-28 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-27  6:51 [linux-lvm] LVM resize broken file system Another Sillyname
2013-01-28 10:03 ` Gabriel
2013-01-28 10:55 ` Zdenek Kabelac

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