Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Thu, Mar 12, 2009 at 01:34:03PM +0000, Hari Sekhon wrote: > Has anyone used Drbd with LVM snapshots? > > I have lvm on top of drbd so that I can try snapshotting the contents of > the main storage on the primary node while it has it mounted. > > drbd0 - > partition1 (large) > drbd1 -> partition2 (small) > > one vg on top of drbd0 and drbd1. > > I know about not putting any fs across two devices due to the lack of > guarantee on consistency, so I restricted the lv to use only the drbd0 > device completely and left the smaller drbd1 device for snapshots. still the same problem (logically tightly connected block device use accross multiple DRBD is error prone). think of drbd1 losing replication for some time, before drbd0 (or the other way around). origin and snapshot cow area on the other side are not consistent anymore. if you have DRBD as PV, try to use only _one_ DRBD/PV per VG. make life easier in various failure scenarios. > I made the snapshot successfully (read only) but it seems as though I > cannot mount the snapshot to read from it. > > I guess this is due to some drbd magic locking or something under the > hood to change the block headers to not work for data safety. nope. DRBD does no such thing. > I really want to both replicate (which is working well) and also to take > snapshots of the main area some how. > Can anyone tell me if what I am trying to do is completely off or if > this can be done in another way? "works for me". without any special setup. drbdadm primary drbdvg, vgchange -ay drbdvg, use it, lvcreate -s -n snap drbdvg/whatever mount drbdvg/snap /some/where just works. of course you can only access the snapshot on the node where the vg is active (drbd is primary). -- : Lars Ellenberg : LINBIT HA-Solutions GmbH : DRBD®/HA support and consulting http://www.linbit.com DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. __ please don't Cc me, but send to list -- I'm subscribed