Files
ubicloud/rhizome/common/bin/add_to_fstab
Burak Yucesoy f7fa3a5f77 Add utility for adding entries to /etc/fstab
Mounting disks that is remounted after restarts requires modifying /etc/fstab
file, which is difficult to do in safe manner.
- If multiple processes edit the file at the same time, we might lose updates
or corrupt the file. Thus a lock needs to be taken.
- If OS crashes while updating the file, we might corrupt the file. Thus the
operation should be done atomically.
- If device path or mount point is already in the /etc/fstab file it might
cause unexpected behavior, so we should check their existence before adding
the related line to /etc/fstab

Since there are many potential pitfalls, we are adding an utility to safely
add entries to /etc/fstab file.
2023-09-26 11:29:18 +03:00

798 B
Executable File