Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi, On 01/25/2012 02:26 PM, Oren Nechushtan wrote: > Hi, > Is there a built in way to keep snapshots on the same node? > Namely, on each (e.g., of the two) nodes > Allocate extra space in advance > Configure DRBD to > /dev/drbd0 > /dev/sda1 - active partition > /dev/sda0 - dedicated for keeping one snapshot You can do something in that vein, but not quite this, and you won't like it, I fear :-) > Take snapshot should be fast - much faster than dd drbdadm detach <resource> Your local disk is taken out of the loop. Writes are sent to the peer, who will be UpToDate. Your local disk will remain in the state it had when you detached it. Once your link so much as twitches, you're in for a world of hurt. Same if your peer becomes unavailable. > Allow Reverting to the snapshot Unmount, become secondary, disconnect, force yourself primary and discard data on the peer before reconnecting. I cannot see this working without downtime. > Also, are there other means to achieve this, apart from buying storage? > What about when using ext3? The filesystem has nothing to do with this. What can you do with this sorry excuse of a snapshot, you ask? Why, dd data from your backing device of course. For which you will need another disk (array), yes. Another approach, much saner, will require you to setup a stacked resource. Disconnect it whenever you want it to become a snapshot. I'm not sure if nodes 1 and 3 can be the same machine, actually. Easiest way seems to be RAID1 underneath your DRBD, and drop one disk to make it your "snapshot", but that has nothing to do with DRBD whatsoever. DRBD wasn't meant for snapshotting as far as I'm concerned. HTH, Felix