/var/lock
On Mon, 03 Jan 2011, rud...@eq.cz wrote: > Adam Hamsik wrote: > >Modified Files: > > src/distrib/sets/lists/base: mi > > src/etc/mtree: NetBSD.dist.base > > > >Log Message: > >Add /var/lock directory to base set it's used by LVM and other tools. > >Change group owner to operator to enable LVM locking for him. > > Why is /var/run not the right place for your needs? Also, where was this discussed? If it was discussed, please update hier(7) according to the outcome of the discussion. --apb (Alan Barrett)
Re: /var/lock
On Jan,Monday 3 2011, at 1:21 PM, Alan Barrett wrote: > On Mon, 03 Jan 2011, rud...@eq.cz wrote: >> Adam Hamsik wrote: >>> Modified Files: >>> src/distrib/sets/lists/base: mi >>> src/etc/mtree: NetBSD.dist.base >>> >>> Log Message: >>> Add /var/lock directory to base set it's used by LVM and other tools. >>> Change group owner to operator to enable LVM locking for him. >> >> Why is /var/run not the right place for your needs? > > Also, where was this discussed? If it was discussed, please > update hier(7) according to the outcome of the discussion. It wasn't discussed, but there were couple of changes to dm driver not done by me which weren't discussed either. Main reason for them was to allow operator to see lvm devices status this was last change needed. I can change it to /var/run would be /var/run/locks/ better place for it ? Regards Adam.
Re: /var/lock
On Mon, Jan 03, 2011 at 02:46:31PM +0100, Adam Hamsik wrote: > > On Jan,Monday 3 2011, at 1:21 PM, Alan Barrett wrote: > > > On Mon, 03 Jan 2011, rud...@eq.cz wrote: > >> Adam Hamsik wrote: > >>> Modified Files: > >>> src/distrib/sets/lists/base: mi > >>> src/etc/mtree: NetBSD.dist.base > >>> > >>> Log Message: > >>> Add /var/lock directory to base set it's used by LVM and other tools. > >>> Change group owner to operator to enable LVM locking for him. > >> > >> Why is /var/run not the right place for your needs? > > > > Also, where was this discussed? If it was discussed, please > > update hier(7) according to the outcome of the discussion. > > It wasn't discussed, but there were couple of changes to dm driver not done > by me which weren't discussed either. Main reason for them was to allow > operator > to see lvm devices status this was last change needed. I can change it to > /var/run would be > /var/run/locks/ better place for it ? IMHO /var/run/lvm would be better since it is used by lvm. Bernd
Re: /var/lock
On Jan,Monday 3 2011, at 2:54 PM, Bernd Ernesti wrote: > On Mon, Jan 03, 2011 at 02:46:31PM +0100, Adam Hamsik wrote: >> >> On Jan,Monday 3 2011, at 1:21 PM, Alan Barrett wrote: >> >>> On Mon, 03 Jan 2011, rud...@eq.cz wrote: >>>> Adam Hamsik wrote: >>>>> Modified Files: >>>>> src/distrib/sets/lists/base: mi >>>>> src/etc/mtree: NetBSD.dist.base >>>>> >>>>> Log Message: >>>>> Add /var/lock directory to base set it's used by LVM and other tools. >>>>> Change group owner to operator to enable LVM locking for him. >>>> >>>> Why is /var/run not the right place for your needs? >>> >>> Also, where was this discussed? If it was discussed, please >>> update hier(7) according to the outcome of the discussion. >> >> It wasn't discussed, but there were couple of changes to dm driver not done >> by me which weren't discussed either. Main reason for them was to allow >> operator >> to see lvm devices status this was last change needed. I can change it to >> /var/run would be >> /var/run/locks/ better place for it ? > > IMHO /var/run/lvm would be better since it is used by lvm. It would end as /var/run/locks/lvm but I can remove that locks part if it's needed. Regards Adam.
Re: /var/lock
On Mon, 03 Jan 2011, Adam Hamsik wrote: > >>> Log Message: > >>> Add /var/lock directory to base set it's used by LVM and other tools. > >>> Change group owner to operator to enable LVM locking for him. > >> > >> Why is /var/run not the right place for your needs? > > > > Also, where was this discussed? If it was discussed, please > > update hier(7) according to the outcome of the discussion. > > It wasn't discussed, but there were couple of changes to dm driver > not done by me which weren't discussed either. Main reason for them > was to allow operator to see lvm devices status this was last change > needed. I can change it to /var/run would be /var/run/locks/ better > place for it ? If the locks do not need to persist across reboot, then somewhere under /var/run would probably be appropriate. If they are specific to lvm, then /var/run/lvm would probably be appropriate. Anything else (such as /var/lock or /var/run/lock) probably needs more discussion. --apb (Alan Barrett)
Re: /var/lock
On Jan,Monday 3 2011, at 4:08 PM, Alan Barrett wrote: > On Mon, 03 Jan 2011, Adam Hamsik wrote: >>>>> Log Message: >>>>> Add /var/lock directory to base set it's used by LVM and other tools. >>>>> Change group owner to operator to enable LVM locking for him. >>>> >>>> Why is /var/run not the right place for your needs? >>> >>> Also, where was this discussed? If it was discussed, please >>> update hier(7) according to the outcome of the discussion. >> >> It wasn't discussed, but there were couple of changes to dm driver >> not done by me which weren't discussed either. Main reason for them >> was to allow operator to see lvm devices status this was last change >> needed. I can change it to /var/run would be /var/run/locks/ better >> place for it ? > > If the locks do not need to persist across reboot, then somewhere under > /var/run would probably be appropriate. If they are specific to lvm, > then /var/run/lvm would probably be appropriate. Anything else (such as > /var/lock or /var/run/lock) probably needs more discussion. I would like to have something persistent between reboots. I have found that we already have /var/spool/lock. Therefore /var/spool/lock/lvm/ seems to be might preferred place. Do you agree ? Also /var/spool/lock is not mentioned in hier. Regards Adam.
Re: /var/lock
Hi, In message on Tue, 4 Jan 2011 02:46:17 +0100, Adam Hamsik wrote: > I would like to have something persistent between reboots. I have found > that we already have /var/spool/lock. Therefore /var/spool/lock/lvm/ > seems to be might preferred place. Do you agree ? Also /var/spool/lock > is not mentioned in hier. Are they really *lock* files? Anywaym I think it should be /var/db/lvm for them unless those files are temporary files like printer outputs. Best regards. -- Takahiro Kambe
Re: /var/lock
On Jan,Tuesday 4 2011, at 2:51 AM, Takahiro Kambe wrote: > Hi, > > In message > on Tue, 4 Jan 2011 02:46:17 +0100, > Adam Hamsik wrote: >> I would like to have something persistent between reboots. I have found >> that we already have /var/spool/lock. Therefore /var/spool/lock/lvm/ >> seems to be might preferred place. Do you agree ? Also /var/spool/lock >> is not mentioned in hier. > Are they really *lock* files? It's lvm subsystem lock file. Does it need to be specific in any way ? > > Anywaym I think it should be /var/db/lvm for them unless those files > are temporary files like printer outputs. So we have these options: 1) /var/lock/lvm -> needs much more discussion 2) /var/spool/lock/lvm 3) /var/run/lvm -> not persistent, it needs to be recreated every time 4) /var/db/lvm What would you prefer ? Regards Adam.
Re: /var/lock
On Jan 3, 2011, at 5:58 PM, Adam Hamsik wrote: > On Jan,Tuesday 4 2011, at 2:51 AM, Takahiro Kambe wrote: > So we have these options: > > 1) /var/lock/lvm -> needs much more discussion > 2) /var/spool/lock/lvm > 3) /var/run/lvm -> not persistent, it needs to be recreated every time > 4) /var/db/lvm > > What would you prefer ? /var/run/lvm.lock if you just need a single lock file.
Re: /var/lock
In message on Tue, 4 Jan 2011 02:58:18 +0100, Adam Hamsik wrote: >> Are they really *lock* files? > > It's lvm subsystem lock file. Does it need to be specific in any way ? I want to know just life time of the lock file(s), including the file is single one or multiple one. When it would be removed? -- Takahiro Kambe
Re: /var/lock
On Tue, Jan 04, 2011 at 02:58:18AM +0100, Adam Hamsik wrote: > > Are they really *lock* files? > > It's lvm subsystem lock file. Does it need to be specific in any way ? If it's really a lock file that may need to persist across reboots, then > 2) /var/spool/lock/lvm is the right place. -- David A. Holland dholl...@netbsd.org
Re: /var/lock
On Tue, 04 Jan 2011, Adam Hamsik wrote: > > Are they really *lock* files? > > It's lvm subsystem lock file. Does it need to be specific in any way ? Does it need to persist across reboot? > So we have these options: > > 1) /var/lock/lvm -> needs much more discussion > 2) /var/spool/lock/lvm > 3) /var/run/lvm -> not persistent, it needs to be recreated every time > 4) /var/db/lvm > > What would you prefer ? For state that should be reset on each boot, including locks, /var/run is probably appropriate. For persistent state, including locks that must not be broken on reboot, /var/db may be appropriate, but then you have to worry about the machine coming up with a different disk configuration. --apb (Alan Barrett)
Re: /var/lock
On Tue, Jan 04, 2011 at 05:23:08 +, David Holland wrote: > On Tue, Jan 04, 2011 at 02:58:18AM +0100, Adam Hamsik wrote: > > > Are they really *lock* files? > > > > It's lvm subsystem lock file. Does it need to be specific in any way ? > > If it's really a lock file that may need to persist across reboots, then > > > 2) /var/spool/lock/lvm > > is the right place. Ugh. What does it have to do with spooling? -uwe
Re: /var/lock
On Tue, 04 Jan 2011, Adam Hamsik wrote: > I would like to have something persistent between reboots. I > have found that we already have /var/spool/lock. Therefore > /var/spool/lock/lvm/ seems to be might preferred place. Do you agree ? I had forgotten about /var/spool/lock; it's been a long time since I used UUCP. Given that it exists, /var/spool/lock/lvm seems fine. > Also /var/spool/lock is not mentioned in hier. That should be fixed. --apb (Alan Barrett)
Re: /var/lock
On Tue, Jan 04, 2011 at 11:46:34AM +0300, Valeriy E. Ushakov wrote: > > > 2) /var/spool/lock/lvm > > > > is the right place. > > Ugh. What does it have to do with spooling? What do any locks have to do with spooling? Historically, /var/spool is for "stuff". Since then lots of things traditionally in /var/spool have been moved into /var, like /var/cron, /var/at, /var/rwho, and so forth, mostly for no clear reason but I guess because they don't have anything to do with "spooling", whatever that means. Anyway, the reason this whole thread started out with /var/lock is that the Linux world apparently also did this with /var/spool/lock. -- David A. Holland dholl...@netbsd.org
Re: /var/lock
On Jan,Tuesday 4 2011, at 8:56 AM, Alan Barrett wrote: > On Tue, 04 Jan 2011, Adam Hamsik wrote: >> I would like to have something persistent between reboots. I >> have found that we already have /var/spool/lock. Therefore >> /var/spool/lock/lvm/ seems to be might preferred place. Do you agree ? > > I had forgotten about /var/spool/lock; it's been a long time since I > used UUCP. Given that it exists, /var/spool/lock/lvm seems fine. > >> Also /var/spool/lock is not mentioned in hier. > > That should be fixed. Ok I will change it to /var/spool/lock/lvm tomorrow and I will update hier to mention those directories, too. Is that ok ? Regards Adam.
Re: /var/lock
On Tue, Jan 04, 2011 at 19:43:49 +, David Holland wrote: > On Tue, Jan 04, 2011 at 11:46:34AM +0300, Valeriy E. Ushakov wrote: > > > > 2) /var/spool/lock/lvm > > > > > > is the right place. > > > > Ugh. What does it have to do with spooling? > > What do any locks have to do with spooling? Historically, /var/spool > is for "stuff". Since then lots of things traditionally in /var/spool > have been moved into /var, like /var/cron, /var/at, /var/rwho, and so > forth, mostly for no clear reason but I guess because they don't have > anything to do with "spooling", whatever that means. > > Anyway, the reason this whole thread started out with /var/lock is > that the Linux world apparently also did this with /var/spool/lock. But our /var/spool/lock is specifically uucp's lockdir (uucp/daemon). Creating lvm subdir beneath is (owned by operator) feels monumentally gross. RHEL5 I have at work has /var/lock, with /var/lock/uucp being equivalent of our /var/spool/lock. -uwe
Re: /var/lock
On Tue, Jan 04, 2011 at 23:41:00 +0100, Adam Hamsik wrote: > Subject: Re: /var/lock > From: Adam Hamsik > Date: Tue, 4 Jan 2011 23:41:00 +0100 > Cc: source-changes-d@NetBSD.org > To: Alan Barrett > > > On Jan,Tuesday 4 2011, at 8:56 AM, Alan Barrett wrote: > > > On Tue, 04 Jan 2011, Adam Hamsik wrote: > >> I would like to have something persistent between reboots. I > >> have found that we already have /var/spool/lock. Therefore > >> /var/spool/lock/lvm/ seems to be might preferred place. Do you agree ? > > > > I had forgotten about /var/spool/lock; it's been a long time since I > > used UUCP. Given that it exists, /var/spool/lock/lvm seems fine. > > > >> Also /var/spool/lock is not mentioned in hier. > > > > That should be fixed. > > Ok I will change it to /var/spool/lock/lvm tomorrow and I will update > hier to mention those directories, too. Is that ok ? IMO, no. As I explained upthread, our /var/spool/lock is specifically for uucp, see its permissions. Please don't create /var/spool/lock/lvm -uwe
Re: /var/lock
On Jan,Wednesday 5 2011, at 12:13 AM, Valeriy E. Ushakov wrote: > On Tue, Jan 04, 2011 at 23:41:00 +0100, Adam Hamsik wrote: >> Subject: Re: /var/lock >> From: Adam Hamsik >> Date: Tue, 4 Jan 2011 23:41:00 +0100 >> Cc: source-changes-d@NetBSD.org >> To: Alan Barrett >> >> >> On Jan,Tuesday 4 2011, at 8:56 AM, Alan Barrett wrote: >> >>> On Tue, 04 Jan 2011, Adam Hamsik wrote: >>>> I would like to have something persistent between reboots. I >>>> have found that we already have /var/spool/lock. Therefore >>>> /var/spool/lock/lvm/ seems to be might preferred place. Do you agree ? >>> >>> I had forgotten about /var/spool/lock; it's been a long time since I >>> used UUCP. Given that it exists, /var/spool/lock/lvm seems fine. >>> >>>> Also /var/spool/lock is not mentioned in hier. >>> >>> That should be fixed. >> >> Ok I will change it to /var/spool/lock/lvm tomorrow and I will update >> hier to mention those directories, too. Is that ok ? > > IMO, no. As I explained upthread, our /var/spool/lock is specifically > for uucp, see its permissions. > > Please don't create /var/spool/lock/lvm Then please suggest another directory which is persistent between reboots and others are willing to accept it. Regards Adam.
Re: /var/lock
On Wed, Jan 05, 2011 at 00:43:11 +0100, Adam Hamsik wrote: > On Jan,Wednesday 5 2011, at 12:13 AM, Valeriy E. Ushakov wrote: > > > On Tue, Jan 04, 2011 at 23:41:00 +0100, Adam Hamsik wrote: > > > >> Ok I will change it to /var/spool/lock/lvm tomorrow and I will update > >> hier to mention those directories, too. Is that ok ? > > > > IMO, no. As I explained upthread, our /var/spool/lock is specifically > > for uucp, see its permissions. > > > > Please don't create /var/spool/lock/lvm > > Then please suggest another directory which is persistent between > reboots and others are willing to accept it. I have no idea what lvm locks are and what are they for and I don't remember you ever epxlained that in this thread. You also never explained why you ... would like to have something persistent between reboots. So, does lvm requre locks to persist reboots or not for correct operation? lvm.conf(5) says ... use flocks on files in locking_dir ... to avoid conflicting LVM2 commands running concurrently on a single machine. and flocks don't persist across reboots. -uwe
Re: /var/lock
On Mon, Jan 3, 2011 at 1:21 PM, Alan Barrett wrote: > On Mon, 03 Jan 2011, rud...@eq.cz wrote: >> Adam Hamsik wrote: >> >Modified Files: >> > src/distrib/sets/lists/base: mi >> > src/etc/mtree: NetBSD.dist.base >> > >> >Log Message: >> >Add /var/lock directory to base set it's used by LVM and other tools. >> >Change group owner to operator to enable LVM locking for him. >> >> Why is /var/run not the right place for your needs? > > Also, where was this discussed? If it was discussed, please > update hier(7) according to the outcome of the discussion. Ok I have commited fix for this. lvm tools now use /var/run/lvm directory for locks. I have patched mountcritlocal to create this dir for us, that wya it works for everyone in every case. -- Regards. Adam
Re: /var/lock
On Wed, Jan 05, 2011 at 02:09:16AM +0300, Valeriy E. Ushakov wrote: > > Anyway, the reason this whole thread started out with /var/lock is > > that the Linux world apparently also did this with /var/spool/lock. > > But our /var/spool/lock is specifically uucp's lockdir (uucp/daemon). > Creating lvm subdir beneath is (owned by operator) feels monumentally > gross. Bleh. Yeah, ok, I dunno then. Adding /var/lock seems like a decent approach (and maybe we should get rid of /var/spool/lock, since we removed base uucp quite a whle back...) -- David A. Holland dholl...@netbsd.org