All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] lvm, config and commandline
@ 2011-01-27  9:37 xake
  2011-01-27 16:24 ` Milan Broz
  0 siblings, 1 reply; 5+ messages in thread
From: xake @ 2011-01-27  9:37 UTC (permalink / raw)
  To: linux-lvm

I have a system with a script at bootup currently running something like
"lvm pvscan && lvm vgscan && lvm vgchange -ay" all with the option
"--config 'global { locking_dir = "/dev/.lvm" }'" since when the script
runs /var/lock is not in a writeable state. --ignorelockingfailures is
fine, but gives a message on stderr I do not want, but I still want to get
other error messages so "2>/dev/null" is not an option.

I realized however that if I run this as a script using lvm as interpreter
(running lvm once and the commands inside of lvm) I cut the time for this
script in half.

But with that I have the following problem:

# echo "pvscan --config 'global { locking_dir = "/dev/.lvm" }'" | lvm
/dev/stdin
lvm> pvscan --config 'global { locking_dir = /dev/.lvm }'
  Parse error at byte 1 (line 1): unexpected token
  Failed to set overridden configuration entries.


I want this:
# lvm pvscan --config 'global { locking_dir = "/dev/.lvm" }'
  PV /dev/sde1      VG lillen-home   lvm2 [698,63 GiB / 0    free]
  PV /dev/md126p1   VG lillen        lvm2 [596,18 GiB / 27,18 GiB free]
  Total: 2 [1,26 TiB] / in use: 2 [1,26 TiB] / in no VG: 0 [0   ]


So how do I pass --config inside of lvm and still have it able to parse it?
Also, would it not also make sens to have --config an option working
directly on lvm (something like "lvm --config "something" <command>)?

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

end of thread, other threads:[~2011-01-28  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27  9:37 [linux-lvm] lvm, config and commandline xake
2011-01-27 16:24 ` Milan Broz
2011-01-27 17:55   ` xake
2011-01-27 21:34     ` Milan Broz
2011-01-28  8:53       ` Peter Hjalmarsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.