0

How can I generate a bind-mount entry for fstab, given an existing (mounted) mountpoint? Neither findmnt nor mount produce a fstab-style entry. I suppose one can parse findmnt and figure out SOME of the options, but e.g. make-rprivate doesn't show up in the info

# mount --bind --make-rprivate /boot-dev/Archive/ /Archive/
# findmnt -l /Archive | cat

TARGET   SOURCE              FSTYPE  OPTIONS
/Archive /dev/sda6[/Archive] fuseblk rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096

# mount | grep Archive

/dev/sda6 on /Archive type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

# grep Archive /etc/fstab   # desired
/boot-dev/Archive /Archive auto defaults,bind,noauto,allow_other

The last entry was written by hand. I'm not sure yet how to put --make-rprivate in fstab.

1 Answer 1

1
/boot-dev/Archive /Archive none defaults,bind,noauto,allow_other,rprivate
1
  • Thanks -- I've figured out rprivate already (unsure why I missed it initially); but the main thing is getting an entry that can be copied into fstab, given an existing mount
    – usretc
    Dec 11, 2020 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .