On Thursday 07 April 2011 08:57:40 Dale wrote:
> Neil Bothwick wrote:
> > On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote:
> >> I think Dale will probably succeed in breaking it :)
> >> 
> >> Dale, this comment isn't meant as an insult. I honestly think you
> >> would
> >> be perfect for some QA or Testing job :)
> > 
> > But not on any project you wanted to finish on time ;-)
> 
> Joost, I see your point.  This is my life saying.  If it wasn't for bad
> luck, I wouldn't have any luck at all.  I hope for the best but expect
> the worst.  You should see my dining room.  Full of food stuff just in
> case.  After my last visit to the grocery store, I'm thinking I may not
> have enough yet.  o_O  I also have a generator and some gas stored too.
> I also have a big garden to grow food as well.  I may be disabled but I
> ain't stupid.  I just try to keep the bad things that can happen in the
> back of my mind and keep a plan going, just in case it does hit the fan.

The Internet is a mixed blessing. We only see what people type. But have 
difficulty understanding their personal situation because we don't see it.
Up untill the point you mentioned you're disabled, I was like "Hmm... I know a 
few people like that :) "
I would call that self-sufficient and quite clever. I would like to be able to 
move somewhere where I could just enjoy life and life of some piece of land.

I would not consider you stupid, you've shown, at least in my opinion, that 
you're not :)

> I'm sort of wanting to use this as a learning experience.  If I can get
> things set up, working and understand what the heck things do, then I
> may try some more stuff.  Right now, my light bulb is pretty dim on
> LVM.  I don't understand how it works and what the heck those commands
> do.  I'll have my light bulb moment eventually.  Since I don't have the
> new drive ordered yet, I got time to read, listen and try to grasp it all.

The beginning of wisdom is admitting you don't have it ;)

> Just a old dog trying to learn new tricks.  lol

I'm lousy at training dogs (or other animals), but lets see if I can make LVM, 
or at least the way I use it, a bit clearer.
If anything isn't clear, please ask.

We've already discussed the benefits of using it in a previous thread. So I'll 
just skip those for now.

With LVM, you end up with 1 or more VGs (Volume Group)
Each VG consists of 1 or more PV (Physical Volume)
Each VG can contain 1 or more LV (Logical Volume)

In simple graphic:
PV <-> VG <-> LV

A PV is either an entire physical disk or a partition on a physical disk. This 
is why they're called "Physical Volume"

A VG is a collection of Physical Volumes. The size of this depends equals the 
total size of all the PVs in this group.

An LV is a partition on this Volume Group.

Now, here comes the nice part. It is possible to extend a VG and LV.
A VG is extended by adding a PV. It can also be reduced in size by removing a 
PV.
NOTE: when removing a PV, ensure it is not used. (Tools exist for this)

An LV can be extended as long as the VG has room for this. No movement of LVs 
is necessary, just like files on a filesystem, they get spread over available 
space.
NOTE: Yes, this does lead to fragmentation (Tools exist to assist in 
defragmenting LVM)
You can also reduce the size of an LV. (Again, make sure reducing the LV in 
size does not lead to loss of data)

On top of an LV, any filesystem (Ext2/3/4, Reiserfs, XFS, JFS,....) can be 
placed. Once an LV is created, the filesystem tools can simply access it just 
like any other block device (eg. physical disk)

When selecting a filesystem to put on top of an LV, do check wether or not it 
at least supports increasing the size after creation. Most filesystems in use 
do support this even while the filesystem is mounted.
Reducing the size of the filesystem is, in my use, less common. And I tend to 
simply copy data to a temporary location when I do need to reduce the size.

I hope the above makes it a bit clearer on how it "works".

The actual commands for creating and managing an LVM-system, I'll leave for 
another time if and when they are needed.

--
Joost

Reply via email to