LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 01-15-2023, 09:45 AM   #1
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,334
Blog Entries: 3

Rep: Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730
Bind mount no longer working in 21.1 in fstab


I used to have have a bind mount which worked via /etc/fstab across a variety of different distros:

Code:
/var/tc/music      /home/tc/Music     none defaults,bind 0 0
After moving to Linux Mint 21.1, the above setting no longer properly bind mounts the directory. Instead it seems to do something wrong with it:

Code:
$ mount | grep Music
/dev/nvme1n1p2 on /home/tc/Music type ext4 (rw,relatime,stripe=32)
If I remove the fstab entry, I can manually bind mount the directory just fine.

Code:
mount --bind /var/tc/music /home/tc/Music
I even tried cargo culting the following undocumented settings into fstab and rebooted, and no improvement:

Code:
/var/tc/music   /home/tc/Music  auto    bind,x-gvfs-hide,x-systemd.requires=/var   0       1
and

Code:
/var/tc/music   /home/tc/Music  auto    bind,x-gvfs-hide,x-systemd.requires=/home   0       1
Those just cause the booting to fail by causing / to mount read-only.

One thing different is that the /home is in an OpenZFS mirror

Code:
$ mount | grep home
home on /home type zfs (rw,xattr,noacl)

$ zpool status
  pool: home
 state: ONLINE
config:

        NAME           STATE     READ WRITE CKSUM
        home           ONLINE       0     0     0
          mirror-0     ONLINE       0     0     0
            nvme0n1p4  ONLINE       0     0     0
            nvme1n1p4  ONLINE       0     0     0

I think the work-around is just to use symlinks instead of bind mounts but I would really like to figure out what the right way to bind mount in fstab is in Linux Mint 21.1
 
Old 01-16-2023, 02:58 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
According to the man page you only need: /olddir /newdir none bind
If I need to guess /var/tc/music should be mounted first so you need to specify that, but I'm not really sure. Would be nice to check the logs (dmesg/journalctl?) to see what's going on during boot.
 
Old 01-16-2023, 03:17 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,334

Original Poster
Blog Entries: 3

Rep: Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730
Quote:
Originally Posted by pan64 View Post
According to the man page you only need: /olddir /newdir none bind
The manual page mentions very little, but the line used to work in earlier versions of Linux Mint and PepperintOS and Devuan and so on. However with those, there was no use of OpenZFS for the home partition and there seems to be more systemd than ever in 21.1.

Quote:
Originally Posted by pan64 View Post
If I need to guess /var/tc/music should be mounted first so you need to specify that, but I'm not really sure. Would be nice to check the logs (dmesg/journalctl?) to see what's going on during boot.
That's close to my guess too. Both /var (where /var/tc/music resides) and /home need to be mounted before the bind can take place. The output from dmesg doesn't show any problem with the main partitions, that I can tell, and does not mention ZFS. What should I look for in the output of journalctl -xe?
 
Old 01-16-2023, 04:01 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
you need to look for anything related to /var/tc/music and/or /home/tc/Music (including the order of events).
After a reboot, without manual bind you may also try systemctl status <mount service> or similar to check them
 
  


Reply

Tags
bind mount



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux NFS Mount Entry in fstab (/etc/fstab) with Example LXer Syndicated Linux News 0 06-17-2022 09:55 AM
[SOLVED] BIND~~ Bind working on Localhost but not not working from remotehost abhishekdixit98 Linux - Server 7 09-01-2015 04:04 AM
fstab no longer working for external drive thedatapusher Linux - Hardware 2 04-12-2011 11:21 PM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration