Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On 2/3/2011 2:55 PM, Lars Ellenberg wrote:
> Don't give up so quickly because of information overload ;-)
> Your question was:
> if I take a snapshot of the logical volume used by
> drbd, will I be able to mount that locally (and easily?)
>
> Though J's answer is correct, it does not clearly say it:
>
> The answer is: Yes.
>
> It's that simple.
>
Thanks for answering my question Lars. I do appreciate it :) I decided I
would go ahead and try it before I got too much into a new shell script
for the alternative. I got to the point I thought I would get to.
# lvcreate --snapshot --size 7g --name snap-srvr mvg/srvr
Logical volume "snap-srvr" created
# ls /dev/mvg
home root snap-srvr srvr
# mount /dev/mvg/snap-srvr /mnt
mount: unknown filesystem type 'drbd'
Perhaps I wasn't very clear in my setup. I have drbd on top of lvm::
resource rsrvr {
on h1 {
device /dev/drbd0;
disk /dev/mvg/srvr;
address 10.2.2.1:7788;
meta-disk internal;
}
on h2 {
device /dev/drbd0;
disk /dev/mvg/srvr;
address 10.2.2.2:7788;
meta-disk internal;
}
}
so now I have this snapshot of a drbd partition. It's good to have on
hand if I ever need it, but the next step is to somehow get it mounted
in a secondary location so that it can rsync to an offsite location. It
would be nice to do it like this so that we can resume operation while
the rsync is running.
As you said, I hope to run this on the secondary in production.
I kept going back and forth on whether to do LVM on top or DRBD on top
or god-forbid LVM -> DRBD -> LVM.
So now that I have this drbd partition snapshot, my question is do I
have to make a resource in my drbd configuration named like "backup"
that uses /dev/mvg/snap-srvr as a disk, start it up and then mount the
snapshot to do the rsync or is there something a bit more clever?
J