Skip to contentSkip to conversation

Option to create missing mount point

DISCUSSION Phillip Susi 2 participants 2 messages Feb 18, 2014 Util-Linux package

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A debian bug has requested that mount create the mount point if it does not exist yet. My initial reaction was no, but one use case does seem to be a good reason. That would be if you want to set up a tmpfs mount with several sub mounts in /etc/fstab. You currently can't do that since when the tmpfs is mounted, it is empty. Is this something that might be a good idea?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTA3MlAAoJEI5FoCIzSKrwb0EH/RN9N2CflAi5xhegkPk+wtcH pJnoHZROF2vID8eRy4tLxIoWhsKDAhIjEG7GWWOnrQwBpTJqf36+4ah8djuYAZDq TfVIuEG/Ww1ByoP2K7AqgN2URKW8Z91SxSZM2PLLAg91lg7nM8WTbnhCm2znOABj lQsXEYdKh/8n8bb8w/SULhF3ffbj0tMPpnY3LjI1RkbQcp3CjqqBtmJG4XM9M0L0 7PUAdDpk2FiiWGYi/PfMMajfjeb8S80n+v/Gmvz0LJWPBkdeW2hP1gosyGL3gKgm MzpV8bInWV18s0qWcqgrfxoS8mWxgTSZowf0/cQVkNKnsleET3UMxo/Qo55O1n4= =Cdtu
-----END PGP SIGNATURE-----

maintainer
#1 lore raw
Quoted 6 lines · Phillip Susi

A debian bug has requested that mount create the mount point if it does not exist yet. My initial reaction was no, but one use case does seem to be a good reason. That would be if you want to set up a tmpfs mount with several sub mounts in /etc/fstab. You currently can't do that since when the tmpfs is mounted, it is empty. Is this something that might be a good idea?

Yes, v2.23 release notes:

mount(8):
- supports new userspace mount option x-mount.mkdir[=<mode>] to create mountpoints on demand

it's also in man page :)

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com