lvm, config and commandline

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

 



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>)?

_______________________________________________
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