[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [LINUX-LVM] shrinking a volume inside an LVM

Ok I understand. Is there anything I need to do to the volume to prep it first, as in defragment it or something similar? I'm unsure as to how the ext2/3 file systems work with data, so I didn't know if it needed to be moved before shrinking the file system, then shrinking the LV, then exanding the file system to fill the LV, leaving room in the LVM to create another LV with whatever file system I want correct? Doesn't sound as complicated now. Thanks.


-----Original Message-----
From: linux-lvm-bounces redhat com on behalf of Stuart D. Gathman
Sent: Fri 1/4/2008 2:59 PM
To: LVM general discussion and development
Subject: RE: [LINUX-LVM] shrinking a volume inside an LVM
On Fri, 4 Jan 2008, Kemp, Levi wrote:

> Most of this makes sense. Especially the part about using a live CD. But if
> you don't mind I'm gonna pick your brain on the other parts because I like to
> understand a command before I use it, so I can blame myself when I mess up
> ;-) Actually the only part I'm unsure about is 9-11. resize2fs will resize my
> ext2/3 file system which will clear up more room in my lvm to create another
> lv correct? Or do you have to shrink the file system then the lv to have the
> space back? I'm going to back up anything that I need to be safe, but I'd
> like to avoid a total reinstall right now(that's for May). Thanks again. I
> think you've got me on track. One more quick one, on 9 you said "amount
> occupied + some" wouldn't it be minus some?

The plan given was to shrink the fs first, then reduce the LV to something
*bigger* than the shrunk filesystem.  I would add a little to the size
on lvreduce just to be sure.  The second resize is then to grow the fs
into the exact size of the LV (which it can do automatically and safely).

Shrinking is more dangerous than growing with current tools because the
lvreduce isn't smart enough to know exactly how big the filesystem
inside is, and you had better have shrunk the fs sufficiently first.

resize2fs, on the other hand, *does* know exactly how big the underlying LV or
other device is when expanding.

	      Stuart D. Gathman <stuart bmsi com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

linux-lvm mailing list
linux-lvm redhat com
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]