[gentoo-user] Re: extending /usr partition...
On Sunday 22 March 2009, Albert Hopkins wrote: On Sat, 2009-03-21 at 14:13 -0700, BRM wrote: With all the words of LVM2 going on, I feel it is only appropriate to also mention the risk. On a desktop I had installed LVM2 considering that I did need to upgrade partitions every now and then and my previous solution was add another drive/partition and cross mount - e.g. like done with /usr/local under /usr, which worked fairly well. LVM2 worked great - until one of the drives crashed and I was trying to figure out what was on it. From that pov, volume management is a pain. I did figure out what I had mounted to it - but only after deconstructing the LVM configuration file to match it up with what I had put there. (And no, I had not yet gotten to doing an LVM soft-RAID solution to map a single LVM partition to two drives, which would certainly have helped.) I got my system working by adding a new drive that was not part of the volume group, and removing the old drives from the volume group. Fortunately, I had my volume setup so that they one partition was not made up of non-overlaping partitions on different drives. (e.g. partition A = sda1 + sda2 instead of sda1 + sdb1.) So, unless you are looking to use LVM in a soft-RAID solution between multiple physical drives, not multiple partitions on the same drive, (e.g. partition A = sda1 + sda2, with mirror on sdb1+sdb2), then I would not suggest it as should anything happen, it'll make data recovery that much harder. Just 2 cents for the pot. With or without LVM if you lose a drive then you've lost the data on it. LVM does have the capability of assembling a partially damaged volume group just not a partially damaged logical volume which, when you think about it, makes sense. And you can also throw in the standard warning about backing up your data. The point is that LVM adds an extra layer of complexity. I used LVM paired with soft RAID, and when I needed to boot from a liveCD I discovered that I had to rebuild the setup by hand. When you're in trouble it is pristine to have a quick way out instead of being swamped. I had my notes and managed to reckon the configuration (cold sweating!), but at the first occasion I reverted my system to plain RAID. Never used LVM for the few Gentoo server I manage. That said backup+RAID is the way to go. Cheers Francesco -- Linux Version 2.6.28-gentoo-r3, Compiled #1 SMP PREEMPT Sun Mar 8 12:38:59 CET 2009 Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4018.04 Bogomips Total aemaeth
[gentoo-user] Re: extending /usr partition...
On Saturday 21 March 2009, Alan McKinnon wrote: It's correct, and it also highlights just what a PITA it is to manipulate traditional disk partitions. With lvm, this becomes a breeze. With ZFS (we might see it one day) this becomes invisible. I thought it was already there: sys-fs/zfs-fuse Ciao Francesco -- Linux Version 2.6.28-gentoo-r3, Compiled #1 SMP PREEMPT Sun Mar 8 12:38:59 CET 2009 Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4018.04 Bogomips Total aemaeth
Re: [gentoo-user] Re: extending /usr partition...
On Sunday 22 March 2009 08:39:20 Francesco Talamona wrote: On Saturday 21 March 2009, Alan McKinnon wrote: It's correct, and it also highlights just what a PITA it is to manipulate traditional disk partitions. With lvm, this becomes a breeze. With ZFS (we might see it one day) this becomes invisible. I thought it was already there: sys-fs/zfs-fuse Yes, there is a fuse module. I meant in-kernel -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] Re: extending /usr partition...
On Sunday 22 March 2009 08:36:31 Francesco Talamona wrote: With or without LVM if you lose a drive then you've lost the data on it. LVM does have the capability of assembling a partially damaged volume group just not a partially damaged logical volume which, when you think about it, makes sense. And you can also throw in the standard warning about backing up your data. The point is that LVM adds an extra layer of complexity. Apparently you have not considered the enormous complexity inside the drive itself. The added complexity of LVM is tiny in comparison to what goes on there. LVM adds flexibility at the cost of one more thing to think about. You should already be performing backups and have redundancy plans (keeping in mind that it is a sheer miracle of modern science that the drive even works at all) For the occasional case where LVM does fail you. -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] Re: extending /usr partition...
[...] The point is that LVM adds an extra layer of complexity. I used LVM paired with soft RAID, and when I needed to boot from a liveCD I discovered that I had to rebuild the setup by hand. You mean the 1 extra command that's needed to assemble a VG?
[gentoo-user] Re: extending /usr partition...
On Sunday 22 March 2009, Albert Hopkins wrote: [...] The point is that LVM adds an extra layer of complexity. I used LVM paired with soft RAID, and when I needed to boot from a liveCD I discovered that I had to rebuild the setup by hand. You mean the 1 extra command that's needed to assemble a VG? It wasn't that easy, that's what I did in the end: 1) vgchange -a n 2) vgexport -a 3) vgimport -a 4) vgscan --mknodes 5) vgchange -a y Maybe 4) and 5) alone would do the trick... I don't remember which livecd I used then, except for the fact that I had to reboot with dolvm2 option; now I have a tested first aid kit with notes on paper (all my notes were on those discs at the time) with well known and proven liveCDs. When I have to resize/redesign my partitions I simply find easier rsync plus a reboot. I rsync the live system while I use it, than reboot to a liveCD to rsync the file changed meanwhile (to minimize downtime). So I shortly tossed LVM and since I live happily without. Ciao Francesco -- Linux Version 2.6.28-gentoo-r3, Compiled #1 SMP PREEMPT Sun Mar 8 12:38:59 CET 2009 Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4018.04 Bogomips Total aemaeth
Re: [gentoo-user] Re: extending /usr partition...
On Sun, 2009-03-22 at 13:53 +0100, Francesco Talamona wrote: You mean the 1 extra command that's needed to assemble a VG? It wasn't that easy, that's what I did in the end: 1) vgchange -a n 2) vgexport -a 3) vgimport -a 4) vgscan --mknodes 5) vgchange -a y #5 is all I've ever had to do. The first 3 look pointless to me. #5 takes care of #4 for you. Maybe 4) and 5) alone would do the trick... I don't remember which livecd I used then, except for the fact that I had to reboot with dolvm2 option; now I have a tested first aid kit with notes on paper (all my notes were on those discs at the time) with well known and proven liveCDs. I've never had to dolvm2 either. I'm guessing that's a Gentoo live cd thing. I rarely use the Gentoo live cds because they always seem out of date (although I understand they build daily snapshots now).