[Gllug] RAID on RAID

Rich Walker rw at shadow.org.uk
Thu Nov 11 18:05:07 UTC 2004


Tethys <tet at createservices.com> writes:

>
> Which reminded me that I'd been meaning to ask about that. As far as
> I can see, the only way to do mirroring in Linux is with md, which
> sits below LVM. This is a hideously broken design. Say I add a new
> disk to my system, and decide I want to mirror the old disk. It can't
> be done because the mirror needs to be created before the filesystem.

I just created two LVM volumes, and then built a raid-1 array from them.

gateway:~--# lvcreate -L 100M bulk
  device-mapper ioctl cmd 13 failed: Invalid argument
  device-mapper ioctl cmd 13 failed: Invalid argument
  Logical volume "lvol5" created
gateway:~--# lvcreate -L 100M bulk
  device-mapper ioctl cmd 13 failed: Invalid argument
  device-mapper ioctl cmd 13 failed: Invalid argument
  Logical volume "lvol6" created
gateway:~--# mdadm --create /dev/md0 --level=1 --raid-devices 2 /dev/mapper/bulk-lvol5 /dev/mapper/bulk-lvol6 
mdadm: array /dev/md0 started.
gateway:~--# cat /proc/mdstat 
Personalities : [raid1] [raid5] [multipath] 
read_ahead 1024 sectors
md0 : active raid1 [dev fe:06][1] [dev fe:05][0]
      102336 blocks [2/2] [UU]
      
unused devices: <none>
gateway:~--#

Admittedly, they're on the same disk, but that's neither here nor there.

Whether I can extend it is another question...

cheers, Rich.

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




More information about the GLLUG mailing list