Mailinglist Archive: opensuse (1677 mails)

< Previous Next >
Re: [opensuse] How to partitioning in unallocated disk space
LinuxIsOne said the following on 12/05/2011 06:49 AM:

On Mon, Dec 5, 2011 at 6:30 AM, Adam Tauno Williams wrote:

I'm frustrated that LVM is *not* default default. There is no reason it
shouldn't be, it would avoid a lot of monkey-labor that using crappy old
'partitioning' causes.

I would definitely try to understand this LVM, if it is really that
much good. If it is really that much good, why didn't suse people put
it in default might be because of something I don't understand at this
level.... There must be some technical reason...

Lets see: when you partitioned your disk there were four "slots". You
probably had, originally, Windows in one "Primary" partition and you
created an "extended" partition since you need more than the original
four "slots" for the various Linux partitions. That "extended"
partition takes up one of the original four "slots".

Sorry to sound so simplistic.
See
http://en.wikipedia.org/wiki/Disk_partitioning#Benefits_of_multiple_partitions
The logic holds well to support additional granularity.

In the past there have been vulnerabilities that arose because /tmp was
on the same fs as /sbin. There are good reasons to have /tmp and /var/
on separate fs since they can overflow and lock up the system. More
granular partitioning also helps, as I keep saying with managing backups[1].

Into that "extended" partition you created additional partitions.
Do not, however, that you can have one and only one "extended"
partition. *sigh*

Now suppose that instead of the extended partition you created a LVM in
that slot. What's the difference at this point? Well the only
functional difference is that you can create more than one LVM partition
but only one "extended" partition, but I don't see why that matters
since I can't see a good reason for having more than one LVM partition
on the disk[2].

If you use an "extended" partition the installation partitioner will
then guide you though adding more partitions in that "extended"
partition. If you have a very large drive and the extended partition is
huge, you may be tempted to use all that space with no particular
strategy to allocate space to one fs or another thinking it won't
matter. Maybe it won't.

If you use an LVM partition the installation partitioner will then
guide you through adding more partitions in that LVM partition[3].
If you have a very large drive and the LVM partition is huge, you may be
tempted to use all the space at this point just as you did with the
fixed allocation in the "extended" partition model thinking it won't
matter. Really it won't, but its not smart; just allocate what you
need, you can alter it later if you make the wrong decision. If you do
allocate all the space you can do what you can't do with fixed
allocation and alter that too, shrinking one fs and its partition and
giving the space to another partition and fs.

The point here is if you make a mistake with the fixed partitioner and
don't have any slack you are stuck. You have to shut-down, move stuff
off, wipe the various fs concerned, reformat, rebuild the fs, do a
restore, restart.

On an older system and a smaller drive I've done that and its, as Adam
says, 'monkey-labour'. There HAS to be an easier way and there is: use
LVM. In frustration I wiped the whole disk, installed LVM and never
looked back.

Under LVM it takes just four commands to move space from one "not full"
file system and partition to one that is full, and I don't have to
unmount the file systems and I don't have to shut down the machine.

In the long run I've learnt there is little justification for large file
systems. The time to run FSCK seems to be proportional to the square of
the size of the file system, by all accounts. As I've said many times,
4G file systems are easy to back up onto a DVD and avoids the issue of
managing many CDs/DVDs for a fs backup[4].

If you use LVM its worth having some slack.

Even so, if you do allocate all the space, LVM lets you do something
that the "extended" partition doesn't. A LVM volume group may span more
than one disk - logical[5] or spindle. Slide another drive in there,
put LVM on it, add it to the first volume group and you can extend the
fs across it. This is not mounting a new fs, this really is increasing
the size of the fs and making it span more than one drive.

With LVM its hard to make a wrong decision about how much space to
allocate to a fs because it can be corrected later on a live system.


[1] If you have time, it can make sense to NOT backup anything that can
be reinstalled, so having the firm separation of "code vs data" is a
good strategy: don't back up anything in "/" since "/home", "/tmp",
"/usr/share" etc are on separate partitions ...
[2] Actually I found one but its really rococo.
[3] It did in 11.x and it did on my Fedora system, I haven't tried 12.1
[4] If you are using tape your decision may alter, though LVM's ability
to take a snapshot may help ensure the integrity of your backups.
[5] So if you delete the Windows partition(s) you can create a LVM in
their place - this is how you get two LVM partitions on one spindle.

--
Bullet proof vest vendors do not need to demonstrate that naked people
are vulnerable to gunfire. Similarly, a security consultant does not
need to demonstrate an actual vulnerability in order to claim there is a
valid risk. The lack of a live exploit does not mean there is no risk.
- Crispin Cowan, 23 Aug 2002
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups