[DRBD-user] mount a LVM with detached DRBD device - write data possible without corruption?
Lars Ellenberg
lars.ellenberg at linbit.com
Mon Jan 19 10:22:34 CET 2009
On Sun, Jan 18, 2009 at 09:24:51PM +0100, Ekkard Gerlach wrote:
> * Tomasz Chmielewski schrieb:
>
> > Papp Tamas schrieb:
> > >Ekkard Gerlach wrote:
> > >>Can I write to the according lv-device when DRBD is stopped by
> > >>"drbdadm down /dev/drbd1"
> > >>and lv is mounted by 'mount /dev/vg-ford2/vserver-home /mnt' without
> > >>data corruption? -
> > >>DRBD is set up on logical volumen!
> > >>
> > >
> > >Of course not.
> >
> > It's enough to mount the device (without writing any "real files") to
> > make it inconsistent with DRBD metadata.
>
> OK, thx. But if this device on a separate harddisk is NEVER in use with DRBD? - Its used
> only if my system with 2 nodes crashes completely, when I need a copy to build a complete new
> DRBD-system! For this case once again my question: if I write to that device on a separate
> harddisk partition (that was formatted originally as DRBD-device) - is that device
> usable for a NEW DRBD-system where this harddisk is primary from beginning/ the start?
>
>
> Perhaps you don't understand my aim. Background what I want:
> ==============================================================
> node2 of my DRBD-system has only ONE harddisk, node1 has 2 disks
> in soft-raid1. node2 is only a emergency and backup node.
> The second harddisk of node2 is a standalone disk with backup
> of the last day. Every night data ist rsync'ed to that second harddisk:
>
> node2:~>hb_standy all # not necessary, node2 is always secondary on all vservers
> node2:~>drbdadm down all
> node2:~>mount -o ro /dev/vg-ford2/vserver-home /to_sync-ro
though "unexpected",
even ro mount will modify the device
(replay journal, update superblock, etc).
rather use a snapshot.
lvcreate -s -n vserver-home-snap -L 1G vg-ford2/vserver-home
and access that.
then you not even need to stop drbd before.
though it still may be useful to disconnect drbd temporarily,
as snapshots can have a heavy performance impact, which would propagate
back to the Primary volume.
> node2:~>rsync -aHx /to_sync-ro ==> my second harddisk
> node2:~>drbdadm up all
>
> The second harddisk is a dd-copy of the first one of node2!
> I changed UUID of physical volume and volume group and
> renamed volume group of the second harddisk. Now I have a entirely redundant
> harddisk for node2. Do you understand me now?
>
> Only one logical volume carries user data that changes every day and I want
> to update my second harddisk every night. So I've two benefits:
> * data from yesterday. Perhaps for restoring lost (deleted) or corrupted files
> * a complete harddisk build a new DRBD-system if my running system crashes.
>
> ==> once again my question: can I update my second emergency and last-day-backup
> harddisk every night without data corruption?
whenever you bypass DRBD,
you need a full sync afterwards.
so don't do that,
unless you know you need the full sync anyways.
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: 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
More information about the drbd-user
mailing list