Linked by Amjith Ramanujam on Thu 24th Jul 2008 21:12 UTC, submitted by sharkscott
Linux The GNU/Linux operating system is blessed to have sound partition management tools like GParted which are very easy to use. However, when it comes to the management of 'virtual partitions' known as volumes, things are quite different. There is Linux Volume Management, or LVM for short, however it can only really be used from the command line.
Order by: Score:

Comment by Redeeman
by Redeeman on Thu 24th Jul 2008 21:50 UTC
Redeeman
Member since:
2006-03-23

and because LVM can only be really used from commandline, its a mess...

how nice to know...

RE: Comment by Redeeman
by _txf_ on Thu 24th Jul 2008 22:03 UTC in reply to "Comment by Redeeman"
_txf_ Member since:
2008-03-17

How about you read the article and see the mess he got himself into?

In this particular case having a gui would very much help someone not make the mistakes this guy made. At this point in time I'm still too scared to use LVM...

judging by the experience the write of the article had, it turns out my cowardice is justified.

RE[2]: Comment by Redeeman
by FishB8 on Thu 24th Jul 2008 22:19 UTC in reply to "RE: Comment by Redeeman"
FishB8 Member since:
2006-01-16

No GUI would have prevented this "mess". He kept changing the layout and setup of his partitioning / volume / RAID scheme.

If you want to do something like this (which in this case was utterly pointless beyond a learning exercise) you plan it out ahead of time and start from scratch.

RE[2]: Comment by Redeeman
by mieses on Fri 25th Jul 2008 00:06 UTC in reply to "RE: Comment by Redeeman"
mieses Member since:
2006-02-07

i'd be scared to use a GUI for volume management.

RE[2]: Comment by Redeeman
by segedunum on Fri 25th Jul 2008 09:35 UTC in reply to "RE: Comment by Redeeman"
segedunum Member since:
2005-07-06

I think this guy should work out how, ummmm, LVM and software RAID actually works first, rather than moaning about the lack of a GUI.

GUI for LVM?
by finnzi on Thu 24th Jul 2008 22:07 UTC
finnzi
Member since:
2007-04-08

Last time i checked there was system-config-lvm @ Fedora/RHEL ....the author might want to check that out :O......

RE: GUI for LVM?
by ashcrow on Sun 27th Jul 2008 20:26 UTC in reply to "GUI for LVM?"
ashcrow Member since:
2008-02-02

+1

I've used system-config-lvm many times when I've felt like being lazy ... and it works just fine.

WTF
by Tom K on Thu 24th Jul 2008 22:10 UTC
Tom K
Member since:
2005-07-06

What kind of user needs that complex a disk/volume setup on a home computer? He was only asking for trouble with that setup.

Absurd
by tene on Thu 24th Jul 2008 22:41 UTC
tene
Member since:
2008-07-24

This is ridiculous.

I just walked over to one of the machines in this lab and set up his initial configuration with software raid and lvm2, resized it down, and created new partitions at the end of the disks, like he wanted.

It took me like 10 minutes, including checking the options in the man pages. I'll do it again and post a transcript if anyone wants it.

This article is not about LVM at all as the summary suggested. This article is complaining about EVMS being obsolete.

Also, system-config-lvm is open-source. It's not red hat's fault if your distro doesn't choose to provide it.

RE: Absurd
by stabbyjones on Thu 24th Jul 2008 23:29 UTC in reply to "Absurd"
stabbyjones Member since:
2008-04-15

there have been a lot of articles lately bitching about when things go wrong for one person. (Linux Live Journal Syndrome?)

i can understand that there are problems just waiting to happen. i enjoy causing myself pain playing around like this but things are hardly a mess.

will autocad install in a VM? i don't see why it wouldn't. that would have saved the effort when your partition scheme isn't what you need.

and since when does something have to be in a repo to be usable? compiling LVM from source isn't a killer and running zfs for two 80 gb drives seems like overkill.

RE[2]: Absurd
by hobgoblin on Fri 25th Jul 2008 13:06 UTC in reply to "RE: Absurd"
hobgoblin Member since:
2005-07-06

im starting to wonder if the writer was grasping for geek cred, had it blow up in his face and blames linux for it rather then consider the silliness of what he was trying to do...

RE: Absurd
by bousozoku on Fri 25th Jul 2008 05:26 UTC in reply to "Absurd"
bousozoku Member since:
2006-01-23

This is ridiculous.

I just walked over to one of the machines in this lab and set up his initial configuration with software raid and lvm2, resized it down, and created new partitions at the end of the disks, like he wanted.

