* [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? @ 2013-09-09 18:51 gottlieb 2013-09-09 18:59 ` Canek Peláez Valdés 0 siblings, 1 reply; 9+ messages in thread From: gottlieb @ 2013-09-09 18:51 UTC (permalink / raw To: gentoo-user I use lvm and use it for /var. In fstab I have /dev/vg/var /mnt/var ext4 defaults 0 2 I also have lrwxrwxrwx 1 root root 7 Aug 31 16:13 /var -> mnt/var (Similar setup for /tmp and /opt) This has worked ok but revdep-rebuild is not happy root@E6510 cache # revdep-rebuild * Configuring search environment for revdep-rebuild * Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/var/cache/revdep-rebuild root@E6510 cache # I don't intend to fight revdep-rebuild so will change and mount directly onto /var, but I wonder what is the concern. Should I also mount directly onto /tmp and /opt? thanks, allan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-09 18:51 [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? gottlieb @ 2013-09-09 18:59 ` Canek Peláez Valdés 2013-09-09 22:26 ` gottlieb 0 siblings, 1 reply; 9+ messages in thread From: Canek Peláez Valdés @ 2013-09-09 18:59 UTC (permalink / raw To: gentoo-user On Mon, Sep 9, 2013 at 1:51 PM, <gottlieb@nyu.edu> wrote: > I use lvm and use it for /var. > In fstab I have > /dev/vg/var /mnt/var ext4 defaults 0 2 > I also have > lrwxrwxrwx 1 root root 7 Aug 31 16:13 /var -> mnt/var > > (Similar setup for /tmp and /opt) > > This has worked ok but revdep-rebuild is not happy > > root@E6510 cache # revdep-rebuild > * Configuring search environment for revdep-rebuild > * Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/var/cache/revdep-rebuild > root@E6510 cache # > > I don't intend to fight revdep-rebuild so will change and mount directly > onto /var, but I wonder what is the concern. I think it's the symlink the thing that is making revdep-rebuild unhappy. Have you tried to bind mount /mnt/var into /var? mount -o bind /mnt/var /var Perhaps that will appease revdep-rebuild. > Should I also mount directly onto /tmp and /opt? I don't think so, although /tmp is preferred to be a tmpfs now, I believe (in both systemd and OpenRC, if I'm not mistaken). Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-09 18:59 ` Canek Peláez Valdés @ 2013-09-09 22:26 ` gottlieb 2013-09-09 22:44 ` Alan McKinnon 0 siblings, 1 reply; 9+ messages in thread From: gottlieb @ 2013-09-09 22:26 UTC (permalink / raw To: gentoo-user On Mon, Sep 09 2013, Canek Peláez Valdés wrote: > On Mon, Sep 9, 2013 at 1:51 PM, <gottlieb@nyu.edu> wrote: >> In fstab I have >> /dev/vg/var /mnt/var ext4 defaults 0 2 >> I also have >> lrwxrwxrwx 1 root root 7 Aug 31 16:13 /var -> mnt/var >> >> This has worked ok but revdep-rebuild is not happy > > I think it's the symlink the thing that is making revdep-rebuild > unhappy. Have you tried to bind mount /mnt/var into /var? > > mount -o bind /mnt/var /var Works great. Thanks. To make it permanent I put /mnt/var /var ext4 bind 0 0 right under /dev/vg/var /mnt/var ext4 defaults 0 2 in /etc/fstab >> Should I also mount directly onto /tmp and /opt? > > I don't think so, although /tmp is preferred to be a tmpfs now, I > believe (in both systemd and OpenRC, if I'm not mistaken). To use tmpfs I will first have to teach myself not to put things in /tmp that I expect to need for only a few days (I have wipe_tmp="NO"; and use 30 days for tmpwatch). thanks again, allan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-09 22:26 ` gottlieb @ 2013-09-09 22:44 ` Alan McKinnon 2013-09-10 16:57 ` gottlieb 0 siblings, 1 reply; 9+ messages in thread From: Alan McKinnon @ 2013-09-09 22:44 UTC (permalink / raw To: gentoo-user On 10/09/2013 00:26, gottlieb@nyu.edu wrote: > On Mon, Sep 09 2013, Canek Peláez Valdés wrote: > >> On Mon, Sep 9, 2013 at 1:51 PM, <gottlieb@nyu.edu> wrote: >>> In fstab I have >>> /dev/vg/var /mnt/var ext4 defaults 0 2 >>> I also have >>> lrwxrwxrwx 1 root root 7 Aug 31 16:13 /var -> mnt/var >>> >>> This has worked ok but revdep-rebuild is not happy >> >> I think it's the symlink the thing that is making revdep-rebuild >> unhappy. Have you tried to bind mount /mnt/var into /var? >> >> mount -o bind /mnt/var /var > > Works great. Thanks. To make it permanent I put > /mnt/var /var ext4 bind 0 0 > right under > /dev/vg/var /mnt/var ext4 defaults 0 2 > in /etc/fstab I'm curious as to why you do that, I can't see any benefit at all. The "var" filesystem is an LV and is only useful if it is mounted at /var where packages expect it to be. Why add the extra complexity of mounting it somewhere else and then bind mounting it to the pnly place it can be useful? If you really want a bind mount (to for example work with only that filesystem's objects and not have to deal with submounts below /var), why not just mount the LV directly at /var and bind mount it to /mnt/var? I'm assuming you do this for backup purposes or similar - some really dumb backup software out there can't detect when it crosses a mount point (I know this because I've had to deal with idiots who purchase such software and have the power to insist I use it...) If so, why not have your backup script mount the fs in /mnt, and umount it when done? > >>> Should I also mount directly onto /tmp and /opt? >> >> I don't think so, although /tmp is preferred to be a tmpfs now, I >> believe (in both systemd and OpenRC, if I'm not mistaken). > > To use tmpfs I will first have to teach myself not to put things in /tmp > that I expect to need for only a few days (I have wipe_tmp="NO"; and use > 30 days for tmpwatch). There's rules of thumb about this that will always work: No object in /tmp can be expected to survive successive invocations of the program that created the object, and never survive a reboot; No object in /var/tmp can be expected to survive a reboot The best place for temp files, ironically, is ~ -- Alan McKinnon alan.mckinnon@gmail.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-09 22:44 ` Alan McKinnon @ 2013-09-10 16:57 ` gottlieb 2013-09-10 21:23 ` Alan McKinnon 0 siblings, 1 reply; 9+ messages in thread From: gottlieb @ 2013-09-10 16:57 UTC (permalink / raw To: gentoo-user On Mon, Sep 09 2013, Alan McKinnon wrote: > On 10/09/2013 00:26, gottlieb@nyu.edu wrote: >> On Mon, Sep 09 2013, Canek Peláez Valdés wrote: >> >>> On Mon, Sep 9, 2013 at 1:51 PM, <gottlieb@nyu.edu> wrote: >>>> In fstab I have >>>> /dev/vg/var /mnt/var ext4 defaults 0 2 >>>> I also have >>>> lrwxrwxrwx 1 root root 7 Aug 31 16:13 /var -> mnt/var >>>> >>>> This has worked ok but revdep-rebuild is not happy >>> >>> I think it's the symlink the thing that is making revdep-rebuild >>> unhappy. Have you tried to bind mount /mnt/var into /var? >>> >>> mount -o bind /mnt/var /var >> >> Works great. Thanks. To make it permanent I put >> /mnt/var /var ext4 bind 0 0 >> right under >> /dev/vg/var /mnt/var ext4 defaults 0 2 >> in /etc/fstab > > I'm curious as to why you do that, I can't see any benefit at all. > > The "var" filesystem is an LV and is only useful if it is mounted at > /var where packages expect it to be. Why add the extra complexity of > mounting it somewhere else and then bind mounting it to the pnly place > it can be useful? An old habit/belief that mounts go in /mnt. Since both revdep-rebuild and you believe this is a bad habit, I now mount directly on /var /opt. > There's rules of thumb about this that will always work: > > No object in /tmp can be expected to survive successive invocations of > the program that created the object, and never survive a reboot; > No object in /var/tmp can be expected to survive a reboot > > The best place for temp files, ironically, is ~ I set tmpwatch and wipe_tmp so that files survive in /tmp and /var/tmp for a month. I don't like ~ for temp files since on some, admittedly rare, occasions I actually use the gnome gui file manager and don't want a huge ~. I have long ago created ~/tmp (also cleaned after a month by tmpwatch) so the only problem is breaking the habit of placing short-term files in /tmp instead of ~/tmp. I realize that habit is bad for my (system's) health, but still find it hard to break. I shall try again. Perhaps this is very mild form of what intelligent smokers feel :-). allan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-10 16:57 ` gottlieb @ 2013-09-10 21:23 ` Alan McKinnon 2013-09-11 2:02 ` gottlieb 0 siblings, 1 reply; 9+ messages in thread From: Alan McKinnon @ 2013-09-10 21:23 UTC (permalink / raw To: gentoo-user On 10/09/2013 18:57, gottlieb@nyu.edu wrote: >> I'm curious as to why you do that, I can't see any benefit at all. >> > >> > The "var" filesystem is an LV and is only useful if it is mounted at >> > /var where packages expect it to be. Why add the extra complexity of >> > mounting it somewhere else and then bind mounting it to the pnly place >> > it can be useful? > An old habit/belief that mounts go in /mnt. Since both revdep-rebuild > and you believe this is a bad habit, I now mount directly on /var /opt. Ah, OK. Technically a mount can go anywhere. Permanent mounts just go where they are supposed to go, and /mnt was a throwback to the bad old days where everything else was mounted at /mnt/<something>, including cdroms, filesystems you wanted to access quickly, windows partitions on a dual boot machine etc etc. or the gentoo partition during install before your chroot Then removeable media started being mounted in /media where the GUI could manage it and not have to deal with root-only permissions in /mnt Nowadays media goes in /run/media.... All very confusing and hard to keep up with. It's like trying to figure out what politicians and your boss happen to be talking about today :-) > >> > There's rules of thumb about this that will always work: >> > >> > No object in /tmp can be expected to survive successive invocations of >> > the program that created the object, and never survive a reboot; >> > No object in /var/tmp can be expected to survive a reboot >> > >> > The best place for temp files, ironically, is ~ > I set tmpwatch and wipe_tmp so that files survive in /tmp and /var/tmp > for a month. > > I don't like ~ for temp files since on some, admittedly rare, occasions > I actually use the gnome gui file manager and don't want a huge ~. I > have long ago created ~/tmp (also cleaned after a month by tmpwatch) so > the only problem is breaking the habit of placing short-term files in > /tmp instead of ~/tmp. OK, I get it. I'd write all that temp stuff to /var/tmp so it doesn't get nuked by something cleverly trying to manage /tmp. I often feel the same way about ~/.xsession-errors. I have to restrain myself from symlinking it to /dev/null :-) > I realize that habit is bad for my (system's) health, but still find it > hard to break. I shall try again. Perhaps this is very mild form of > what intelligent smokers feel :-). There is no such thing as an intelligent smoker; there are only stupid smokers :-) I'm a two-packs-a-day man myself, I speak from many years experience! -- Alan McKinnon alan.mckinnon@gmail.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-10 21:23 ` Alan McKinnon @ 2013-09-11 2:02 ` gottlieb 2013-09-11 7:23 ` Alan McKinnon 0 siblings, 1 reply; 9+ messages in thread From: gottlieb @ 2013-09-11 2:02 UTC (permalink / raw To: gentoo-user On Tue, Sep 10 2013, Alan McKinnon wrote: > On 10/09/2013 18:57, gottlieb@nyu.edu wrote: > >> Alan McKinnon wrote: >>> > There's rules of thumb about this that will always work: >>> > >>> > No object in /tmp can be expected to survive successive invocations of >>> > the program that created the object, and never survive a reboot; >>> > No object in /var/tmp can be expected to survive a reboot >>> > >>> > The best place for temp files, ironically, is ~ >> I set tmpwatch and wipe_tmp so that files survive in /tmp and /var/tmp >> for a month. >> >> I don't like ~ for temp files since on some, admittedly rare, occasions >> I actually use the gnome gui file manager and don't want a huge ~. I >> have long ago created ~/tmp (also cleaned after a month by tmpwatch) so >> the only problem is breaking the habit of placing short-term files in >> /tmp instead of ~/tmp. > > OK, I get it. I'd write all that temp stuff to /var/tmp so it doesn't > get nuked by something cleverly trying to manage /tmp. But A. McKinnon says (above) that an always valid rule of thumb is "No object in /var/tmp can be expected to survive a reboot". >> I realize that habit is bad for my (system's) health, but still find it >> hard to break. I shall try again. Perhaps this is very mild form of >> what intelligent smokers feel :-). > > There is no such thing as an intelligent smoker; there are only stupid > smokers :-) > > I'm a two-packs-a-day man myself, I speak from many years experience! I promise not to mention it again, but you really should quit. I consider one of my contributions to computer architecture is being at least a little influential in getting Per Stenstrom to quit. At the time he was a rising star, who I felt would contribute greatly if he didn't get sick from the cigs. He did quit and has certainly contributed. allan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-11 2:02 ` gottlieb @ 2013-09-11 7:23 ` Alan McKinnon 2013-09-11 14:17 ` gottlieb 0 siblings, 1 reply; 9+ messages in thread From: Alan McKinnon @ 2013-09-11 7:23 UTC (permalink / raw To: gentoo-user On 11/09/2013 04:02, gottlieb@nyu.edu wrote: > On Tue, Sep 10 2013, Alan McKinnon wrote: > >> On 10/09/2013 18:57, gottlieb@nyu.edu wrote: >> >>> Alan McKinnon wrote: > >>>>> There's rules of thumb about this that will always work: >>>>> >>>>> No object in /tmp can be expected to survive successive invocations of >>>>> the program that created the object, and never survive a reboot; >>>>> No object in /var/tmp can be expected to survive a reboot >>>>> >>>>> The best place for temp files, ironically, is ~ >>> I set tmpwatch and wipe_tmp so that files survive in /tmp and /var/tmp >>> for a month. >>> >>> I don't like ~ for temp files since on some, admittedly rare, occasions >>> I actually use the gnome gui file manager and don't want a huge ~. I >>> have long ago created ~/tmp (also cleaned after a month by tmpwatch) so >>> the only problem is breaking the habit of placing short-term files in >>> /tmp instead of ~/tmp. >> >> OK, I get it. I'd write all that temp stuff to /var/tmp so it doesn't >> get nuked by something cleverly trying to manage /tmp. > > But A. McKinnon says (above) that an always valid rule of thumb is > "No object in /var/tmp can be expected to survive a reboot". There's another rule of thumb that's even more applicable: "We always do it this way, except when we don't" I use this to great effect all the time, usually when I'm determined to get my own way at work. I highly recommend this approach, when used with a good healthy dose of intelligence you can get awesome things done :-) > >>> I realize that habit is bad for my (system's) health, but still find it >>> hard to break. I shall try again. Perhaps this is very mild form of >>> what intelligent smokers feel :-). >> >> There is no such thing as an intelligent smoker; there are only stupid >> smokers :-) >> >> I'm a two-packs-a-day man myself, I speak from many years experience! > > I promise not to mention it again, but you really should quit. > > I consider one of my contributions to computer architecture is being at > least a little influential in getting Per Stenstrom to quit. At the > time he was a rising star, who I felt would contribute greatly if he > didn't get sick from the cigs. He did quit and has certainly > contributed. You are correct of course, and I have no sensible answer for that :-) The one answer I do have is "see earlier comment 8 paragraphs above" -- Alan McKinnon alan.mckinnon@gmail.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? 2013-09-11 7:23 ` Alan McKinnon @ 2013-09-11 14:17 ` gottlieb 0 siblings, 0 replies; 9+ messages in thread From: gottlieb @ 2013-09-11 14:17 UTC (permalink / raw To: gentoo-user On Wed, Sep 11 2013, Alan McKinnon wrote: >>> OK, I get it. I'd write all that temp stuff to /var/tmp so it doesn't >>> get nuked by something cleverly trying to manage /tmp. >> >> But A. McKinnon says (above) that an always valid rule of thumb is >> "No object in /var/tmp can be expected to survive a reboot". > > There's another rule of thumb that's even more applicable: > > "We always do it this way, except when we don't" > Now I understand. Amazing what you learn from this group. allan ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-09-11 14:17 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-09 18:51 [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? gottlieb 2013-09-09 18:59 ` Canek Peláez Valdés 2013-09-09 22:26 ` gottlieb 2013-09-09 22:44 ` Alan McKinnon 2013-09-10 16:57 ` gottlieb 2013-09-10 21:23 ` Alan McKinnon 2013-09-11 2:02 ` gottlieb 2013-09-11 7:23 ` Alan McKinnon 2013-09-11 14:17 ` gottlieb
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox