[linux-lvm] LVM mirroring questions...

Stuart D. Gathman stuart at bmsi.com
Tue Apr 8 11:14:31 UTC 2008


On Tue, 8 Apr 2008, Jess Bromley wrote:

> I've got a situation where I want to mirror only a partition of a
> physical disk on to that of another physical disk, not the whole disk;
> so software/hardware RAID isn't an option.

That is exactly what software RAID does for you - mirrors a partition.
LVM mirroring allows you to mirror a logical volume.

Here is an example status of partitions mirrored via software raid1:

$ cat /proc/mdstat
Personalities : [raid1] 
read_ahead 1024 sectors
md0 : active raid1 hda3[0] hdc3[1]
      530048 blocks [2/2] [UU]
      
md2 : active raid1 hda5[0] hdc2[1]
      18916032 blocks [2/2] [UU]
      
md1 : active raid1 hda2[0] hdc1[1]
      24000 blocks [2/2] [UU]
      
unused devices: <none>

You then make PVs on the mds if you want LVM.  For example (another system):

# pvs
  PV         VG      Fmt  Attr PSize   PFree  
  /dev/md2   rootvg  lvm2 a-    36.19G  15.69G
  /dev/md3   rootvg  lvm2 a-    55.88G   2.00G
  /dev/md4   rootvg  lvm2 a-    55.88G   6.50G
  /dev/md5   rootvg  lvm2 a-    83.81G  23.81G

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the linux-lvm mailing list