It took me like 10 minutes, including checking the options in the man pages. I'll do it again and post a transcript if anyone wants it.

This article is not about LVM at all as the summary suggested. This article is complaining about EVMS being obsolete.

Also, system-config-lvm is open-source. It's not red hat's fault if your distro doesn't choose to provide it.


Was that your first time using it?

I'm not saying that it can't be done correctly first time that quickly with some research, but it seems a bit quick for someone like the author, who had Gentoo installed for him and who was generally unknowledgeable about Linux.

RE[2]: Absurd
by tene on Fri 25th Jul 2008 13:51 UTC in reply to "RE: Absurd"
tene Member since:
2008-07-24

No, it wasn't my first time using it.

I'm not saying that some man pages might be intimidating, but this article isn't about the modern tools at all. It's about EVMS, which is old and outdated and unsupported.

If it's just a blog post about some guy who was in an awkward situation, that's fine, but trying to draw conclusions about the state of modern volume management tools from it is a poor choice.

I can sympathize
by cordis on Thu 24th Jul 2008 23:10 UTC
cordis
Member since:
2008-07-24

I can see where the author was coming from, I've had some LVM problems myself. After upgrading a bunch of machines to use SATA drives, I wound up with 9 or so old PATA drives, so I figured I'd toss them into my biggest case with an old motherboard (dual pentium 3 600mhz, clunky but it works), and wait for them to all burn out. So I tossed in a couple extra ide controller cards and tried installing ubuntu, and discovered that it doesn't support lvm out of the box. Not a big problem, just install on the first disk, then install lvm and a gui for it (system-config-lvm, found some special ubuntu install instructions for it on the web) and got it all set up, so the first disk would boot and it was all just a standard partition, and then the rest were all combined into a big lvm drive. And it kind of worked, although I had some strange video problems after that, but then I tried to redo the setup as a dual boot windows xp/ubuntu machine, and it all broke down. I could never get grub installed in any way that would allow me to boot linux, and trying a windows boot manager also didn't work. I tried reinstalling with both fedora and suse, they have lvm setup guis in their installation systems, but again, couldn't get either to boot. Given that I wanted the xp setup so I could still log into work machines from home, I wound up just going with an XP only setup, combining all the PATA drives with XP dynamic drive spanning.
And sure, I probably could have figured out how to set up my dream configuration, even with weird IDE bios issues, windows issues and lvm stuff, but it just got to the point where I didn't want to screw with it anymore. That's the real problem, even if you're motivated and willing to try obscure command line stuff, at some point you get tired of it. I think linux has gotten pretty good at supporting mainstream systems, I have a couple other systems running Ubuntu, but if you try to push it a little away from a plain vanilla setup, it can get real ugly. Not much of a complaint, really, so there are still some fringe areas where linux could be easier to use, just something to think about.

RE: I can sympathize
by evert on Fri 25th Jul 2008 08:00 UTC in reply to "I can sympathize"
evert Member since:
2005-07-06

Your problem is not related to LVM. The Windows installation overwrites the MBR and places it's own IPL (initial program loader) in the master boot record.

How to dual-boot? Don't install GRUB to the MBR, and if you do than make a copy of the MBR with dd if=/dev/sda of=/date.mbr bs=512 and copy that date.mbr file to a memory stick of something like that. Have a linux live CD like Knoppix nearby. Restore the MBR by issuing dd if=date.mbr of=/dev/sda, reboot into Linux, and edit /boot/grub/menu.lst to add the Windows partition to the Grub boot-up menu.

If you have GRUB not installed to the MBR, I recommend the SBM (Smart Boot Manager) http://btmgr.sourceforge.net/

Ontopic: I have never used LVM, because I believe (without proof) that simple partitions are easier to recover / fix. Simple partition schemes are more compatible with other operating systems, too, so a multiple OS envirenmont would maybe better do without LVM.

RE[2]: I can sympathize
by TemporalBeing on Fri 25th Jul 2008 17:16 UTC in reply to "RE: I can sympathize"
TemporalBeing Member since:
2007-08-22

How to dual-boot? Don't install GRUB to the MBR, and if you do than make a copy of the MBR with dd if=/dev/sda of=/date.mbr bs=512 and copy that date.mbr file to a memory stick of something like that. Have a linux live CD like Knoppix nearby. Restore the MBR by issuing dd if=date.mbr of=/dev/sda, reboot into Linux, and edit /boot/grub/menu.lst to add the Windows partition to the Grub boot-up menu.


Or just re-run the grub install from a LiveCD that mounts your root partition for you. It'll work just as well, if not better.

