Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to mount VG after kernel upgrade during boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
p3k
n00b
n00b


Joined: 29 Sep 2020
Posts: 5

PostPosted: Tue Sep 29, 2020 10:19 am    Post subject: Unable to mount VG after kernel upgrade during boot Reply with quote

Hello fellas. I am using Grub2, generating new kernel 5.4.60 and initramfs with genkernel.
If i am booting to new kernel, my VG are not mounted during boot (not existing device).
However, when i boot to old kernel 4.14.65, everything work like a charm.

I am generating new kernel with command:
Code:

genkernel --lvm --mdadm --no-clean --no-mrproper --menuconfig all

And grub has both mdadm and lvm module enabled:
Code:

GRUB_CMDLINE_LINUX_DEFAULT="domdadm dolvm"

The VGs are running on MD device (RAID 1 - mirror)
Code:

#cat /proc/mdstat:
Personalities : [raid6] [raid5] [raid4] [raid0] [raid1] [raid10] [linear] [multipath]
md127 : active raid1 sda4[0] sdb4[1]
      2927772096 blocks super 1.2 [2/2] [UU]
      bitmap: 1/22 pages [4KB], 65536KB chunk

#pvscan
  PV /dev/md127   VG vg01            lvm2 [<2.73 TiB / <720.14 GiB free]
  Total: 1 [<2.73 TiB] / in use: 1 [<2.73 TiB] / in no VG: 0 [0   ]

#lvscan:
  ACTIVE            '/dev/vg01/tmp' [2.00 GiB] inherit
  ACTIVE            '/dev/vg01/var' [10.00 GiB] inherit
  ACTIVE            '/dev/vg01/home' [10.00 GiB] inherit
  ACTIVE            '/dev/vg01/root' [50.00 GiB] inherit
  ACTIVE            '/dev/vg01/data' [1.95 TiB] inherit


Anyone has an idea what would be the issue here? I am really going crazy of the issue.
MD and LVM support is enabled in new kernel. This is for sure.
Help appreaciated. Thank you.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3949

PostPosted: Tue Sep 29, 2020 12:44 pm    Post subject: Reply with quote

Hi

You can not mount a vg.
You can mount an lv.
Can you please post your "fstab" and your /var/log/dmesg and your /etc/default/grub
Also did you use the same .config file to compile the new kernel also?

:D


Last edited by alamahant on Tue Sep 29, 2020 11:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
p3k
n00b
n00b


Joined: 29 Sep 2020
Posts: 5

PostPosted: Tue Sep 29, 2020 2:30 pm    Post subject: Reply with quote

Hello alamahant.
Sure you right only lv is mountable. My mistake. Nevertheless, the issue still persist :(
I have slightly different .config for old and brand new kernel.

Here is my fstab (a part not commented out):
Code:
/dev/vg01/root      /      ext4   defaults   1 1
/dev/sda2      /boot/efi   vfat   noauto,noatime   0 2
/dev/vg01/home      /home      ext4    defaults        0 0
/dev/vg01/tmp      /tmp      ext4    defaults        0 0
/dev/vg01/var      /var      ext4    defaults        0 0
/dev/vg01/data      /data      ext4    defaults        0 0
/dev/sda3       swap       swap    defaults    0 0
/dev/sdb3       swap       swap    defaults    0 0
/dev/sdc1      /mnt/sdc1   ext3   defaults   0 0

Here is dmesg from new kernel (a snippet, i am not able to paste whole dmesg, finding a way how to attach a file here):
Code:

[    5.544828] ahci 0000:00:12.0: version 3.0
[    5.555497] ahci 0000:00:12.0: AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[    5.555506] ahci 0000:00:12.0: flags: 64bit ncq sntf pm clo only pmp pio slum part deso sadm sds apst
[    5.556203] scsi host0: ahci
[    5.556666] scsi host1: ahci
[    5.556813] ata1: SATA max UDMA/133 abar m2048@0x91417000 port 0x91417100 irq 126
[    5.556817] ata2: SATA max UDMA/133 abar m2048@0x91417000 port 0x91417180 irq 126
[    5.557133] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
[    5.557235] ahci 0000:01:00.0: AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[    5.557238] ahci 0000:01:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc sxs
[    5.558025] scsi host2: ahci
[    5.558687] scsi host3: ahci
[    5.558832] ata3: SATA max UDMA/133 abar m512@0x91300000 port 0x91300100 irq 127
[    5.558836] ata4: SATA max UDMA/133 abar m512@0x91300000 port 0x91300180 irq 127
[    5.872487] ata3: SATA link down (SStatus 0 SControl 300)
[    6.029871] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    6.029905] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    6.031357] ata1.00: ATA-9: WDC WD30PURZ-85GU6Y0, 80.00A80, max UDMA/133
[    6.031365] ata1.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    6.031396] ata2.00: ATA-9: WDC WD30PURZ-85GU6Y0, 80.00A80, max UDMA/133
[    6.031402] ata2.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    6.033150] ata2.00: configured for UDMA/133
[    6.033184] ata1.00: configured for UDMA/133
[    6.033936] scsi 0:0:0:0: Direct-Access     ATA      WDC WD30PURZ-85G 0A80 PQ: 0 ANSI: 5
[    6.035127] scsi 1:0:0:0: Direct-Access     ATA      WDC WD30PURZ-85G 0A80 PQ: 0 ANSI: 5
[    6.349592] ata4: SATA link down (SStatus 0 SControl 300)
[    6.519033] Fusion MPT base driver 3.04.20
[    6.519036] Copyright (c) 1999-2008 LSI Corporation
[    6.525750] Fusion MPT SPI Host driver 3.04.20
[    6.538907] megasas: 07.710.50.00-rc1
[    6.582466] mpt3sas version 31.100.00.00 loaded
[    6.594195] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    6.594199] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    6.594265] sd 0:0:0:0: [sda] Write Protect is off
[    6.594269] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    6.594326] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.594366] sd 1:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    6.594370] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    6.594401] sd 1:0:0:0: [sdb] Write Protect is off
[    6.594404] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    6.594451] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.673398]  sda: sda1 sda2 sda3 sda4
[    6.675710] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.682205]  sdb: sdb1 sdb2 sdb3 sdb4
[    6.683926] sd 1:0:0:0: [sdb] Attached SCSI disk
[    6.698293] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    6.698584] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    7.011809] GDT-HA: Storage RAID Controller Driver. Version: 3.05

[   11.237408] udevd[3089]: starting version 3.2.9
[   11.240375] udevd[3090]: starting eudev-3.2.9
[   11.798862] md/raid1:md127: active with 2 out of 2 mirrors
[   11.820790] md127: detected capacity change from 0 to 2998038626304
[   13.139084] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
[   18.188188] udevd[3761]: starting version 3.2.9
[   18.406181] udevd[3761]: starting eudev-3.2.9
[   18.600905] r8169 0000:04:00.0 lan: renamed from eth1
[   18.613103] r8169 0000:03:00.0 wan: renamed from eth0
[   20.064365] EXT4-fs (dm-3): re-mounted. Opts: (null)
[   20.499849] Adding 2097148k swap on /dev/sda3.  Priority:-2 extents:1 across:2097148k FS
[   20.533185] Adding 2097148k swap on /dev/sdb3.  Priority:-3 extents:1 across:2097148k FS
[   20.623732] EXT4-fs (sdc1): mounting ext3 file system using the ext4 subsystem
[   24.771814] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)


And here is content of /etc/default/grub:
Code:

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
#     'grub2-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_DISTRIBUTOR="Gentoo"

# Default menu entry
#GRUB_DEFAULT=0

# Boot the default entry this many seconds after the menu is displayed
#GRUB_TIMEOUT=5
#GRUB_TIMEOUT_STYLE=menu

# Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
#
# Boot with systemd instead of sysvinit (openrc)
# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"

# Append parameters to the linux kernel command line for non-recovery entries
GRUB_CMDLINE_LINUX_DEFAULT="domdadm dolvm"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
GRUB_GFXMODE=640x480

# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
#GRUB_GFXPAYLOAD_LINUX=

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true

# Uncomment to disable generation of the submenu and put all choices on
# the top-level menu.
# Besides the visual affect of no sub menu, this makes navigation of the
# menu easier for a user who can't see the screen.
#GRUB_DISABLE_SUBMENU=y

# Uncomment to play a tone when the main menu is displayed.
# This is useful, for example, to allow users who can't see the screen
# to know when they can make a choice on the menu.
#GRUB_INIT_TUNE="60 800 1"


If anything else needed to move forward, let me know please.
Back to top
View user's profile Send private message
p3k
n00b
n00b


Joined: 29 Sep 2020
Posts: 5

PostPosted: Tue Sep 29, 2020 2:33 pm    Post subject: Reply with quote

Let me add also content of rc.log from new kernel:

Code:

