Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
localmount fails to start (2nd hdd not mounted)
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
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Fri Mar 01, 2024 2:02 pm    Post subject: localmount fails to start (2nd hdd not mounted) Reply with quote

Hello,
I'm having a strange issue with one gentoo install, localmount doesn't start and fails to mount my btrfs subvolume located on a second drive.

rc.log (verbose)
Code:
rc boot logging started at Thu Feb 29 23:12:31 2024

 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/modules start
 * Loading module dm-multipath ...
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/drivers/md/dm-multipath.ko
 [ ok ]
 * Loading kernel modules ...
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/net/netfilter/x_tables.ko
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/net/ipv4/netfilter/ip_tables.ko
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/net/ipv4/netfilter/iptable_mangle.ko
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/net/ipv6/netfilter/ip6_tables.ko
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/net/ipv6/netfilter/ip6table_mangle.ko
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/net/ipv4/netfilter/iptable_filter.ko
insmod /lib/modules/6.6.18-gentoo-gnu-hardened/kernel/net/ipv6/netfilter/ip6table_filter.ko
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/hwclock start
 * Setting system clock using the hardware clock [UTC] ...
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/procfs start
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/binfmt start
 * Loading custom binary format handlers ...
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/dmcrypt start
 * Setting up dm-crypt mappings ...
 *   hdd2 using:    open /dev/sdb1 hdd2 ...
 [ ok ]
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/mtab start
 * Updating /etc/mtab ...
 * Creating mtab symbolic link
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/sysctl start
 * Configuring kernel parameters ...
* Applique /lib/sysctl.d/00protected-links.conf
fs.protected_symlinks = 1
fs.protected_hardlinks = 1
* Applique /etc/sysctl.conf
vm.swappiness = 5
net.ipv4.ip_forward = 0
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/bootmisc start
 * Creating user login records ...
 [ ok ]
 * Wiping /tmp directory ...
 [ ok ]
 * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/termencoding start
 * Setting terminal encoding [UTF-8] ...
 [ ok ]
[...]


See, nothing after dm-crypt mappings :
Code:
 * Setting up dm-crypt mappings ...
 *   hdd2 using:    open /dev/sdb1 hdd2 ...
 [ ok ]
 [ ok ]


localmount is in boot runlevel
Code:
localmount | boot


fstab
Code:
UUID=1afc534e-4877-480b-b775-4d0eaef50fcf   /                         btrfs   defaults,subvol=root    0 0
UUID=1afc534e-4877-480b-b775-4d0eaef50fcf   /home                     btrfs   defaults,subvol=home    0 0
UUID=1afc534e-4877-480b-b775-4d0eaef50fcf   /swap                     btrfs   defaults,subvol=swap    0 0
/swap/swapfile                              none                      swap    defaults                0 0

UUID=fe6f4b43-874a-4a30-b1de-6a8db4bc00fc   /mnt/data              btrfs   defaults,subvol=data 0 0


Nonetheless, when boot finishes, I can manually mount the subvolume without issue :
Code:
/dev/mapper/hdd2 on /mnt/data type btrfs (rw,relatime,space_cache=v2,subvolid=275,subvol=/data)


btrfs subvolume list /mnt/data
Code:
ID 275 gen 20108 top level 5 path data


This is a very strange issue because I have other gentoo box with similar setup and localmount starts without issue. I don't know why it fails on this box (it is an old intel mb with atom cpu)


Last edited by sdauth on Fri Mar 01, 2024 5:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1660

PostPosted: Fri Mar 01, 2024 2:27 pm    Post subject: Reply with quote

Where are fsck and root services? They are "need"ed by localmount in order to have that run (by default at least).
Show the output of rc-status --format ini boot please.
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Fri Mar 01, 2024 4:05 pm    Post subject: Reply with quote

Sorry, I should have pasted the whole thing.

Code:
[boot]
termencoding =  started
hwclock =  started
modules =  started
dmcrypt =  started
fsck =  started
root =  started
mtab =  started
localmount =  started
sysctl =  started
bootmisc =  started
consolefont =  stopped
systemd-tmpfiles-setup =  started
seedrng =  started
save-termencoding =  started
keymaps =  started
save-keymaps =  started
procfs =  started
binfmt =  started
swap =  started
loopback =  started
hostname =  started


So as you can see, "localmount = started" but it doesn't show up in rc.log boot log.

On another gentoo box, this is rc.log after dm-crypt mappings, fstab is correctly read and filesystems are mounted:
Code:

[...]
[ ok ]
 *   hdd4 using:    open /dev/sdl1 hdd4 ...
 [ ok ]
 *   hdd5 using:    open /dev/sdk1 hdd5 ...
 [ ok ]
 [ ok ]
 * Checking local filesystems  ...
 [ ok ]
 * Remounting root filesystem read/write ...
 [ ok ]
 * Remounting filesystems ...
 [ ok ]
 * Updating /etc/mtab ...
 * Creating mtab symbolic link
 [ ok ]
 * Mounting local filesystems ...
 [ ok ]
[...]
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Fri Mar 01, 2024 4:20 pm    Post subject: Reply with quote

I see openrc 0.48 is still in tree, I'll try to downgrade just to check. (edit : Same problem)
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Wed Mar 13, 2024 5:05 pm    Post subject: Reply with quote

I took out the hdd from the server and put in a laptop as a second drive and the same issue happens.
I can mount it manually on the laptop too.
It seems related to the btrfs filesystem although I ran a full check + scrub on it already (=no errors) so I don't know what else I can do... Except nuking the btrfs and create a brand new one maybe :o

edit :
Quote:
I don't know what else I can do... Except nuking the btrfs and create a brand new one maybe

So that's what I did finally. And it worked. Now the btrfs subvolume correctly mounts during boot.
I can't explain why though. :lol:
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