...
by Ophidian on Thu 24th Jul 2008 23:13 UTC
Ophidian
Member since:
2007-01-17

His mistake was not following a simple rule of thumb related to Windows and multiboot. Install Windows first. Amazingly the rest will generally just fall into place.

RE: ...
by hobgoblin on Fri 25th Jul 2008 13:09 UTC in reply to "..."
hobgoblin Member since:
2005-07-06

that, or install it on its own drive, that you have as the only attached drive for the time being.

worked here ;)

Comment by Bending Unit
by Bending Unit on Thu 24th Jul 2008 23:40 UTC
Bending Unit
Member since:
2005-07-06

Nothing to see here. Let's just sweep it under the carpet.

The guy lost me...
by joshuah on Fri 25th Jul 2008 07:41 UTC
joshuah
Member since:
2007-06-01

...at the point where he said LVM is Linux Volume Management. LVM stands for Logical Volume Manager, and it was not invented with the birth of Linux. We use LVM all the time on various Unix boxes and god help us if we needed to use GUI. Linux LVM is a copy of the one HP-UX has, which is complete crap i have to admit that. Not to mention GRUB can't boot from LVM, which is like "WTF?!?!"

RE: The guy lost me...
by SReilly on Fri 25th Jul 2008 14:24 UTC in reply to "The guy lost me..."
SReilly Member since:
2006-12-28

Very true. I was working on a TSM backup system that ran on SLES10SP1 PPC64 that used disk storage pool for catch (faster than tape). The backup disk catch pool was configured on 10 LUNs on a SAN which was mirrored to another SAN at a remote site for DRM purposes. All 10 LUNs where concatenated using LVM.

Problem was, the LUNs where mapped from 1 to 10 on the primary site, but from 7 to 17 on the secondary, DRM site so when you defined those LUNs as primary on the secondary site, then mounted them (again on exactly the same configuration, SLES10PPC), LVM would mix up the LUNs that where already mounted, i.e 1 to 6, with the newly mounted LUNs causing total data lose.

I understand that, in essence, the LUNs should have had the same mapped number on both system and that in retrospect, I should have known this, but had I done this with an AIX system, it would not have blinked an eye.

The only other time I have ever seen that sort of behaviour is with a HP-UX box. No wonder they call it HP-SUX! ;-)

Idiotic article
by KugelKurt on Fri 25th Jul 2008 07:47 UTC
KugelKurt
Member since:
2005-07-06

Read the conclusion of his article. In essence he doesn't really complain about LVM itself, but that Gentoo doesn't have a nice GUI tool in its repositories. (Quote: "Then there is system-config-lvm, but it's something from RedHat which is not in the repository of Gentoo, meaning Gentoo doesn't support it.")

Even that is wrong. See http://lxer.com/module/forums/t/27569/ -- system-config-lvm is in the Gentoo repos, it's just masked.

LVM can be a mess
by WereCatf on Fri 25th Jul 2008 10:49 UTC
WereCatf
Member since:
2006-02-15

I have this old Athlon I use as a file-server every now and then, and I had 4 HDDs attached to it. I thought that having them all accessible as one large volume would be a nice feature so I set out to try LVM. I reserved disk1 for Gentoo, cleaned the 3 others, read some man pages and googled a bit and got it all working just fine. Then a few months later disk3 started failing :O I couldn't afford buying a new disk so I had to move all the stuff on disk3 somewhere else...but how? I could have reduced the whole volume by an amount equal to the size of disk3 but that would have required me to manually resize the reiserfs filesystem, then the partition, then the logical volume.. and there was no way of doing that without anything getting written to disk3. In the end I just had to copy all the stuff to other machines and DVDs and wipe the server :/

RE: LVM can be a mess
by MattPie on Fri 25th Jul 2008 14:05 UTC in reply to "LVM can be a mess"
MattPie Member since:
2006-04-18

I couldn't afford buying a new disk so I had to move all the stuff on disk3 somewhere else...but how?

Assuming you had enough other space in the volume group:
- pvmove /dev/hdd1
- vgreduce Volumegroupname /dev/hdd1

The first command moves all the data off the given PV. The second removes the PV from the VG. It's all transparent so the system will continue on unfazed while the move is happening. It works well for moving data from physcial disks and a SAN. ;)

To Someone else:
Also, you can install Ubuntu on LVM, but you have to use the Alternate install disk.

RE[2]: LVM can be a mess
by WereCatf on Fri 25th Jul 2008 17:59 UTC in reply to "RE: LVM can be a mess"
WereCatf Member since:
2006-02-15

Assuming you had enough other space in the volume group:

