[linux-lvm] moving a logical volume between servers
f-lvm at media.mit.edu
f-lvm at media.mit.edu
Wed Dec 5 03:11:25 UTC 2007
> Date: Tue, 4 Dec 2007 11:46:56 -0500 (EST)
> From: "Stuart D. Gathman" <stuart at bmsi.com>
> Oh, and once I reversed the src and dst :-( Now I have a co-worker check
> before I press enter.
See my PS.
> PS. It would be possible for LVM to flag PEs newly added to an LV as
> "uninitialized". Attempts to read uninitialized data could result in
> a read error. This would catch a lot of fat finger mistakes - if it
> didn't break too much stuff in the process. Maybe just flag the entire LV
> "write only" until the first write, and subsequent first reads would
> return zeroes for security reasons. There should be a flag to disable
> all this in case the LV is created for data recovery purposes.
Would it be possible to use "blockdev --setro" on the source volume,
so nothing (well, except things that bypass the kernel or whatever)
can write to it? I haven't tried this; is there a gotcha?
Of course, this assumes that something else isn't legitimately writing
to the source LV while you're copying it, but presumably that would
lead to a corrupted copy anyway and it'd be good to catch that early...
P.S. This is why I bitterly resent the disappearance of write-protect
switches when hard disks transitioned from being removable media (like
those washing-machine-sized 300MB drives with their 12-platter disks)
to integrated units. How hard could it -be- to put a write-protect
jumper on the disk, or have some IDE/SATA/etc command that will
-definitely- write-lock the disk and for which userspace tools
exist to manipulate this? [Yeah, yeah, I know that none of this
applies in an LVM context. But I've done my share of dd'ing whole
drives in the past.]
Lacking these, write-lock requires active (and relatively sophisticated)
electronics that can play man-in-the-middle on the cable. That's
expensive and prone to obsolescence, although it apparently is a
good moneymaker for companies selling such things to people who have
to do forensics on drives and be able to state in court that their
analysis system couldn't have written to it...
Not being able to write-lock disks means I've had to be very, very
careful in a number of situations when I wished I didn't have to worry
so much about shooting myself in the foot.
More information about the linux-lvm