Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Sat, Feb 07, 2009 at 06:06:04PM +0100, Serge Fonville wrote: > If you want an exact copy of a filesystem, you can use dd instead. > For example: > Say you have a file system that contain data only. > you can create a 'backup' of that filesystem using dd: > dd if=$SOURCEFILESYSTEM of=$DESTINATIONFILE > afterwards, you 'restore' the file system using > dd if=$SOURCEFILE of=DESTINATIONDRBDDEVICE > This is very basic dd, read the man pages for more options > For 'if' and 'of' any block device and file you can read from (if) and write > to (of) can be used > > Then you can use this image to restore to a drbd resource you are missing some details. * you need enough temporary storage somewhere * you have to make sure that the image file as well as the to be used DRBD have enough room to hold the full image * there are better tools for the job, only copying _used_ blocks. * it is not necessary mini howto put an existing filesystem on DRBD after the fact: * you need room for DRBD meta data. - if you have a spare partition or LV, you can use "external" DRBD meta data. - if you cannot use "external" DRBD meta data, you have to make room for "internal" DRBD meta data by shrinking the existing file system. (e.g. use resize2fs for ext3) note: drbd meta data uses ca. 32 MiB / TiB of storage, so 4 MiB should be more than enough for 100 GiB. - if your file system cannot be made smaller (xfs can only grow) you need to extend the block device, think about using external meta data again, or backup/mkfs/restore. * after you made room for DRBD meta data, initialize it (drbdadm create-md ...) * make the node with the pre-existing data primary first. * otherwise follow the user guide "Configuring DRBD" http://www.drbd.org/docs/install/ * and then only use /dev/drbdX, do not bypass DRBD by using its lower level storage. more details about the various steps in the man pages. yes, a backup never hurts. but replication is not backup. neither is mirroring. snapshots do not replace backups, either. which means, backup is an entirely different story, backup strategies (and restore operations!) need to be solved independendly of HA or replication. hth, -- : 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