NBD - was Re: [plug] date and time
Craig Ringer
craig at postnewspapers.com.au
Fri May 30 14:01:26 WST 2003
> Sorry Craig -- didn't see your reply earlier. Bernd's just brought it
> to my attention. Certainly looks attractive, will give it a go for
> sure. So on the "replay" side when you want to rebuild a server (or
> workstation) partition I presume you boot from a rescue floppy and
> reverse the process a la
> cp /dev/st0 /device/and/partition/to/restore ?
That's the idea, yeah. There are complications, for example each
partition on the new disk needs to be >= the size of the origin
partition. I've only done it with unmounted reiserfs volumes so far but
in theory it should work fine with any volume that's been properly
unmounted.
> Would "dd" have advantages or is "cp" safer because it makes no
> assumptions about good/bad sectors on the disk?
"dd" doesn't like character devices like tapes. If there's a way to
somehow "link" a block device to a char device like a tape, I'm
interested - but that's why I used cp.
$ ls -l /dev/scsi/host0/bus0/target0/lun0/mt
crw-rw---- 1 root tape 9, 0 Jan 1 1970
/dev/scsi/host0/bus0/target0/lun0/mt
If you're facing bad sectors, its probably too late for your data
anyway. I don't think either dd or cp will skip bad sectors (leaving a
hole in the image), both fail instead. Hmm... actually you can instruct
dd to skip bad sectors but I'm not sure if it'd work over NBD.
I've only used this a few times, so I can't yet say "its great, its
safe, it works perfectly" only that I've tested it successfully.
More information about the plug
mailing list