rc sysinit logging started at Tue Sep 29 15:11:38 2020


   OpenRC 0.42.1 is starting up Gentoo Linux (x86_64)

 * /proc is already mounted
 * /run/openrc: creating directory
 * /run/lock: correcting mode
 * /run/lock: correcting owner
 * Caching service dependencies ...
 * Firewall for Gentoo by Peter v0.5 ...
 [ ok ]
 * Mounting security filesystem ...
 [ ok ]
 * Mounting debug filesystem ...
 [ ok ]
 * Mounting config filesystem ...
 [ ok ]
 * Mounting fuse control filesystem ...
 [ ok ]
 * Mounting SELinux filesystem ...
 [ ok ]
 * Mounting persistent storage (pstore) filesystem ...
 [ ok ]
 * Mounting efivarfs filesystem ...
 [ ok ]
 * Mounting cgroup filesystem ...
 [ ok ]
 * Remounting devtmpfs on /dev ...
 [ ok ]
 * Mounting /dev/mqueue ...
 [ ok ]
 * Creating list of required static device nodes for the current kernel ...
 [ ok ]
 * Starting udev ...
 [ ok ]
 * Generating a rule to create a /dev/root symlink ...
 [ ok ]
 * Populating /dev with existing devices through uevents ...
 [ ok ]

rc sysinit logging stopped at Tue Sep 29 15:11:38 2020


rc boot logging started at Tue Sep 29 15:11:38 2020

 * Loading kernel modules ...
insmod /lib/modules/5.4.60-gentoo-x86_64/kernel/drivers/net/tap.ko
 [ ok ]
 * Setting system clock using the hardware clock [UTC] ...
 [ ok ]
 * Mounting misc binary format filesystem ...
 [ ok ]
 * Loading custom binary format handlers ...
 [ ok ]
 * Starting up RAID devices ...
 *
 [ !! ]
 * Checking local filesystems  ...
fsck.ext4: No such file or directory while trying to open /dev/vg01/root
Possibly non-existent device?
 * Operational error
 [ !! ]
 * Remounting root filesystem read/write ...
 [ ok ]
 * Remounting filesystems ...
 [ ok ]
 * Updating /etc/mtab ...
 * Creating mtab symbolic link
 [ ok ]
 * Activating swap devices ...
 [ ok ]
 * Mounting local filesystems ...
mount: /home: special device /dev/vg01/home does not exist.
mount: /tmp: special device /dev/vg01/tmp does not exist.
mount: /var: special device /dev/vg01/var does not exist.
mount: /data: special device /dev/vg01/data does not exist.
 * Some local filesystem failed to mount
 [ !! ]
 * Configuring kernel parameters ...
 [ ok ]
 * Creating user login records ...
 [ ok ]
 * Wiping /tmp directory ...
 [ ok ]
 * Setting hostname to dev  ...
 [ ok ]
 * Setting terminal encoding [UTF-8] ...
 [ ok ]
 * Setting keyboard mode [UTF-8] ...
 [ ok ]
 * Loading key mappings [us] ...
 [ ok ]
 * Bringing up network interface lo ...
 [ ok ]
 * Saving key mapping ...
 [ ok ]
 * Saving terminal encoding ...
 [ ok ]
 * Initializing random number generator ...
 [ ok ]

rc boot logging stopped at Tue Sep 29 15:11:46 2020


rc default logging started at Tue Sep 29 15:11:46 2020

 * /run/lvm: creating directory
 * Starting lvmetad ...
 [ ok ]
 * Starting the Logical Volume Manager ...
  Reading volume groups from cache.
  Found volume group "vg01" using metadata type lvm2
  5 logical volume(s) in volume group "vg01" now active
 [ ok ]
 * Bringing up interface lan
 *   Caching network module dependencies
 [ ok ]
 * Bringing up interface tap0
 *   Caching network module dependencies
 *   Creating Tun/Tap interface tap0 ...
 [ ok ]
 [ ok ]
 * Bringing up interface br0
 *   Caching network module dependencies
 *   Creating bridge br0 ...
 *   Setting forward_delay: 0
 *   Setting hello_time: 200
 *   Setting stp_state: 1
 *   Adding ports to br0
 *     tap0 ...
 [ ok ]
 *     lan ...
 [ ok ]
 *   10.10.90.254/24 ...
 [ ok ]
 * Bringing up interface wan
 *   Caching network module dependencies
 [ ok ]
 * Bringing up interface ppp0
 *   Caching network module dependencies
 *   Starting pppd in ppp0 ...
 [ ok ]
 *   Backgrounding ...
 * WARNING: net.ppp0 has started, but is inactive
 * Starting sysklogd ...
 [ ok ]
 * Checking mysqld configuration for mysql ...
