this post was submitted on 26 Jun 2026
6 points (100.0% liked)

linux4noobs

4242 readers
9 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 2 years ago
MODERATORS
 

I have bind mounts configured in my /etc/fstab. The source (i.e. where the files physically exist) is on a removable USB drive.

Right now it works but I have to mount/unmount everything individually when I plug/unplug the drive. I would like to be able to have the bind mounts follow the state of of the USB drive automatically.

Is there a way?

Edit here is relevant section of fstab:

/dev/mapper/external-crypt	/mount/external		auto	nosuid,nodev,nofail,x-systemd.device-timeout=5	0 0
/mount/external/realfolder	/home/user/folder	none	bind,nofail	0 0

So when I run sudo mount "/mount/external" I want sudo mount /home/user/folder to be implied; likewise for umount.

you are viewing a single comment's thread
view the rest of the comments
[–] linuxPIPEpower@discuss.tchncs.de 1 points 20 hours ago* (last edited 20 hours ago)

Thunar file manager has volman. You can use it to manually unmount, including binds, but I'm not sure how to trigger it to know about them automatically. It's an extra step because it has to read the rest of the fstab file to find any dependencies and I don't know why it would do that.

I updated the OP to show my fstab