[linux-lvm] Avoiding disk changes

David Brown lvm at davidb.org
Thu Oct 5 17:22:21 UTC 2006


John Ward wrote:

>> Try to use hdparm to set your hard-drive in read-only mode.

> Interesting suggestion, certainly shouldn't hurt.  But AFAIK the device
> mapper runs in the kernel and it's going to do it's "own thing" before I
> get a chance to hdparm it.

The device mapper runs in the kernel, but it has no knowledge of the lvm
structures.  This is all done at user level.

I've forgotten in the thread whether or not this is a removable device.  If
it is, you can plug it in after startup, hdparm if that makes you more
comfortable, and then rescan for physical volumes.  If it is a more
permanently attached volume, you might have to modify the OS's startup
scripts to achieve this.

Perhaps you should use a CD-bootable rescue system (I recommend RIP Linux).
At least RIP boots up, and you have to start LVM manually, which would give
you a chance run hdparm and make it read only.

Dave Brown




More information about the linux-lvm mailing list