linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Avoiding disk changes
@ 2006-10-04 19:10 John Ward
  2006-10-05 10:36 ` Fabien Jakimowicz
  0 siblings, 1 reply; 4+ messages in thread
From: John Ward @ 2006-10-04 19:10 UTC (permalink / raw)
  To: linux-lvm

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [linux-lvm] Avoiding disk changes
@ 2006-10-05 13:22 John Ward
  2006-10-05 17:22 ` David Brown
  0 siblings, 1 reply; 4+ messages in thread
From: John Ward @ 2006-10-05 13:22 UTC (permalink / raw)
  To: linux-lvm

> 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.

That's why I'm most interested in determining what (if anything) a LVM 
configuration does ... especially in situations where it detects a 
bad/repairable configuration (if that even makes sense).

Regardless, I'll do some experimenting - not sure if there are going to 
be any limitations with hdparm and configuring my disks via a USB adapter.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-05 17:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-04 19:10 [linux-lvm] Avoiding disk changes John Ward
2006-10-05 10:36 ` Fabien Jakimowicz
  -- strict thread matches above, loose matches on Subject: below --
2006-10-05 13:22 John Ward
2006-10-05 17:22 ` David Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).