Re: Avoiding disk changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-10-04 at 15:10 -0400, John Ward wrote:
> Question regarding disk changes for LVMs. Are there any known scenarios 
> where the on disk information will change (automatically) after the 
> device(s) are detected and probed by the system?
> 
> My scenario is, I want to plug my LVM drive(s) into a different machine 
> (via external USB) for analysis. I want the drives to remain 100% 
> unmodified.
> 
> I would like to setup my configuration such that no disk changes will 
> occur.  Does anything within the LVM or DM realm modify the on-disk 
> metadata under normal circumstances, or if a corrupted/broken LVM scheme 
> is detected (partial or bad disk, etc.)?
> 
> In an attempt to gain absolute control over the detection and mounting 
> process, I've set the global configuration file to test mode:
> 
> /etc/lvm/lvm.conf:
> ...
> global {
> ...
> 	test = 1
> ...
> 
> 
> After that, once I plug my device in, I set the LVM_SYSTEM_DIR env 
> variable to point to my own configuration (because I don't want to 
> twiddle with the system-wide one anymore than I have to).
> 
> I then use "vgchange --partial -a y" to access the new device, and 
> create the /dev nodes.
> 
> In my custom lvm.conf (located in the $LVM_SYSTEM_DIR) I've set a few 
> paranoid settings, including:
> 
> 	filter = ... (only accept /dev/sd* devices)
> 	write_cache_state = 0
> 	backup = 0
> 	archive = 0
> 	locking_type = 0
> 
> 	Setting test mode in this configuration wasn't allowing me to do the 
> vgchange, so I left that off.
> 
> Hope this isn't too open ended of a question, short if diving into the 
> source code, I've tried to research to what extent LVM might 
> automatically twiddle bits on the drive.
> 
> Thanks in advance.

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

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux