You are not logged in.

#1 2011-08-16 22:44:47

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Is there any reason NOT to do this with autofs?

Giving autofs a file containing this:

* -fstype=auto,nodev,nosuid :/dev/&

appears to act as a universal on-access automounter for all internal and external storage devices. I have never seen or heard of this being done before, but it appears to work fine, so I'm assuming there must be a reason nobody does it.

My questions are:

1. I notice that the above instructions allow autofs to mount the root drive wherever it mounts things. You can recursively look at the root drive through /misc/sda1 or wherever it gets mounted. Can this be carried out to a theoretically infinite depth, i.e. via /misc/sda1/misc/sda1/misc/sda1... ? Would that be a potential source of all kinds of problems?

2. Assuming it's a bad idea to just let autofs mount anything in /dev, how easy is it to rescue the situation by making autofs not mount things it shouldn't?

3. If this is NOT actually a bad idea, why does no desktop software (or desktop Linux distribution) take advantage of it? Portability might be an issue (I'm not sure if amd can duplicate this behavior), but lack of portability hasn't stopped everyone from adopting udisks...

Offline

#2 2011-08-17 23:12:38

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Is there any reason NOT to do this with autofs?

Well, after setting things up this way, I can now give one reason that it won't work properly, though by rights it should: on Arch current (as of today, August 17 2011) autofs never unmounts anything. Not when the timeout expires, not ever. You have to manually unmount all devices that it has mounted.

Feh.

Offline

Board footer

Powered by FluxBB