0

My question is for a low cost home workstation, in a hard to replace hardware situation.

So what is the best practice using LVM? and without raid.

1) I think I should create logical volumes restricted to physical volumes (so if one of my 3 HDs that seem ready to fail, will not compromise the data on others). is that true?

2) Also I intend to create a single lvm group thru all HDs, and leave some space unallocated by any logical volume on them all, so I can create snapshots on them.

But I am still finding it hard to dethermine thru research:

  • What will happen if any HD that is on that single lvm group, storing only the main logical volume snapshots, fail?
  • Will my machine stop booting as there is a missing group member?
  • To boot is only required that the full logical volume is available?

I am still confused about the risks and I still cannot find similar question that answers what I need.

Obs.: I am using KVPM to make several tests (on linux), merging groups, extending LV (on a single physical volume) etc. And I still have to unplug one of the group members to see what happens (making it sure any LV is limited to a single PV)

thanks on tips too!

PS.: I will try to phrase it better as I understand it better later

migrated from serverfault.com Feb 20 '15 at 23:40

This question came from our site for system and network administrators.

1

I think I should create logical volumes restricted to physical volumes (so if one of my 3 HDs that seem ready to fail, will not compromise the data on others).

You can create mirrors of your logical volumes ('lvcreate -m1 ...') so that if one disk dies your data will still exist on another disk, without any data loss.

Will my machine stop booting as there is a missing group member?

If the missing disk contains /, /boot or the boot sectors, then yes. Missing volumes will obviously fail to mount.

I keep a bootable CD of System Rescue CD nearby.

  • so instead of a snapshot, it would be better to create a mirror of my /? any idea about the differences? going to check now too. Also, the possibly missing disk will not have any part of the main volume at /, so, as I understand, missing group members do not interfere on mounting logical volumes (that are not spread into these missing physical volumes), cool! – Aquarius Power Feb 21 '15 at 1:34
  • 1
    A mirror will protect you against device failure, but will do nothing against "oops, I didn't mean to delete that". Snapshots are good for going back in time. – pgs Feb 21 '15 at 1:38
  • I just tested, unplugging one PV (that has no LV part, just mirrors or snapshots) keeps the other LVs on the group actively working; but... the LV with a mirror leg on it, became inaccessible; may be kvpm cant handle it, still testing. – Aquarius Power Feb 21 '15 at 2:09
  • kvpm "remove missing physical volumes" did the trick, I recovered access to the mirrored volume! I think it is all good now, thanks! – Aquarius Power Feb 21 '15 at 2:45
  • linking what I believe is the recover coomandline: serverfault.com/a/534283/163750, pvdisplay;vgreduce --removemissing --force $vgname – Aquarius Power Feb 22 '15 at 0:33

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.