2020-09-29 15:11:53 0 [Warning] No argument was provided to --log-bin and neither --log-basename or --log-bin-index where used;  This may cause repliction to break when this server acts as a master and has its hostname changed! Please use '--log-basename=dev' or '--log-bin=mysqld-bin' to avoid this problem.
2020-09-29 15:11:53 0 [ERROR] mysqld: File './mysqld-bin.index' not found (Errcode: 13 "Permission denied")
2020-09-29 15:11:53 0 [ERROR] Aborting
 * mysql config check failed
 [ !! ]
 * ERROR: mysql failed to start
 * WARNING: openvpn will start when net.ppp0 has started
 * WARNING: netmount will start when net.ppp0 has started
 * Starting sshd ...
 [ ok ]
 * Starting service scan ...
 [ ok ]
 * WARNING: apache2 will start when net.ppp0 has started
 * WARNING: dhcpd will start when net.ppp0 has started
 * Creating missing spooldir '/var/spool/fcron' ...
 [ !! ]
 * ERROR: fcron failed to start
 * /etc/init.d/firewall uses runscript, please convert to openrc-run.
 * WARNING: firewall will start when net.ppp0 has started
 * Starting mdadm monitor ...
 [ ok ]
 * WARNING: minidlna will start when net.ppp0 has started
 * Starting mongodb ...
 [ ok ]
 * WARNING: samba will start when net.ppp0 has started
 * /var/run/transmission: correcting owner
 * Starting transmission-daemon ...
 [ ok ]
 * Starting local ...
 [ ok ]
Back to top
View user's profile Send private message
p3k
n00b
n00b


Joined: 29 Sep 2020
Posts: 5

PostPosted: Tue Sep 29, 2020 2:38 pm    Post subject: Reply with quote

Looking at rc. log i discovered, during sytem boot, lvm components are not loaded during "rc boot" but in later stage - in "rc default".
I am going to check if moving lvm to earlier boot stage will not help.

Code:

#rc-update
              apache2 |      default                           
               binfmt | boot                                   
             bootmisc | boot                                   
              cgroups |                                 sysinit
                devfs |                                 sysinit
                dhcpd |      default                           
                dmesg |                                 sysinit
                fcron |      default                           
             firewall |      default                           
                 fsck | boot                                   
             hostname | boot default                           
              hwclock | boot                                   
              keymaps | boot                                   
            killprocs |                        shutdown       
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork                 
           localmount | boot                                   
             loopback | boot                                   
                  lvm |      default                           
                mdadm |      default                           
               mdraid | boot                                   
             minidlna |      default                           
              modules | boot                                   
              mongodb |      default                           
             mount-ro |                        shutdown       
                 mtab | boot                                   
                mysql |      default                           
              net.br0 |      default                           
             net.ppp0 |      default                           
             net.tap0 |      default                           
             netmount |      default                           
              openvpn |      default                           
               procfs | boot                                   
                 root | boot                                   
                samba |      default                           
         save-keymaps | boot                                   
    save-termencoding | boot                                   
            savecache |                        shutdown       
                 sshd |      default                           
               svscan |      default                           
                 swap | boot                                   
               sysctl | boot                                   
                sysfs |                                 sysinit
             sysklogd |      default                           
         termencoding | boot                                   
  transmission-daemon |      default                           
                 udev |                                 sysinit
         udev-trigger |                                 sysinit
              urandom | boot
Back to top
View user's profile Send private message
p3k
n00b
n00b


Joined: 29 Sep 2020
Posts: 5

PostPosted: Tue Sep 29, 2020 2:45 pm    Post subject: Reply with quote

And surprisingly YES - this helps completely. Issue is resolved.
Anyway it is not clear to me, why old kernel has no complains, but with new one it won`t work with old rc-update settings.

@alamahant, do you have a clue?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3949

PostPosted: Tue Sep 29, 2020 11:12 pm    Post subject: Reply with quote

I have lmv on boot and lvmetad on default.
I dont know...
The old kernel was lucky I guess.....
:D
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Sep 30, 2020 11:17 am    Post subject: Reply with quote

p3k,

Code:
localmount | boot
is correct.
Its localmount that reads /etc/fstab' so
Code:
    lvm |      default 
starting lvm after boot the boot runlevel is complete is a bit late for localmount.

However, /etc/init.d/localmount says
Code:
description="Mounts disks and swap according to /etc/fstab."

depend()
{
        need fsck
        use lvm modules mtab
        after lvm modules
        keyword -jail -prefix -systemd-nspawn -vserver -lxc

}
so you should be OK now.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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