Skip to contentSkip to conversation

--ignorelockingfailure for `lvm mkvgnodes`

PATCH In review Tomasz Torcz 3 participants 3 messages Apr 3, 2005 – Apr 5, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 --ignorelockingfailure for `lvm mkvgnodes`

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.

Signature · 2 lines
Tomasz Torcz               "Never underestimate the bandwidth of a station
[email protected]    wagon filled with backup tapes." -- Jim Gray
tools/commands.h +4 -1
diff -ru LVM2.old/tools/commands.h LVM2.new/tools/commands.h
@@ -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",
#1 lore raw
Quoted 1 line · Tomasz Torcz

lvm vgmknodes needs --ignorevglocking

Agreed - though for different reasons (I won't go into here).

'vgscan --mknodes --ignorelockingfailure' is normally adequate, and looks to be so in your case?

Alasdair

Signature · 1 line
[email protected]
#2 lore raw
Quoted 7 lines · Alasdair G Kergon
Quoted 1 line · Tomasz Torcz

lvm vgmknodes needs --ignorevglocking

Agreed - though for different reasons (I won't go into here).

'vgscan --mknodes --ignorelockingfailure' is normally adequate, and looks to be so in your case?

so you mean
vgscan
vgchange -a y
vgscan --mknodes
???

Btw, i added man page to Tomasz patch

L.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \