Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Genkernel - LVM issue
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
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 57

PostPosted: Thu Nov 28, 2024 8:25 am    Post subject: Genkernel - LVM issue Reply with quote

Hello All, When i wonted to extend /usr lvm volume so i found out that is incorrect mounted. Volume is lvm, but mounted is as dm-8. Same is for root /:

Code:

pc-marek1 /etc # df -h | grep dm-5
/dev/dm-5                     15G   41M   14G   1% /

pc-marek1 /etc # df -h | grep usr
/dev/dm-8                     20G   15G  3.6G  81% /usr
/dev/mapper/system-portage    15G  1.9G   13G  14% /usr/portage
/dev/mapper/system-src        20G   13G  5.8G  69% /usr/src


I tried investigate issue and in dmesg i found that during booting is some problem with lvm, probably some commands missing(failed to execute >>> No such file or directory):

Code:
pc-marek1 /etc # dmesg | grep -i lvm
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.12.1-gentoo-x86_64 root=/dev/mapper/system-root ro dolvm domdadm rootfstype=ext4 pv6.disable=1 mitigations=auto rd.driver.blacklist=nouveau nouveau.modeset=0 nvidia_drm.modeset=1 video=vesafb:off,efifb:on rd.lvm.vg=system
[    0.279490] Kernel command line: BOOT_IMAGE=/vmlinuz-6.12.1-gentoo-x86_64 root=/dev/mapper/system-root ro dolvm domdadm rootfstype=ext4 pv6.disable=1 mitigations=auto rd.driver.blacklist=nouveau nouveau.modeset=0 nvidia_drm.modeset=1 video=vesafb:off,efifb:on rd.lvm.vg=system
[    0.279698] Unknown kernel command line parameters "dolvm domdadm BOOT_IMAGE=/vmlinuz-6.12.1-gentoo-x86_64", will be passed to user space.
[    2.649439]     dolvm
[    3.979142] udevd[2401]: failed to execute '/usr/bin/systemd-run' '/usr/bin/systemd-run --no-block --property DefaultDependencies=no --unit lvm-activate-system /usr/sbin/lvm vgchange -aay --autoactivation event system': No such file or directory
[    4.002315] udevd[2402]: failed to execute '/usr/bin/systemd-run' '/usr/bin/systemd-run --no-block --property DefaultDependencies=no --unit lvm-activate-data02 /usr/sbin/lvm vgchange -aay --autoactivation event data02': No such file or directory
[    4.002376] udevd[2403]: failed to execute '/usr/bin/systemd-run' '/usr/bin/systemd-run --no-block --property DefaultDependencies=no --unit lvm-activate-kvm-storage /usr/sbin/lvm vgchange -aay --autoactivation event kvm-storage': No such file or directory
[    4.002417] udevd[2404]: failed to execute '/usr/bin/systemd-run' '/usr/bin/systemd-run --no-block --property DefaultDependencies=no --unit lvm-activate-data01 /usr/sbin/lvm vgchange -aay --autoactivation event data01': No such file or directory
[    6.697823] systemd[1]: Listening on LVM2 poll daemon socket.
[    6.733309] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...


It look like that in vmlinuz-6.12.1-gentoo-x86_64 missing some lvm commnads. After mounting root and usr as dm-X devices are rest of lvm volumes mounted correctly.
kernel I commpile via genkernel:

Code:
pc-marek1 /etc # genkernel --oldconfig --lvm --mdadm all


In /etc/default/grub i have line:

Code:
GRUB_CMDLINE_LINUX="dolvm domdadm rootfstype=ext4 pv6.disable=1 mitigations=auto rd.driver.blacklist=nouveau nouveau.modeset=0 nvidia_drm.modeset=1 video=vesafb:off,efifb:on rd.lvm.vg=system"


I checked "how to" of grub, lvm and genkernel but i didn't find nothing useful. Please help me.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 57

PostPosted: Thu Nov 28, 2024 8:47 am    Post subject: Re: Genkernel - LVM issue Reply with quote

I tried extract initramfs-6.12.1-gentoo-x86_64.img and there missing commnad/file systemd-run

Code:
pc-marek1 ~/test # file /boot/initramfs-6.12.1-gentoo-x86_64.img
/boot/initramfs-6.12.1-gentoo-x86_64.img: XZ compressed data, checksum NONE

pc-marek1 ~/test # xzcat /boot/initramfs-6.12.1-gentoo-x86_64.img | cpio -idm

pc-marek1 ~/test # find . | grep systemd-run
pc-marek1 ~/test #
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2038

PostPosted: Thu Nov 28, 2024 3:28 pm    Post subject: Reply with quote

See bug 944499.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 57

PostPosted: Thu Nov 28, 2024 3:59 pm    Post subject: Reply with quote

Yes i saw it and past there my issues, but bug is for "systems without systemd" and i use systemd...
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 57

PostPosted: Thu Nov 28, 2024 8:14 pm    Post subject: Reply with quote

command:
Code:
dracut --force --add systemd --add lvm /boot/initramfs-$(uname -r).img $(uname -r)


fixed all my trouble with udev and mainly with mount of root and usr:

Code:
pc-marek1 ~ # df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/system-root       15G  156M   14G   2% /
/dev/mapper/system-usr        21G   15G  4.6G  77% /usr


all messages udev messages "No such file or directory" disappeared
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 283
Location: Pennsylvania, USA

PostPosted: Fri Nov 29, 2024 12:42 am    Post subject: Re: Genkernel - LVM issue Reply with quote

madurani wrote:
Hello All, When i wonted to extend /usr lvm volume so i found out that is incorrect mounted. Volume is lvm, but mounted is as dm-8.

I think your dm-8 mount is normal. For example on my computer:
Code:
$ mount -l -t ext4
/dev/mapper/vg0-root on / type ext4 (rw,relatime)
/dev/mapper/vg0-var on /var type ext4 (rw,relatime)
/dev/mapper/vg0-home on /home type ext4 (rw,relatime)
Code:
$ file /dev/mapper/vg0-{root,var,home}
/dev/mapper/vg0-root: symbolic link to ../dm-1
/dev/mapper/vg0-var:  symbolic link to ../dm-2
/dev/mapper/vg0-home: symbolic link to ../dm-3
The systemd errors are another matter.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 57

PostPosted: Fri Nov 29, 2024 7:05 am    Post subject: Re: Genkernel - LVM issue Reply with quote

Mount point with dm isn't problem. Problem is when you need extend this lvm volume, then you got error message

Code:
pc-marek1 /usr/portage/sys-kernel/genkernel # lvresize -r -L +1G /dev/mapper/system-root
  LV /dev/mapper/system-root mounted at / may have been renamed (from /dev/dm-5).
  File system resizing not supported: fs utilities do not support renamed devices.


dracut fixed it, now are volumes mounted correctly and lvextend and lvresize work .
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 283
Location: Pennsylvania, USA

PostPosted: Fri Nov 29, 2024 11:52 pm    Post subject: Reply with quote

Strange, but did you try this ?
Code:
# lvresize -r -L +1G /dev/dm-5
Oops, I see that it got fixed. Never mind.
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