LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-18-2020, 05:42 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,459
Blog Entries: 1

Rep: Reputation: 66
Question strange behaviour on mounting filesystems on boot


Once in a while (3 boots in 7) not all mount points are mounted on boot.
Code:
kimera:/home/miguel # mount | grep btrfs
/dev/sda4 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=267,subvol=/@/.snapshots/1/snapshot)
/dev/sda4 on /.snapshots type btrfs (rw,relatime,ssd,space_cache,subvolid=266,subvol=/@/.snapshots)
/dev/sda4 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,ssd,space_cache,subvolid=264,subvol=/@/boot/grub2/x86_64-efi)
/dev/sda4 on /boot/grub2/i386-pc type btrfs (rw,relatime,ssd,space_cache,subvolid=265,subvol=/@/boot/grub2/i386-pc)
/dev/sda4 on /home type btrfs (rw,relatime,ssd,space_cache,subvolid=263,subvol=/@/home)
/dev/sda4 on /opt type btrfs (rw,relatime,ssd,space_cache,subvolid=262,subvol=/@/opt)
/dev/sda4 on /root type btrfs (rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/root)
/dev/sda4 on /srv type btrfs (rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/srv)
/dev/sda4 on /usr/local type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/@/usr/local)
/dev/sda4 on /var type btrfs (rw,relatime,ssd,space_cache,subvolid=257,subvol=/@/var)
/dev/sda4 on /tmp type btrfs (rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/tmp)
kimera:/home/miguel # mount -a
mount: /home/miguel/Downloads: /dev/sdc2 already mounted or mount point busy.
kimera:/home/miguel # mount | grep btrfs
/dev/sda4 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=267,subvol=/@/.snapshots/1/snapshot)
/dev/sda4 on /.snapshots type btrfs (rw,relatime,ssd,space_cache,subvolid=266,subvol=/@/.snapshots)
/dev/sda4 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,ssd,space_cache,subvolid=264,subvol=/@/boot/grub2/x86_64-efi)
/dev/sda4 on /boot/grub2/i386-pc type btrfs (rw,relatime,ssd,space_cache,subvolid=265,subvol=/@/boot/grub2/i386-pc)
/dev/sda4 on /home type btrfs (rw,relatime,ssd,space_cache,subvolid=263,subvol=/@/home)
/dev/sda4 on /opt type btrfs (rw,relatime,ssd,space_cache,subvolid=262,subvol=/@/opt)
/dev/sda4 on /root type btrfs (rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/root)
/dev/sda4 on /srv type btrfs (rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/srv)
/dev/sda4 on /usr/local type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/@/usr/local)
/dev/sda4 on /var type btrfs (rw,relatime,ssd,space_cache,subvolid=257,subvol=/@/var)
/dev/sda4 on /tmp type btrfs (rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/tmp)
/dev/sdc2 on /home/miguel/Documents type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/miguel/Documentos)
/dev/sdc2 on /home/miguel/Downloads type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/miguel/Downloads)
/dev/sdc2 on /home/miguel/Pictures type btrfs (rw,relatime,space_cache,subvolid=275,subvol=/miguel/Imagens)
/dev/sdc2 on /home/miguel/Misc type btrfs (rw,relatime,space_cache,subvolid=269,subvol=/miguel/Misc)
/dev/sdc2 on /home/miguel/Music type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/miguel/Musica)
/dev/sdc2 on /home/miguel/ProgramasRFB type btrfs (rw,relatime,space_cache,subvolid=271,subvol=/miguel/ProgramasRFB)
/dev/sdc2 on /home/miguel/tmp type btrfs (rw,relatime,space_cache,subvolid=272,subvol=/miguel/tmp)
/dev/sdc2 on /home/miguel/Videos type btrfs (rw,relatime,space_cache,subvolid=273,subvol=/miguel/Videos)
/dev/sdc2 on /home/miguel/src/UPSData type btrfs (rw,relatime,space_cache,subvolid=595,subvol=/miguel/src/UPSData)
/dev/sdc2 on /var/lib/transmission type btrfs (rw,relatime,space_cache,subvolid=858,subvol=/transmission)
kimera:/home/miguel #
As you can see,
Code:
mount -a
mounts the remaining FS.
There is that message about Downloads is busy but I can't figure out why.
I've tried
Code:
fuser /home/miguel/Downloads
before the mount command, but it showed nothing.
I already tried to comment that Downloads line in fstab and the problem persist, except there is no more messages when
Code:
mount -a
.

Any ideas ? As I said, it not happens all the time. Even more strange, when it happens, a simple reboot command cause the next boot to mount all FS, as expected;

Running openSUSE tumbleweed, currently with kernel 5,7 but that already happened on previous kernels.
 
Old 06-18-2020, 06:47 PM   #2
The Squash
LQ Newbie
 
Registered: Apr 2020
Distribution: Gentoo GNU/Linux x86 (32 bit)
Posts: 24

