0

I have recently run out of storage space on a server and would like to migrate to lvm to make handling this scenario easier in the future. I would like to combine all of my drives (not including OS drive) to a single logical volume so the entire available space can be mounted at a single mount point. In this scenario, I would create a single PV for each disk and create one VG for all of my PVs. I plan on using a single LV from my VG. In this way I can aggregate all the storage available into a single mount point.

What happens if one of my disks fail? Will all of the data in the LV be corrupted? Or will I only lose data associated with the PV for the failed disk? Losing data is not ideal, but this is also not critical data, I can tolerate some loss but would prefer not to lose everything.

0

If you have one VG (and in your case one LV) spread across multiple disks, then if any one disk fails you will lose the entire VG (in your case the entire LV).

Bear in mind that as you add disks to an array you reduce the mean time between failures (MTBF), making it more likely you will lose one disk of your collection. Look up the statistics for RAID 0.

One solution is backups. In fact, this should be your primary solution for any event.

Once you have backups sorted consider RAID 1, or the LVM mirror equivalent. This ensures all writes go to two disks simultaneously, but requires twice as much raw storage to implement.

0

If you create only a single LV and lose one of the disks, the LV (and the filesystem on it) will be corrupted and you won't able to mount it and recover the data. You might be able to save some of the data using tools like photorec and ddrescue but it's not guaranteed. If you are afraid of data loss, you can always create RAID1 LV to have redundancy (but this will of course reduce the "usable" space).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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