From: Andy Smith <andy@strugglers.net>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] lvreduce nightmare
Date: Fri, 18 May 2012 01:16:27 +0000 [thread overview]
Message-ID: <20120518011627.GD3867@bitfolk.com> (raw)
In-Reply-To: <20120517181350.2922a70b@bettercgi.com>
[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]
Hello,
On Thu, May 17, 2012 at 06:13:50PM -0500, Ray Morris wrote:
> > resize2fs /dev/vg0/data 100G
> > lvreduce -L -100G -n /dev/vg0/data*
>
> A 100 GB filesystem needs a block device of around 110 GB. So this
> cut off the end of your filesystem. (The device needs to hold the
> journal as well as the FS, for example.)
I normally do as you suggest and resize2fs smaller, lvreduce and
then resize2fs again. This is due to paranoia though - I'm sure that
I normally see it match up with the lvreduce size exactly.
Surely OP's actual problem is that he has an FS with 2+ TB of data
on it that he resize2fs'd down *to* 100G when he actually wanted to
resize2fs it down *by* 100G? He said:
> > I tried to reduce the VG and this is what it looked like before I
> > tried to reduce it
> >
> > Filesystem Size Used Avail Use% Mounted on
> > /dev/mapper/vg0-data 2.2T 1.7T 433G 80% /data
Anyway I suspect your advice is still accurate though since you're
advising what to do when someone reduces an LV to very slightly
smaller than it needs to be to hold a ~100G FS and what he's
actually done is resize2fs and lvreduce a 2+TB FS into only 100G.
Hopefully all the data is still there and it's just the pointers
that are broken.. nasty.
> resize2fs to smaller size than you wish to end up with.
> see resize2fs -M
Ooh, I hadn't spotted that option. That certainly would reduce my
paranoia in future about making mistakes similar to this.
Cheers,
Andy
--
http://bitfolk.com/ -- No-nonsense VPS hosting
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-05-18 1:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 15:48 [linux-lvm] lvreduce nightmare tariq wali
2012-05-17 23:13 ` Ray Morris
2012-05-18 0:21 ` Stuart D Gathman
2012-05-18 1:16 ` Andy Smith [this message]
2012-05-18 10:25 ` Bryn M. Reeves
2012-05-18 14:13 ` tariq wali
2012-05-19 15:58 ` Stuart D Gathman
2012-05-19 23:14 ` Andy Smith
2012-05-20 8:59 ` tariq wali
2012-05-20 19:45 ` Andy Smith
2012-05-21 9:02 ` Bryn M. Reeves
2012-05-20 21:39 ` Raptorfan
2012-05-18 9:57 ` Bryn M. Reeves
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=20120518011627.GD3867@bitfolk.com \
--to=andy@strugglers.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.