On Sat, 2009-11-07 at 22:22 -0800, Monte Milanuk wrote:
Hello all,
I've been 'away' from all things Linux in general and RH in particular for a long while, so I've got some catching up to do ;)
I've got a pretty fair collection of tabs reading on LVM and how it works and why its such a great thing for enterprise use, etc., being able to add storage to the pool and all that. LVM was just kind of catching on when I moved away from Linux for a while, so it's a little odd to me.
What I have currently is an older PC that I'm hoping to use as a home server / occasional 'workstation'. One 13GB main drive, and a 500GB drive for network storage. The default install in CentOS 5.4 seems to want to just lump everything together in one big volume. I was thinking perhaps it'd be better to have two volumes (or pools, like I said - still learning and not entirely confident of the lingo involved)... one for the main or 'system' drive (the 13GB one with / mounted on it), and another one for the 500GB sata drive on it - so if I want to add another big drive for more storage, it'd go under that group, ready to serve up storage to the WLAN.
Is there anything particularly 'wrong' with that layout, as compared to the default 'everything in one logical volume' approach that the installer utilized?
There won't be any issue in doing this. The installer just tries to make things easier by creating one big volume group.
I'd say that in some ways seperating the two disks in this case would actually be better. :)
With both drives in one big volume group, failure of one drive will (most likely) cause both the OS and data to be lost.
Seperating them will mean that if your OS drive fails you can replace the dead drive, reinstall CentOS (or restore from a backup), and your data will be accessible again.
Of course you would still have to create regular backups, or you would still be in a very unhappy situation if the data drive fails but it would still save you a lot of headache in the event that you encounter a situation in which only the OS drive fails. :)
Regards
Hamzah
M. Hamzah Khan wrote:
There won't be any issue in doing this. The installer just tries to make things easier by creating one big volume group.
I'd say that in some ways seperating the two disks in this case would actually be better. :)
My last 'serious' experience with Linux was some years ago... mostly before LVM really became popular (it was out and about, but mostly only in SuSE). I'm still 'stuck' in the mind set of a main drive or partition for things like '/', possibly even /boot, /var, /usr, etc. and then keeping /home separate - mainly so the user data in /home survives upgrades and updates and such ;)
With both drives in one big volume group, failure of one drive will (most likely) cause both the OS and data to be lost.
There in lies some of my confusion with this subject; correct me if I'm wrong in my understanding here: with LVM, I can keep adding more drives to a 'pool' and expand the size of the 'volume' that the OS sees available to it... but if any drive in that volume fails, I'd probably lose everything stored in that volume?!? Sounds like a somewhat risky business to me, unless you *really* needed a storage volume that big that you had to span multiple drives to do so.
Seperating them will mean that if your OS drive fails you can replace the dead drive, reinstall CentOS (or restore from a backup), and your data will be accessible again.
Kind of what I had in mind, as the 13GB drive is much older (circa 2005, if its the original one put in when the previous owner built the box from a bare-bones kit) than the 500GB SATA drive (earlier this year, when I stuck it in there) so if I had to put money on one failing before the other... ;)
On Sun, 2009-11-08 at 10:44 -0800, Monte Milanuk wrote:
M. Hamzah Khan wrote:
There won't be any issue in doing this. The installer just tries to make things easier by creating one big volume group.
I'd say that in some ways seperating the two disks in this case would actually be better. :)
My last 'serious' experience with Linux was some years ago... mostly before LVM really became popular (it was out and about, but mostly only in SuSE). I'm still 'stuck' in the mind set of a main drive or partition for things like '/', possibly even /boot, /var, /usr, etc. and then keeping /home separate - mainly so the user data in /home survives upgrades and updates and such ;)
I actually ran into this recently too! 3TB volume group, with very old backups, and no RAID. One drive failed, almost lost all of the data. I had to send the drives off to a data recovery center and get the data recovered professionally.
With both drives in one big volume group, failure of one drive will (most likely) cause both the OS and data to be lost.
There in lies some of my confusion with this subject; correct me if I'm wrong in my understanding here: with LVM, I can keep adding more drives to a 'pool' and expand the size of the 'volume' that the OS sees available to it... but if any drive in that volume fails, I'd probably lose everything stored in that volume?!? Sounds like a somewhat risky business to me, unless you *really* needed a storage volume that big that you had to span multiple drives to do so.
That is correct. You can add more drives and expand the volume group in order to increase the size of your logical volumes. Losing one drive would indeed cause all your data in the volume group to be lost (although there are some situations where it isn't too difficult to recover some of the data).
What I think most people do (and what I am doing now), is to setup RAID-1 or so behind the volume group. This way you will still be safe if one of the drives fail. Keep in mind that RAID is not a backup solution, and you should still create regular backups. :)
Seperating them will mean that if your OS drive fails you can replace the dead drive, reinstall CentOS (or restore from a backup), and your data will be accessible again.
Kind of what I had in mind, as the 13GB drive is much older (circa 2005, if its the original one put in when the previous owner built the box from a bare-bones kit) than the 500GB SATA drive (earlier this year, when I stuck it in there) so if I had to put money on one failing before the other... ;) _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
M. Hamzah Khan wrote:
On Sun, 2009-11-08 at 10:44 -0800, Monte Milanuk wrote:
What I think most people do (and what I am doing now), is to setup RAID-1 or so behind the volume group. This way you will still be safe if one of the drives fail. Keep in mind that RAID is not a backup solution, and you should still create regular backups. :)
In practical terms, it may all be a moot point. I'm not too sure how much more I can jam in that mini-tower case without other problems, and (hopefully) 500GB should be enough storage for now; intended usage is just backing up users home directories from a few PCs & laptops in the house. If I truly intend to implement LVM + RAID it may have to be in a newer dedicated setup. I think for the time being though, I will look at removing the 500gb drive from the first volume group and creating a second one with just it in there. Who knows, I might get brave and start mucking about w/ software raid and see what I can put together ;)
I know everyone says RAID is not substitute for a proper backup solution... but this machine *is* the backup for the rest of the network. At what point should one draw the line for backing up? What is there out there that is still reasonably economical for backing up say, a RAID 1 setup of two 1TB drives, or a RAID 5 setup of three drives that size? Tape? Looks to be just about out-stripped in size by cheap hard drives, at least in anything even remotely in my price range. NAS - which is probably going to have its own version of RAID?
Thanks,
Monte
Monte Milanuk wrote on Sun, 08 Nov 2009 14:13:17 -0800:
In practical terms, it may all be a moot point. I'm not too sure how much more I can jam in that mini-tower case without other problems, and (hopefully) 500GB should be enough storage for now; intended usage is just backing up users home directories from a few PCs & laptops in the house. If I truly intend to implement LVM + RAID it may have to be in a newer dedicated setup. I think for the time being though, I will look at removing the 500gb drive from the first volume group and creating a second one with just it in there. Who knows, I might get brave and start mucking about w/ software raid and see what I can put together ;)
For your purposes you could just go without LVM. Just mount disk 1 as / and disk 2 as /var or /home - depending where you need most of the space.
Kai
Quoting Monte Milanuk memilanuk@gmail.com:
M. Hamzah Khan wrote:
On Sun, 2009-11-08 at 10:44 -0800, Monte Milanuk wrote:
What I think most people do (and what I am doing now), is to setup RAID-1 or so behind the volume group. This way you will still be safe if one of the drives fail. Keep in mind that RAID is not a backup solution, and you should still create regular backups. :)
In practical terms, it may all be a moot point. I'm not too sure how much more I can jam in that mini-tower case without other problems, and (hopefully) 500GB should be enough storage for now; intended usage is just backing up users home directories from a few PCs & laptops in the house. If I truly intend to implement LVM + RAID it may have to be in a newer dedicated setup. I think for the time being though, I will look at removing the 500gb drive from the first volume group and creating a second one with just it in there. Who knows, I might get brave and start mucking about w/ software raid and see what I can put together ;)
I know everyone says RAID is not substitute for a proper backup solution... but this machine *is* the backup for the rest of the network. At what point should one draw the line for backing up? What is there out there that is still reasonably economical for backing up say, a RAID 1 setup of two 1TB drives, or a RAID 5 setup of three drives that size? Tape? Looks to be just about out-stripped in size by cheap hard drives, at least in anything even remotely in my price range. NAS
- which is probably going to have its own version of RAID?
well, I'm dealing with this right now, I've taken delivery of a pile of parts that will be a new server Real Soon Now (TM). The four 750 drives will be a sw RAID 0+1 array with striping for performance and mirroring for redundancy. There will be an identical 5th drive in the box and not connected as a spare for 1 drive failure. Then there will be an off-site 1.5T in another box doing rsync as the last line of backup. The reason for sw raid is that I get to use eight opteron cores rather than the dinky cpu on a raid card and that I don't need to be concerned that a replacement raid controller might have a different BIOS than the one I started with.
HTH
Dave
Thanks,
Monte _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sun, 8 Nov 2009, Monte Milanuk wrote:
I know everyone says RAID is not substitute for a proper backup solution... but this machine *is* the backup for the rest of the network. At what point should one draw the line for backing up? What is there out there that is still reasonably economical for backing up say, a RAID 1 setup of two 1TB drives, or a RAID 5 setup of three drives that size? Tape? Looks to be just about out-stripped in size by cheap hard drives, at least in anything even remotely in my price range. NAS
- which is probably going to have its own version of RAID?
Perhaps skip using the 13GB drive since it will probably fail relatively soon. Snag another larger drive and do mirroring between the two.
Investigate "Amanda", "Backuppc", or "Duplicity" for doing your backups from the other boxes. This way if one drive fails you have the other still working until you replace it and resync. The last two options I listed do de-duping of the disk blocks so you're not duplicating the same block across backups for multiple machines. If you have lots of the same files on the various machines you're backing up this will save you loads of space (for instance, the same OS on lots of machines).
If it were me, I'd skip the whole LVM scheme for the house LAN. Use real backups schemes and change their configs so that your backups fit within your available space. Later on if you run out you can move things around a bit and go with either LVM or with larger mirrored drives. Drives are cheap.
On Mon, Nov 9, 2009 at 9:19 AM, Curt Mills hacker@fluke.com wrote:
Perhaps skip using the 13GB drive since it will probably fail relatively soon. Snag another larger drive and do mirroring between the two.
This is where I run up against a pre-conceived notion, which may or may not be correct. I had been thinking in terms of putting the stored data under /srv on the larger drive(s), and if I were going to use RAID, probably mirror those drives so if one starts acting sickly, I would have a bit of a buffer in terms of being able to pull one drive, replace it, etc. What you're describing almost sounds like just having two drives period, both 500GB (for example), with /boot, /, /var, /etc, /usr, i.e. everything on there along with the stored data, in a mirrored RAID 1 configuration. For whatever reason, just using RAID 1 with 'only' two drives of the same size never occured to me... guess I thought it wasn't 'proper' or that you needed a separate non-RAID drive for some of the system stuff like /boot... but now that I think on it... I'm not sure why it *wouldn't* work...? The software RAID installation example in the CentOS 5 manual seems to indicate doing just that, unless I'm mistaken (though they throw LVM into the mix as well).
Investigate "Amanda", "Backuppc", or "Duplicity" for doing your backups from the other boxes. This way if one drive fails you have the other still working until you replace it and resync. The last two options I listed do de-duping of the disk blocks so you're not duplicating the same block across backups for multiple machines. If you have lots of the same files on the various machines you're backing up this will save you loads of space (for instance, the same OS on lots of machines).
BackupPC seems to keep coming to the top of every backup thread I've seen recently (last year or two), so it's definitely on my list to check out - after I get some other services (Samba) ironed out to my satisfaction. Unfortunately, I don't think I'm going to get away with backing up the *entire* OS or hard drive from the client computers (other than my Macbook or the wife's Macbook from the school district, which only have 60GB hard drives). The daughter's new HP laptop and my HP desktop have 500GB and 640GB drives respectively. Neither are anywhere near full yet, but I think they may strain the meager limits of my 'server' rather soon. My plan, such as it is, was to back up the user directories, which is where the bulk of the 'un-replaceable' stuff is - documents, pictures, movies, etc. vs. programs that we have install media/codes for. May not be ideal, but it would be a step ahead of where I'm at currently.
On Mon, 9 Nov 2009, Monte Milanuk wrote:
This is where I run up against a pre-conceived notion, which may or may not be correct. I had been thinking in terms of putting the stored data under /srv on the larger drive(s), and if I were going to use RAID, probably mirror those drives so if one starts acting sickly, I would have a bit of a buffer in terms of being able to pull one drive, replace it, etc. What you're describing almost sounds like just having two drives period, both 500GB (for example), with /boot, /, /var, /etc, /usr, i.e. everything on there along with the stored data, in a mirrored RAID 1 configuration. For whatever reason, just using RAID 1 with 'only' two drives of the same size never occured to me... guess I thought it wasn't 'proper' or that you needed a separate non-RAID drive for some of the system stuff like /boot... but now that I think on it... I'm not sure why it *wouldn't* work...?
It works. I have a software RAID mirrored configuration on two 750GB SATA drives running now to the left of me, doing backups to those two hard drives for several other machines. I'm using Amanda currently but am thinking of switching to backuppc or duplicity soon in order to retain backups for a longer period. I'm also backing the same systems up to tape.
The OS is mirrored on the same two drives. I also have a bootable OS DVD that I can use for rescue, and know how to use it.
Be sure you know how to patch up your system for booting from the 2nd drive in case the first drive fails, and how to identify/replace/rebuild a new drive when one fails.
One think to think about when running RAID is automated notification when a drive is about to go out, plus automated notification when one has gone bye-bye. RAID likes to just keep running, so unless you've set up notifications you might lose a 2nd or a 3rd drive, taking down your filesystem for good, before you'd notice it otherwise. This might seem obvious, but to some people it's not.
Also: I've used RAID5 in a system and had two drives go out in the same weekend (before I could replace the first failed drive), taking down the system. This can happen with mirrored or RAID 1 + 0 as well, but it's less likely that two drives in the same mirror will go out. With RAID5, ANY two drives going out means you lose it all. I'm not a big fan of RAID5 at the moment. Yes, I had good backups!
On Sun, Nov 8, 2009 at 4:44 PM, Monte Milanuk memilanuk@gmail.com wrote:
M. Hamzah Khan wrote:
With both drives in one big volume group, failure of one drive will (most likely) cause both the OS and data to be lost.
There in lies some of my confusion with this subject; correct me if I'm wrong in my understanding here: with LVM, I can keep adding more drives to a 'pool' and expand the size of the 'volume' that the OS sees available to it... but if any drive in that volume fails, I'd probably lose everything stored in that volume?!? Sounds like a somewhat risky business to me, unless you *really* needed a storage volume that big that you had to span multiple drives to do so.
You are right. LVM sort of factors out the disk reliability issue. That's why you should consider to allow volumes that span across disks on RAIDed-1 disks only.
On Sun, Nov 8, 2009 at 1:22 AM, Monte Milanuk memilanuk@gmail.com wrote: [...]
What I have currently is an older PC that I'm hoping to use as a home server / occasional 'workstation'. One 13GB main drive, and a 500GB drive for network storage. The default install in CentOS 5.4 seems to want to just lump everything together in one big volume. I was thinking perhaps it'd be better to have two volumes (or pools, like I said - still learning and not entirely confident of the lingo involved)... one for the main or 'system' drive (the 13GB one with / mounted on it), and another one for the 500GB sata drive on it - so if I want to add another big drive for more storage, it'd go under that group, ready to serve up storage to the WLAN.
Is there anything particularly 'wrong' with that layout, as compared to the default 'everything in one logical volume' approach that the installer utilized?
Nothing wrong with it and I would certainly recommend that you separate the data volumes from the OS volumes. In the very least it will allow you to move the data drive to another system and bring it online. And yes, if you lose a single drive in a non-RAIDed LVM group, you can lose the whole volume. If there's data that is absolutely critical, you can put it on an LVM RAID or at least mirror it. This said, having even a single drive in an LVM VG can be beneficial. For example:
1) Adding space is as simple as adding another drive to the VG.
2) If you later want to mirror the drive, just add another drive and mirror the LV.
3) If you run out of space, you can add a larger drive then migrate the PVs from the original drive to the new, larger drive. This also works if the original drive is starting to fail.
4) You can create LV snapshots easily which is very useful for backups.