Gentoo Archives: gentoo-user

From: gottlieb@×××.edu
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ?
Date: Tue, 10 Sep 2013 16:57:30
Message-Id: 87sixcd389.fsf@nyu.edu
In Reply to: Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? by Alan McKinnon
1 On Mon, Sep 09 2013, Alan McKinnon wrote:
2
3 > On 10/09/2013 00:26, gottlieb@×××.edu wrote:
4 >> On Mon, Sep 09 2013, Canek Peláez Valdés wrote:
5 >>
6 >>> On Mon, Sep 9, 2013 at 1:51 PM, <gottlieb@×××.edu> wrote:
7 >>>> In fstab I have
8 >>>> /dev/vg/var /mnt/var ext4 defaults 0 2
9 >>>> I also have
10 >>>> lrwxrwxrwx 1 root root 7 Aug 31 16:13 /var -> mnt/var
11 >>>>
12 >>>> This has worked ok but revdep-rebuild is not happy
13 >>>
14 >>> I think it's the symlink the thing that is making revdep-rebuild
15 >>> unhappy. Have you tried to bind mount /mnt/var into /var?
16 >>>
17 >>> mount -o bind /mnt/var /var
18 >>
19 >> Works great. Thanks. To make it permanent I put
20 >> /mnt/var /var ext4 bind 0 0
21 >> right under
22 >> /dev/vg/var /mnt/var ext4 defaults 0 2
23 >> in /etc/fstab
24 >
25 > I'm curious as to why you do that, I can't see any benefit at all.
26 >
27 > The "var" filesystem is an LV and is only useful if it is mounted at
28 > /var where packages expect it to be. Why add the extra complexity of
29 > mounting it somewhere else and then bind mounting it to the pnly place
30 > it can be useful?
31
32 An old habit/belief that mounts go in /mnt. Since both revdep-rebuild
33 and you believe this is a bad habit, I now mount directly on /var /opt.
34
35 > There's rules of thumb about this that will always work:
36 >
37 > No object in /tmp can be expected to survive successive invocations of
38 > the program that created the object, and never survive a reboot;
39 > No object in /var/tmp can be expected to survive a reboot
40 >
41 > The best place for temp files, ironically, is ~
42
43 I set tmpwatch and wipe_tmp so that files survive in /tmp and /var/tmp
44 for a month.
45
46 I don't like ~ for temp files since on some, admittedly rare, occasions
47 I actually use the gnome gui file manager and don't want a huge ~. I
48 have long ago created ~/tmp (also cleaned after a month by tmpwatch) so
49 the only problem is breaking the habit of placing short-term files in
50 /tmp instead of ~/tmp.
51
52 I realize that habit is bad for my (system's) health, but still find it
53 hard to break. I shall try again. Perhaps this is very mild form of
54 what intelligent smokers feel :-).
55
56 allan

Replies

Subject Author
Re: [gentoo-user] why does revdep-rebuild object to mounting /var on /mnt/var ? Alan McKinnon <alan.mckinnon@×××××.com>