Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm debating about using LVM for a media/file server because I would like to combine multiple physical hard disks into one volume. I do not wish to use any RAID in my LVM so my question is:

If one of the multiple hard disks in my volume were to go down would I lose all my data or would I just lose the data that was stored on that individual disk?

Also, if I were to just lose the data on the individual disk, would it be as simple as replacing that disk and restoring what was on it from a backup to recover?

Thanks everyone.

share|improve this question

5 Answers

If one of the multiple hard disks in my volume were to go down would I lose all my data or would I just lose the data that was stored on that individual disk?

No you will lose data stored on whole LVM

Also, if I were to just lose the data on the individual disk, would it be as simple as replacing that disk and restoring what was on it from a backup to recover?

No it isnt that simple

You can read here similar question LVM and disaster recovery

share|improve this answer
Thank you for the information. – Fujin Mar 1 '11 at 14:06

If you're just connecting multiple devices together there wouldn't be any redundancy, so you could lose the data. But if you're using a media/file server for a business, you shouldn't lose anything because you have everything backed up to a backup server/tape drive.

Why are you avoiding RAID? The point of RAID is availability; if you don't want to lose time due to disk failure, you can use a RAID 1 configuration, which can also speed up your reads. They're not too expensive, pay for themselves the first time you have a disk failure, and if you are REALLY avoiding having to pay for a card you can set up Linux to use software RAID although it takes a little more care in the setup and troubleshooting to make sure you replace the correct drive.

Otherwise you'd have to jump through some hoops to try to recover what data you can from the remaining disks. It would be possible, but you're kinda' asking for a lot more trouble than you should have. Get a good backup in place, and reconsider the RAID.

share|improve this answer
I'm avoiding RAID because I'm not concerned about availability. This is for personal use. I'm trying to avoid RAID because I'm looking more for reliability. One little thing goes wrong in RAID and you lose the entire array and I don't feel like dealing with that. I rather have one large file depository that I can backup rather then several. – Fujin Mar 1 '11 at 14:05
1  
I'm not sure I understand that. RAID makes you not lose the array if one thing goes wrong. Not using RAID is when one failure will kill the whole thing. – JOTN Mar 1 '11 at 14:11
4  
@user72630: You have serious misconceptions about how a RAID works. First of all, there are different RAID levels, most of which are designed to avoid data loss in case of a disk failure. Then you can configure a RAID to have only one file system on multiple disks, just like you are planning with LVM. Please read en.wikipedia.org/wiki/RAID – SvW Mar 1 '11 at 14:17
What the others said. The whole point of having RAID is keeping availability...i.e., drive fails, data is still accessible. With appropriate gear you can hot-swap the failed drive and not worry about downtime at all. – Bart Silverstrim Mar 1 '11 at 14:49

If you are using one file system spanning all LVM volumes, the whole file system will be damaged as the FS doesn't know about the underlying physical volumes and won't create structures aligned to it. It may be possible to rescue some of the parts on the working disks, but there is no guarantee for that.

And just recovering the files of the damaged disk won't work either for the same reason.

share|improve this answer
Thank you for the information. – Fujin Mar 1 '11 at 14:07

I think a much simpler route would be to configure mdadm for your media partition. If you don't have the hardware for "real RAID" going the mdadm route would be considerably easier, and seem to meet your requirements for redundancy and simple disk replacement.

# Format your drives first
# Create your MD
mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sda2 /dev/sdb2 /dev/sdc2

# In the event that a drive fails do the following
mdadm /dev/md1 --fail /dev/sda1
# Format the new drive
mdadm --add /dev/md1 /dev/sda1

For more information: http://en.wikipedia.org/wiki/Mdadm

If one of the multiple hard disks in my volume were to go down would I lose all my data or would I just lose the data that was stored on that individual disk?

If you use mdadm and RAID 5, you'd be able to lose one drive, and have the array functional, albiet you'd experience performance degradation.

share|improve this answer

I think the important thing to understand which hasn't been mentioned is a file in a filesystem is not necessarily sitting in one spot on a disk. It's broken up into blocks which may reside anywhere inside the filesystems. The first 4K if your file might be on disk1, the next disk2, etc. You can imagine the mess of trying to recovery anything if you lost a chunk of the filesystem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.