LVM and disk death

geekraver
Posts: 43
Joined: Fri Aug 14, 2009 9:06 am

LVM and disk death

Postby geekraver » Thu Aug 05, 2010 8:48 am

Hi all

I am using greyhole right now but I have so many files I think it could take weeks just to do the migration. The alternative I thought of was to use LVM and then just create a set of mirror directories with period synching for redundancy (RAID mirroring seems out as my disks are of variable size/manufacturer).

One thing which concerns me with LVM is what happens if a disk dies? How easy is it to recover the files on the other disks? I could potentially mitigate things by creating two LVMs, one for the master and one for the mirror, as opposed to one giant LVM with mirror directory, at the expense of making it more difficult to keep the two LVMs the same size.

Anyone have recommendations here?

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: LVM and disk death

Postby moredruid » Thu Aug 05, 2010 9:43 am

LVM mirroring may be an option for you anyway. It's just that your max LV size is limited by the smallest disk size.

here's a howto on LVM mirroring:
http://bonabo.org/moredruid/tiki-index. ... +mirroring

WRT to your question on recovery: If one of the PV (Physical Volumes) of your VG (Volume Group) or LV (Logical Volume) is damaged, you're basically out of luck. This is because in theory writes should be sequential, but after a lot of use the files become fragmented (yes, Linux filesystems do have fragmentation albeit a lot (a very big lot) less than Windows filesystems), and it can be possible that part of a file is on 1 disk while the other part is on a different disk.

So that's why you have backups (and you've verified them by recovering at least once!) :geek:
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

geekraver
Posts: 43
Joined: Fri Aug 14, 2009 9:06 am

Re: LVM and disk death

Postby geekraver » Thu Aug 05, 2010 6:27 pm

Interesting, thanks. My data disks are 1xGB, 2x 1.5GB and 1x 2GB. Seems that LVM mirroring would be wasteful. What may make more sense is to use software RAID mirroring for the two 1.5GB drives, and put the shares that have huge numbers of small files on these drives, then use grayhole for the 1GB and 2GB drives.

I'm part way through the grayhole migration of a couple of the disks; is it safe to just remove the drives from greyhole pools and then start over?

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: LVM and disk death

Postby moredruid » Thu Aug 05, 2010 11:32 pm

I don't know anything about greyhole, so can't help you there but gboudreau will most likely answer that question.

WRT to the mirroring of the 2x1.5TB (I hope that's TB and not GB). Put the files you definately don't want to lose on the mirrored volume and put the rest in a normal (linear) volume. You have RAID0 for redundancy, not speed :)

You can also (now it's getting complicated) do a RAID5 over all your disks and use the spare storage for another RAID0 volume and the rest for a linear volume.
So that would become:
- 1TB + 2x1TB (from the 1.5TB hdds) + 1TB (from the 2TB hdd) = approx 2.7TB RAID5
- 2x0.5TB (from the 1.5TB hdds) = 0.5TB RAID0
- 1x1TB (from the 2TB hdd) = 1TB linear

you could also use the linear part differently: put the 2x0.5 in one linear volume = 1TB and mirror that on the 1TB from the 2TB disk :ugeek:

please note that a setup like that should be very well documented and is a nightmare to administer if you ever need to change the setup (and you will!, storage needs grow every year).
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

Who is online

Users browsing this forum: No registered users and 25 guests