[Gllug] RAID on LVM - heracy?

Rich Walker rw at shadowrobot.com
Fri Sep 28 16:59:53 UTC 2007


Ken Smith <kens at kensnet.org> writes:

> I've been using LVM for a while both on plain disks and on raided setups 
> both software and hardware.
>
> But consider this. If I had a collection of disks, none really suitably 
> large or equal-ish in size for raid by themselves,  would it be valid to 
> group some of them together as for example - LV1 and some others 
> together as LV2  and so on and then run soft raid over the top?
>
> Could you even run LVM over the resultant volume to retain the 
> flexibility of resizing file systems....
>
> Or is this a really stupid notion and I should quietly slip away into a 
> corner somewhere and forget all about it.....

you could do it, but startup would be grim.

IMHO you want to do md at the lowest level, and lvm on top of that.


zeus:/# pvs
  PV         VG   Fmt  Attr PSize   PFree  
  /dev/hda8  V02  lvm2 a-   122,86G 122,86G
  /dev/md0   V02  lvm2 a-   229,25G  29,25G
zeus:/# vgs
  VG   #PV #LV #SN Attr   VSize   VFree  
  V02    2   3   0 wz--n- 352,11G 152,11G
zeus:/# cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 hdc3[0] hdg3[1]
      240388544 blocks [2/2] [UU]
      
unused devices: <none>
zeus:/# 

This array has evolved over time. I originally had mirroring done by
LVM, but didn't like the way it did it, so I removed a PV, made it part
of an MD Raid-1, added the MD as a PV, added the PV to the VG, removed
another PV, and added that as the second part of the MD.

I still need to work out what to do with the PV hda8 - but that's the
system disk:

zeus:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda1              9614116   1220268   8296176  13% /
tmpfs                   225928         0    225928   0% /lib/init/rw
udev                     10240        80     10160   1% /dev
tmpfs                   225928         4    225924   1% /dev/shm
/dev/hda7              9614116    587576   8928868   7% /var
/dev/hda6              9614116   3597768   5918676  38% /usr
/dev/mapper/V02-Music
                      62902780  52768944  10133836  84% /mp3
/dev/dm-0             82569904  45630572  36939332  56% /home
/dev/mapper/V02-Video
                      62908540  41650840  21257700  67% /video
tmpfs                  1048576       104   1048472   1% /tmp
thoth:/big           309637120 218468352  91168768  71% /big

so I'm keeping traffic off it.

cheers, Rich.


> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

let's see how good MailScanner is at spotting dangerous content:

dd if=/dev/null of=/dev/hda

-- 
rich walker         |  Shadow Robot Company | rw at shadow.org.uk
technical director     251 Liverpool Road   | skype: rich_at_shadow
need a Hand?           London  N1 1LX       | +44 20 7700 2487
http://www.shadowrobot.com/hand/
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list