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

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.


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