A
A
Alexander Voronin2017-08-02 12:58:13
linux
Alexander Voronin, 2017-08-02 12:58:13

How to remount binds when connecting a disk?

There is an external HDD, some of the folders of which are bound to different points in the system (for example, /opt/x, /usr/lib/y). During a power outage, Pine64 with a battery still pulls USB power, dropping the drive and remounting it.
The task is to restore bindings from /mnt/sda/A to /opt/x automatically after mounting /mnt/sda.
At the moment, everything is written in fstab, plus I tried to figure out the systemd.mount options, but I didn’t find the opportunity to “kick” the slave mount when mounting the main one :( There was an option with symlinks, but I wouldn’t want to

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2017-08-02
@pfg21

remake everything on soft-links??

M
Maxim Terentiev, 2017-08-05
@maxitso

Use the UUID instead of /dev/sd...
you can find out with the blkid command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question