All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] [PATCH] --ignorelockingfailure for `lvm mkvgnodes`
@ 2005-04-03 10:41 Tomasz Torcz
  2005-04-03 19:42 ` Alasdair G Kergon
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Torcz @ 2005-04-03 10:41 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]


 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@irc.-nie.spam-.pl    wagon filled with backup tapes." -- Jim Gray


[-- Attachment #2: vgmknodes-ignorelockingfailure.diff --]
[-- Type: text/plain, Size: 528 bytes --]

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",

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

* Re: [linux-lvm] [PATCH] --ignorelockingfailure for `lvm mkvgnodes`
  2005-04-03 10:41 [linux-lvm] [PATCH] --ignorelockingfailure for `lvm mkvgnodes` Tomasz Torcz
@ 2005-04-03 19:42 ` Alasdair G Kergon
  2005-04-05  6:56   ` Luca Berra
  0 siblings, 1 reply; 3+ messages in thread
From: Alasdair G Kergon @ 2005-04-03 19:42 UTC (permalink / raw)
  To: LVM general discussion and development

On Sun, Apr 03, 2005 at 12:41:58PM +0200, Tomasz Torcz wrote:
>  `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
-- 
agk@redhat.com

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

* Re: [linux-lvm] [PATCH] --ignorelockingfailure for `lvm mkvgnodes`
  2005-04-03 19:42 ` Alasdair G Kergon
@ 2005-04-05  6:56   ` Luca Berra
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Berra @ 2005-04-05  6:56 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

On Sun, Apr 03, 2005 at 08:42:07PM +0100, Alasdair G Kergon wrote:
>On Sun, Apr 03, 2005 at 12:41:58PM +0200, Tomasz Torcz wrote:
>>  `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.


-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

[-- Attachment #2: lvm2-ignorelock.patch.bz2 --]
[-- Type: application/octet-stream, Size: 633 bytes --]

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

end of thread, other threads:[~2005-04-05  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-03 10:41 [linux-lvm] [PATCH] --ignorelockingfailure for `lvm mkvgnodes` Tomasz Torcz
2005-04-03 19:42 ` Alasdair G Kergon
2005-04-05  6:56   ` Luca Berra

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.