[linux-lvm] lvm + raid (confused)

Heinz Mauelshagen mauelshagen at redhat.com
Wed Nov 30 08:48:46 UTC 2005


On Wed, Nov 30, 2005 at 08:01:20AM +0100, Wallace Wadge wrote:
> Hi,
> 
> I've got a hardware raid in place. I'd like to add snapshots via lvm to it
> but unfortunately the underlying filesystem is ext3 which cannot be resized
> downwards; therefore I would like to add another disk.
> 
> Now for the problem:
> 
> I would like to add a secondary (physical) disk to the mix and use it for
> snapshots only. However I do not want the lvm to stay writing to that disk
> for normal data since this seconday disk would not be part of my hardware
> raid. In other words, I wouldn't care if the snapshot drive failed because I
> would just replace it.
> 
> Is this at all possible?

Hi Wallace,

yes, it is.

pvcreate the physical disk and vegextend your VG by it.

When creating snapshots, add the path to that PV (say /dev/sdc) to the lvcreate
command line:

lvcreate -LSnapshotSize -nSnapshotName /dev/YourVG/YourLV /dev/sdc

You need to make sure though, that spave for LVs you want to be resilient, gets
allocated on your HW RAID, rather than to the single drive PV.

There's 2 ways to achive that:

o add the path to your HW-RAID to all your lvcreate/lvextend commands
  (but the ones to create snapshots)

o if your snapshots are short-term (which is typical), vgreduce the
  VG by the single drive PV until you need to create (a) snapshot(s) again;
  of course that solution falls short with respect to creating/extending
  LVs *while* the PV is a member of your VG

> 
> Thanks.
> Wallace

> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Cluster and Storage Development                   56242 Marienrachdorf
                                                  Germany
Mauelshagen at RedHat.com                            +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




More information about the linux-lvm mailing list