[linux-lvm] [PATCH] --ignorelockingfailure for `lvm mkvgnodes`

Tomasz Torcz zdzichu at irc.pl
Sun Apr 3 10:41:58 UTC 2005


 Hi,

 `lvm vgmknodes` needs --ignorevglocking. Consider following scenario:
- just after initrd finishes, everything is activated
- /dev is mount as tmpfs, read-write, managed by udev
- other filesystem hovewer are mounted read-only
  - /var could be not mounted at all!

- filesystem are going to be remounted rw after fsck. But fsck won't
  run, as there are LVM nodes missing from /dev. fsck error == fatal
  condition
- lvm vgmknodes won't run, because it can't obtain lock in /var. But
  should work, as /dev is writable

 Attached trivial patch adds --ignorelockingfailure to vgmknodes. It is
pretty safe.

 I've ecnountered above scenario on Slackware system during migration to
LVM2.

-- 
Tomasz Torcz               "Never underestimate the bandwidth of a station
zdzichu at irc.-nie.spam-.pl    wagon filled with backup tapes." -- Jim Gray

-------------- next part --------------
diff -ru LVM2.old/tools/commands.h LVM2.new/tools/commands.h
--- LVM2.old/tools/commands.h	2005-04-03 12:08:05.000000000 +0200
+++ LVM2.new/tools/commands.h	2005-04-03 12:29:17.000000000 +0200
@@ -717,9 +717,12 @@
    "vgmknodes\n"
    "\t[-d|--debug]\n"
    "\t[-h|--help]\n"
+   "\t[--ignorelockingfailure]\n"
    "\t[-v|--verbose]\n"
    "\t[--version]" "\n"
-   "\t[VolumeGroupName...]\n" )
+   "\t[VolumeGroupName...]\n",
+
+   ignorelockingfailure_ARG)
 
 xx(vgreduce,
    "Remove physical volume(s) from a volume group",


More information about the linux-lvm mailing list