Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] /home failed to mount randomly during startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 34

PostPosted: Fri Jun 05, 2020 5:07 pm    Post subject: [Solved] /home failed to mount randomly during startup Reply with quote

Hi, I've encountered a problem during startup these days.

When booting, usually, my desktop environment pops up, and everything works well. But sometimes, I only see a shell and startx doesn't work. I can login but all my configs for command line environment don't show up. I found that in these cases, /home failed to mount, while /usr mounted successfully (/usr is on a separated hard drive, while /home and / are on another hard drive). When I reboot, sometimes the problem disappear (at least for a while). I wonder what could be causing this weird problem.

Thanks for reading this topic. :D

----- Update -----
/etc/fstab
[/url]


Last edited by AprilGrimoire on Sun Jun 07, 2020 6:30 am; edited 2 times in total
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1407
Location: Germany

PostPosted: Fri Jun 05, 2020 6:18 pm    Post subject: Reply with quote

Hello AprilGrimoire.

How did you configure this setup?
What does dmesg say as those events happen?
Maybe it is time for a backup?
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3925
Location: Hamburg

PostPosted: Fri Jun 05, 2020 6:24 pm    Post subject: Re: /home failed to mount randomly during startup Reply with quote

AprilGrimoire wrote:
.../home failed to mount, while /usr mounted successfully (/usr is on a separated hard drive, while /home and / are on another hard drive)...
Without any more detailed info nobody can help you, so at least the /etc/fstab entries are needed IMO.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54315
Location: 56N 3W

PostPosted: Fri Jun 05, 2020 6:53 pm    Post subject: Reply with quote

AprilGrimoire,

Welcome to Gentoo.

I suspect you have a race condition and sometimes you loose.
Please post the output of
Code:
ls -l /dev/vg?/*

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 34

PostPosted: Sat Jun 06, 2020 2:54 am    Post subject: Reply with quote

NeddySeagoon wrote:
AprilGrimoire,

Welcome to Gentoo.

I suspect you have a race condition and sometimes you loose.
Please post the output of
Code:
ls -l /dev/vg?/*


Thanks, it's
Code:

lrwxrwxrwx 1 root root 19 Jun  6 10:46 /dev/vg1/usr -> /dev/mapper/vg1-usr
lrwxrwxrwx 1 root root 20 Jun  6 10:46 /dev/vg2/home -> /dev/mapper/vg2-home
lrwxrwxrwx 1 root root 20 Jun  6 10:46 /dev/vg2/root -> /dev/mapper/vg2-root
lrwxrwxrwx 1 root root 20 Jun  6 10:46 /dev/vg2/swap -> /dev/mapper/vg2-swap
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54315
Location: 56N 3W

PostPosted: Sat Jun 06, 2020 8:53 am    Post subject: Reply with quote

AprilGrimoire,

You do indeed have a race.
fstab uses /dev/vg2/home, which is a symbolic link to /dev/vg2/home -> /dev/mapper/vg2-home which may be a symbolic link to something else and so on.

These symbolic links are created by dynamically by udev as /dev is in RAM (DEVTMPFS in the kernel)
The race is between udev creating the symbolic links and localmount trying to use them. When udev wins, it works.

The news item
Code:
2016-11-04-important_fstab_and_localmount_update
applies here.
That only cites /dev/disk/by-* symbolic links but its the same issue.

Either do what that news item suggest or follow the symlink chain to the real /dev node and use the real /dev node in fstab.
Do that eveywhere, not just for /home.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
AprilGrimoire
n00b
n00b


Joined: 05 Jun 2020
Posts: 34

PostPosted: Sun Jun 07, 2020 6:30 am    Post subject: Reply with quote

NeddySeagoon wrote:
AprilGrimoire,

You do indeed have a race.
fstab uses /dev/vg2/home, which is a symbolic link to /dev/vg2/home -> /dev/mapper/vg2-home which may be a symbolic link to something else and so on.

These symbolic links are created by dynamically by udev as /dev is in RAM (DEVTMPFS in the kernel)
The race is between udev creating the symbolic links and localmount trying to use them. When udev wins, it works.

The news item
Code:
2016-11-04-important_fstab_and_localmount_update
applies here.
That only cites /dev/disk/by-* symbolic links but its the same issue.

Either do what that news item suggest or follow the symlink chain to the real /dev node and use the real /dev node in fstab.
Do that eveywhere, not just for /home.


Thanks, i think that solved the problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum