John Jason Jordan <joh...@comcast.net> writes:
> On Sun, 7 Nov 2010 08:17:56 -0800
> Denis Heidtmann <denis.heidtm...@gmail.com> dijo:
>>On Sat, Nov 6, 2010 at 11:02 PM, John Jason Jordan
>><joh...@comcast.net>wrote:
>
>>> I just looked at the GUI again. It has a button for Expand Volume Group,
>>> and a button for Remove Selected Physical Volume(s), but there appears to
>>> be no way to shrink a volume with the GUI.
>
>>Is there any chance that under "Expand Volume Group" you can "expand" by X
>>>0.5, or minus 100 G, or some such?  It would not be the first time a title
>>was less than accurate, e.g., the "Start" button.
>
> It's considerably more complicated than that.

[...]

> In addition to the Logical Volume Manager GUI that I found earlier, I have
> discovered Palimpsest, which also comes with Fedora (in Applications >
> System Tools > Disk Utility). It has more buttons, but still no button for
> "shrink."

Uh-huh.  There is a sound reason for that, too: it is reasonably easy to
implement growing a file system, but it is technically very, very difficult to
shrink one.  (Not impossible, just hard, *especially* if it is active at the
time.)

So, even if you could easily change the size of the LV or VG, the size of the
content still needs to be dealt with.


> The process is not trivial. Apparently first you have to boot to Rescue mode
> and make sure your root filesystem is not mounted. Right there I am
> confused, because how can you boot without mounting and reading the root
> filesystem?

I would guess that they are using the "rescue mode" on the install CD, which
means that you are using the software installed and available on it, not the
stuff on your hard disk.

(This solves the "especially" part of my comment above. :)

> Then you use commands like lvm --pvresize and lvm --lvresize, neither of
> which I understand.

A "PV" is a "Physical Volume", or an actual "low level" storage device used as
part of a volume group.  (A VG is a collection of physical volumes. :)

An "LV" is a "Logical Volume", which is where you throw things like
filesystems and the like.

> Another part of the problem is that a default installation of Fedora does
> not create a separate swap partition; instead swap is allocated somehow at
> the end of the root partition.

.....you are better off thinking of LVs as "partitions", and the VG as "the
disk", rather than thinking of the VG as somehow being the "root partition".

> And the pvresize and lvresize cannot yet resize the root partition when the
> swap is there, so the swap has to be moved out of the way and then put back
> afterward. Or something like that. It's still all very fuzzy to me.

Uh-huh.  LVM is basically an abstraction that behaves more or less like
traditional partitions on a traditional fixed disk, but with more
flexibility.  (Not in what we have talked about so for, but in things like
snapshots and the like...)

> I do suggest for anyone considering installing Fedora that you not
> let Fedora use its default partition scheme:

Actually, I would *strongly* encourage y'all to move to using LVM, which has a
whole lot of technical advantages.  Just think of the single partition on
disk, and the VG, as "the disk", and you will be in about the right mindset.

> 1) Make the boot partition at least 1 GB for future needs. Current
>     versions of Fedora set it to 500 MB, but I think that is still
>     shortsighted.

I concur.

> 2) Make your root filesystem (and /home if you want it on a separate
>     partition) less than the remaining space on the disk so you won't
>     have to shrink it later.

With LVM it is usually a good idea to create small LVs, then grow them later,
because that is easy.  Then when you find that you should have made /home or /
bigger you can easily fix that without even needing a reboot.

The reverse, shrinking them, is hugely difficult and a PITA.  Just avoid it by
going the other way around.  (I use ~ 10GB each, unless I know ahead of time
that I need more storage capacity *right now*.)

> 3) Volume groups can include multiple partitions which the OS sees as
>     one disk. So split your disk into multiple smaller partitions and
>     let Fedora stripe them into one volume group. Removing a
>     partition from a volume group is trivial compared to having to
>     shrink a partition.

Not really, it isn't: the process is literally identically complicated.  There
isn't any particular benefit to the approach you are suggesting.  Moving
allocated parts of a single PV is just as easy as moving stuff off a separate
PV would be.

> I'll keep reading and perhaps eventually I'll get it all figured out.
> Unfortunately, I'm starting from zero, because I don't understand what terms
> mean like "extent" and "sector," among many others.
>
> Even though I don't understand it all yet, the best Fedora post I have
> found so far is:
>
> http://fedorasolved.org/Members/zcat/shrink-lvm-for-new-partition

FWIW, if you don't know the technical reasons for these decisions it is
probably better to trust that the distribution folks have good reasons for
their choices, in my experience.  They *have* done the research and understood
the most common technical reasons to do things these ways...

Regards,
        Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons
_______________________________________________
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to