Skip to contentSkip to conversation

Do I loose all my data if one disk crashes?

linux-lvm Dave Newman 3 participants 3 messages May 1, 2002

lore
Share & tools
lore
#0 lore raw

Hi --

I just installed lvm on three 160 GB IDE hard drives, giving me a singe 480 GB partition.

I followed the instructions:
http://www.sistina.com/lvm_howtos/lvm_howto/Setting_up_LVM_on_three_S.html
and the install went exactly as described.

I did a "vanilla" install (doing nothing special).

My question is: Do I loose all my data if any of the three disks crashes? And if so, what can I do to improve the "restore-ability" of my configuration.

Thanks,
Dave

#1 lore raw

-- Dave Newman <[email protected]> on 05/01/02 15:26:51 -0700

Quoted 4 lines

Hi --

I just installed lvm on three 160 GB IDE hard drives, giving me a singe 480 GB partition.

Not possible. You have combined the storage from 3 Phyiscal Volumes ("PV") into a single Volume Group ("VG"). After this point you can create Logical Volumes ("LV") w/in the VG.

Whether you loose data when a VG croaks depends on whether your LV's are spread across multiple VG's. This is often done either for the increased space or to improve performance (by striping the LV in kernel-page sized chunks). If your filesystem is striped and any disk it's on croaks then you will loose whatever data is on the dead disk [until it's restored from the backup that you obviously intend to make if you're dealing with have a TB of data].

If you have multiple LV's and they are all kept on a single drive then only the LV's on the one PV will have to be restored.

I'd suggest if you're dealing with this much data that a RAID system would be worth it. RAID5 isn't all that expensive to install (one more drive in this case) and can save you many, many hours restoring data.

In this case you'd want a RAID5 w/ 4k stripe (4 x 1K chunk) (4k is standard page size for linux ext[23], change this number to match whatever file system page you really use). The RAID will combine the disks into a single unit for you, so the VG will use a single PV. LVM is still useful here for managing the individual LV's (e.g., growing them as time goes along). It would also be useful to have LVM in the case where your physical storage has to grow. Just add another RAID5 setup, add it to the VG and expand onto it.

--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647

                                           +1 800 762 1582
#2 lore raw
In reply to Dave Newman
Quoted 3 lines · Dave Newman

My question is: Do I loose all my data if any of the three disks crashes? And if so, what can I do to improve the "restore-ability" of my configuration.

I have not read the LVM instructions so I'm unsure what config you have ended up with.

One thing to remember is that LVM does not implement RAID5 only RAID0 and linear. Therefore, if a drive dies you will lose data.

To give the system a little extra survivability (yes you _still_need_backups_) you can have LVM ontop of a Linux software RAID5. This will allow one drive to fail but the array will still be accessable. Of course with this config you effectively lose one of your drives because of parity information.

Signature · 3 lines
Adrian Head

(Public Key available on request.)