Rep: Reputation: Disabled
I think I know what's wrong. Please post the contents of your /etc/fstab file. The following is my idea:

For those who are not aware, the "init process" on a UNIX-like operating system is the first program to be loaded on bootup, loaded by the kernel as a matter of fact. Different UNIX and UNIX-like operating systems use different init processes usually. Also different Linux distributions use different init processes. Today there are chiefly three init processes that distributors use: System V Init (usually abbreviated to SysV-Init), SystemD, and OpenRC. The former was historically used by almost all Linux distributions. The middle one, SystemD, is the one used by all the distributions in the list of distributions in your profile. The last one is primarily used by Gentoo.

SystemD, the more common init process today, loads processes to boot the system up in parallel. This is important because once processes are run in parallel, there is opportunity for processes to run in different orders each reboot. And filesystems may be mounted in a different order, too. Which means that sometimes, the "/home" directory may get mounted after the directories in "/home/miguel" get mounted.

Why does this matter? Well, on Linux and most UNIX-like operating systems, if you mount a filesystem over the top of another mounted filesystem, you lose access to the other mounted filesystem. So by mounting "/home" over "/home/miguel/Documents", for example, you effectively lose access to "/home/miguel/Documents". Some mounting programs can be configured to hide mounted volumes which are "hidden" in this manner, thus removing the appropriate entries for the mounted volumes from the output of the mount command.

Now I may be wrong, but I'd like to know if that's the problem. If so, I'll give you further guidance.
 
2 members found this post helpful.
Old 06-18-2020, 09:00 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,977

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Let me take a punt - /dev/sda is SSD, /dev/sdb is a real hard disk.
 
Old 06-19-2020, 04:24 AM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,459

Original Poster
Blog Entries: 1

Rep: Reputation: 66
Quote:
Originally Posted by syg00 View Post
Let me take a punt - /dev/sda is SSD, /dev/sdb is a real hard disk.
you mean /dev/sdc, but yes, it is
Some folders have lot of files that would not fit in the small SSD, so I leave then in the larger one, sdc.
 
Old 06-19-2020, 04:34 AM   #5
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,459

Original Poster
Blog Entries: 1

Rep: Reputation: 66
Thumbs up SOLVED

Quote:
Originally Posted by The Squash View Post
I think I know what's wrong.
...
Why does this matter? Well, on Linux and most UNIX-like operating systems, if you mount a filesystem over the top of another mounted filesystem, you lose access to the other mounted filesystem. So by mounting "/home" over "/home/miguel/Documents", for example, you effectively lose access to "/home/miguel/Documents". Some mounting programs can be configured to hide mounted volumes which are "hidden" in this manner, thus removing the appropriate entries for the mounted volumes from the output of the mount command.

Now I may be wrong, but I'd like to know if that's the problem. If so, I'll give you further guidance.
Bingo ! Amazing ! Makes perfect sense !

What I will do next: I will move from fstab to systemd to mount the stuff. I was planning to do that in the future, so better to do it now.
I guess I will have to play with "Wants=" and "After=" to mount in the proper order.

Thank you very much, I am glad to came here and ask for help.

Last edited by marozsas; 06-19-2020 at 05:13 AM.
 
Old 06-19-2020, 04:42 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,977

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Gotta be too slow spinning up for the first power-on. Maybe use x-systemd.after to enforce a delay - say after the network is up might work. Quick bit of sed to add it to each /dev/sdc? entry in fstab.

Edit: I type too slow, missed your last post. Try what I suggested, let systemd do all the work rather than you worrying about it.

Last edited by syg00; 06-19-2020 at 04:43 AM.
 
Old 06-19-2020, 04:01 PM   #7
The Squash
LQ Newbie
 
Registered: Apr 2020
Distribution: Gentoo GNU/Linux x86 (32 bit)
Posts: 24

Rep: Reputation: Disabled
Quote:
Originally Posted by marozsas View Post
Bingo ! Amazing ! Makes perfect sense !

What I will do next: I will move from fstab to systemd to mount the stuff. [...]

Thank you very much, I am glad to came here and ask for help.
I'm glad to be a help to someone. Good luck with your endeavor!
 
  


Reply

Tags
btrfs, mount, opensuse, tumbleweed


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Filesystems supported by the kernel (/proc/filesystems) gacanepa Linux - Newbie 5 08-22-2013 02:15 PM
Boot stops on "Mounting NFS filesystems:" for a LONG time funkymunky Fedora 1 09-12-2008 12:43 AM
Fedora 8 Boot Stops at 'Mounting Local Filesystems' cdrom600 Fedora 2 06-08-2008 09:38 PM
server cannot boot up error mounting filesystems charles@percipia.com Linux - Enterprise 2 02-15-2008 01:31 PM
windows filesystems vs. linux filesystems irfanhab General 8 05-25-2004 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:14 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