What would be the point in making 3 disks a volume group in a home file server and not use all the available space for it? Of course I used it all so it was not possible to use pgmove and vgreduce.

This is not the problem
by unoengborg on Fri 25th Jul 2008 11:00 UTC
unoengborg
Member since:
2005-07-06

The problem isn't that the volume management in linux is a mess, on the contrary LVM2 is a quite good volume manager. The problem is that we have volume management in the first place.

To avoid the mess we need is something like ZFS where disk storage is handled much like ECC RAM, is handled by the OS. In other words we add it and use it. Adding a new disk is as simple as:

zpool add mypool /dev/newdisk

Using it is as simple as
zfs create mypool/home
zfs set mountpoint=/home mypool/home


You can have this in Linux if you are brave enough there is a fuse implementation available see:
http://zfs-on-fuse.blogspot.com/

RE: This is not the problem
by hobgoblin on Fri 25th Jul 2008 13:12 UTC in reply to "This is not the problem"
hobgoblin Member since:
2005-07-06

looks like volume management to me...

RE[2]: This is not the problem
by phoenix on Fri 25th Jul 2008 16:28 UTC in reply to "RE: This is not the problem"
phoenix Member since:
2005-07-11

Storage management, not volume management.

With LVM, you have to do a lot of up-front planning and organisation:
- how many disks will be used
- how many volume groups
- how many logical volumes
- what size will each LV start at
- how much space needs to be reserved (and unusable) for future snapshots
- will software raid be used
- which filesystems will be used on the LVs and do they support online resizing
- etc

You have to know and specify the size of your LVs at creation time, and you have to leave unused space in the volume group for snapshots.

With ZFS, you have a lot less to worry about:
- how many drives will be added to the pool
- which redundancy method will be used (mirror, raidz1, raidz2)

You don't need to reserve space for snapshots, you don't have to specify initial sizes for filesystems using ZFS (you do for volumes that will have other FSs on top), you don't have to worry about saving space in pool.

You can't add drives to a raidz configuration, currently, but you can swap drives for larger ones and have the extra space available to the pool.

Once you start to use a pooled storage system (regardless of which it is), you really start to notice the shortcoming of standard volume management systems.

RE[3]: This is not the problem
by hobgoblin on Fri 25th Jul 2008 16:46 UTC in reply to "RE[2]: This is not the problem"
hobgoblin Member since:
2005-07-06

so basically its volume management with more automation?

but in any case, all this seems very much like overkill for a home setup...

Edited 2008-07-25 16:47 UTC

RE[4]: This is not the problem
by phoenix on Fri 25th Jul 2008 17:12 UTC in reply to "RE[3]: This is not the problem"
phoenix Member since:
2005-07-11

Except that (at least in ZFS) there are no volumes to manage, just filesystems.

RE[5]: This is not the problem
by TemporalBeing on Fri 25th Jul 2008 17:21 UTC in reply to "RE[4]: This is not the problem"
TemporalBeing Member since:
2007-08-22

Except that (at least in ZFS) there are no volumes to manage, just filesystems.


Aka Volumes.

RE[5]: This is not the problem
by iserlohn on Sun 27th Jul 2008 10:43 UTC in reply to "RE[4]: This is not the problem"
iserlohn Member since:
2006-02-24

So what's this thing called a pool?

RE[6]: This is not the problem
by phoenix on Tue 29th Jul 2008 04:08 UTC in reply to "RE[5]: This is not the problem"
phoenix Member since:
2005-07-11

So what's this thing called a pool?


The closest thing in LVM would be the volume group, but it also incorporates data integrity and redundancy (cloning, multi-disk mirroring, software raid5 and software raid6 but without the "raid write-hole" issue). It allows you to make all you drive space available to all your filesystems, without having to guess how much each one will need when you create them (they all have access to all the space in the pool, unless you put quotas on the FS). The FS all inherit a bunch of properties (record size, compression, mount options, NFS share options, etc) from their parents as well, something that LVM can't do.

complaint ? crap
by l3v1 on Fri 25th Jul 2008 11:58 UTC
l3v1
Member since:
2005-07-06

however it can only really be used from the command line

First, I started to laugh. Then, I cursed a bit. Then, I stood silent. Really, from the command line ? This surely must be the end of this world and we're all doomed. Typing must certainly be really tiresome when someone needs to setup and configure volumes with LVM every freaking day (!).

This reminds me of when people complained long hours about text installers. When I asked some why does it hurt so much, how often do they actually use and see the installer, or do they install Linuxes every day ? For what ?

This is all so fracked up.

RE: complaint ? crap
by unoengborg on Mon 28th Jul 2008 09:21 UTC in reply to "complaint ? crap"
unoengborg Member since:
2005-07-06


This reminds me of when people complained long hours about text installers. When I asked some why does it hurt so much, how often do they actually use and see the installer, or do they install Linuxes every day ? For what ?


Actually, if they actually used LVM or text based intallers every day they would probably not complain, as they would have been able to type those commands in their sleep, or create a script. However, as they ony use them once a year or so, they forget what to type and they have to consult the manual. In a GUI you have less freedom on what to do but that also means thay it can guide the user enough to make it possible for him to perform the task without consulting the documentation.

On the other hand, if you do something that seldom, perhaps you have time to read the manual, to get all the commands and flags right.

The oh so not fun mix...
by dgnome on Fri 25th Jul 2008 14:53 UTC
dgnome
Member since:
2008-07-25

I work at a company that uses Debian for everything. Most not so mission critical systems are installed with software raid and LVM on top. LVM has proven really good for it's purpose and we have no bigger problems with it.

The author of the article then again did it the really hard way. Having a system that is planned for linux use only with software raid and all the acronyms that exist will not easily bend to adding multiple operating systems. Starting out with gentoo might also not be the best of ideas. Anyway, resizing and shuffling LVM volumes around is really easy once you have your own private howto notes and such, if you need them. Downsizing software raid volumes is just not worth the pain and it is where the author hit a wall.

So, my point here is that once you install a system, don't mess around with it. More than one operating system per box will give you headaches at one time or another. It's also much more fault tolerant to have storage and workstation separated. The disaster here could have been avoided if there had been separate storage of important stuff.

Those of you who are looking to dualbooting linux and windows, try running windows in virtualbox... Might save you lots of time.

Goes to show you...
by Daishiman on Fri 25th Jul 2008 18:43 UTC
Daishiman
Member since:
2006-05-06

Just goes to show you that volume management is not a simple thing and is probably beyond the reach of most users anyway. I'm not trying to deride anyone, but the truth is that most courses on enterprise volume management systems take a whole week or two, and that's just barely scratching the surface.

I have yet to see any GUI for an LVM system that is adequately informative and has sufficient options to be considered powerful. And even if it exists, it still requires a substantial amount of knowledge from the user, so the kind of person that would feel demotivated by a lack of GUI should probably not tweak LVMs either.

Jefferssonian
Member since:
2005-11-30

Hello:
LVM a mess: well I would not go there!
I have used LVM for almost two years, and found it rock stable!

LVM setup is mostly (but not only!) command line,because the GUI when I tried to use it (4 years ago) was not functional.

But I admit that when I eventually got a partition problem, recovering from it was very difficult.

LVM is good, but the documentation (not bad!) could be enhanced!

And I do admit that either a CURSE or GUI based LVM utility is nice to have, and what exist may not be up to the user wish: ease of use with little system knowledge.

On the other end, Windows does not have that I know any tool like LVM ! And when you need it LVM is indeed very nice to have!

It seems that the quest for better file system, for better partition management is never finished!
For me, I would love to have partitions, and file system management tools all in one place: this is very doable, but users pressure there is low!

I certainly would love a new partioning system removing the annoying limits on such a low number of partition within an extended partition: this stuff is very old, and starting there could be very nice indeed!
This is work, but very doable too.

But at the end, living with what we have is O.K !!!

jf,

utopia Member since:
2005-07-14

Windows does have LVM, just use the Disk Management MMC snap-in (diskmgmt.msc) to convert your HDD from Basic disc to Dynamic disc and you will be able to manage it with LVM. (Warning! converting Basic disc to Dynamic disc is a irreversible process, do at your own risk.)

However, software RAID (0 & 5) functionality had been purposely disabled for desktop OS (XP); only server OSes (2000/2003/2008) can do RAID.

LVM is the way to go
by RHCE07 on Sat 26th Jul 2008 15:13 UTC
RHCE07
Member since:
2007-12-08

I finally understand the full functionality of what LVM can do in a Linux distro such as RHEL or Fedora.

It is one word amazing of the functionality it provides and the fact you can extend, resize and shrink a volume.

For servers and desktop workstations it is one word amazing!

What a bunch of crap:
by deb2006 on Mon 28th Jul 2008 08:13 UTC
deb2006
Member since:
2006-06-26

So LVM is "a mess" because it can be used from the command line? Thank you very much for this informative article. I've not heard crap like this for a long time. On the contrary: applications that can be used from the command line are often - if not always - more reliable than GUI applications. Simply because they've not have to fight with fatty and rash-prone GUIs.

LVM is probably one of the most rock solid applications of Linux. Nuff said.