linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Another Sillyname <anothersname@googlemail.com>
Subject: Re: [linux-lvm] LVM resize broken file system....
Date: Mon, 28 Jan 2013 11:55:05 +0100	[thread overview]
Message-ID: <51065909.3030704@gmail.com> (raw)
In-Reply-To: <CAOS+5GGR1yPe5_dWJ8H8fjXXvVMKVX=xfWg4LhxYHv_ECMLaJg@mail.gmail.com>

Dne 27.1.2013 07:51, Another Sillyname napsal(a):
> 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
>

Unsure from where did you get  that  'df -h' reports something sensible about 
total number of blocks in the filesystem ?

IMHO there is nothing in common - it reports just 'usable' space - but
there is no info about filesystem metadata space being used.
(And in fact it's somewhat 'made-up' number)

So using  'df' for anything related to filesystem resize is not going to work.



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

I'd strongly advice to use: 'lvresize -r' which should try to do its best to 
fit the filesystem properly in the give size.


Zdenek

      parent reply	other threads:[~2013-01-28 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=51065909.3030704@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=anothersname@googlemail.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).