Bug 827765 - Dracut-018 doesn't include lvm module in host-only mode
Dracut-018 doesn't include lvm module in host-only mode
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
19
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: dracut-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-02 17:48 EDT by Slava Gorbunov
Modified: 2013-08-20 09:13 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-20 09:13:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output of dracut --debug -H -f initramfs.img (1.52 MB, text/plain)
2012-06-05 12:21 EDT, Slava Gorbunov
no flags Details

  None (edit)
Description Slava Gorbunov 2012-06-02 17:48:03 EDT
I have system with root on separate partition and all other filesystems (/usr, /home etc.) on LVM. Dracut in host-only mode doesn't enable lvm module in this configuration, so initrd being produced is unable to mount /usr, which is required for fresh version of udev.

# dracut -H -f initramfs.img 
I: *** Including module: dash ***
I: *** Including module: i18n ***
gzip: /var/tmp/initramfs.O57CTo/usr/share/consolefonts/LatArCyrHeb-16.psfu already exists; do you wish to overwrite (y or n)? n
	not overwritten
I: *** Including module: kernel-modules ***
I: *** Including module: resume ***
I: *** Including module: rootfs-block ***
I: *** Including module: terminfo ***
I: *** Including module: udev-rules ***
I: Skipping udev rule: 50-udev.rules
I: Skipping udev rule: 95-late.rules
I: Skipping udev rule: 50-firmware.rules
I: *** Including module: usrmount ***
I: *** Including module: base ***
I: *** Including module: fs-lib ***
I: *** Including module: shutdown ***
I: *** Including modules done ***
I: Wrote /root/initramfs.img:
I: -rw-r--r-- 1 root root 3928987 Июн  3 01:43 /root/initramfs.img

This problem could be easily solved by specifying force_add_dracutmodules+="lvm" in config file, but the right solution, I suppose, is to fix lvm detection in dracut.

The detailed configuration foolows.

/etc/fstab:

/dev/sda2	/	ext3	rw	0 1
/dev/vg_ynout/usr	/usr	ext4	rw	0 1
/dev/vg_ynout/var	/var	ext4	rw	0 2
/dev/vg_ynout/home	/home	ext4	rw	0 2
/dev/vg_ynout/portage	/usr/portage	reiserfs	rw	0 2

/dev/vg_ynout/swap	none	swap	none	0 0

/usr/opt	/opt	none	bind	0 0

proc		/proc		proc	defaults		0 0
shm		/dev/shm	tmpfs	nodev,nosuid,noexec	0 0

# dmsetup ls --tree
vg_ynout-home (254:4)
 └─ (8:3)
vg_ynout-usr (254:2)
 └─ (8:3)
vg_ynout-var (254:3)
 └─ (8:3)
vg_ynout-portage (254:1)
 └─ (8:3)
vg_ynout-swap (254:0)
 └─ (8:3)

# blkid
/dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="07D9-0C04" TYPE="vfat" 
/dev/sda2: LABEL="root" UUID="37a0054c-c595-494d-8aaf-0f01156e719d" TYPE="ext3" 
/dev/sda3: UUID="DGSxwj-k4lJ-MRIU-lyoT-UJix-Dj0U-iYg0cV" TYPE="LVM2_member" 
/dev/mapper/vg_ynout-swap: UUID="6f78d495-da4d-4d9b-9f30-3c6e793d2c81" TYPE="swap" 
/dev/mapper/vg_ynout-portage: UUID="7c0cbfe8-b8a5-47be-a1c2-a5312763e68b" TYPE="reiserfs" 
/dev/mapper/vg_ynout-usr: LABEL="usr" UUID="1241a3d8-ef98-472c-833f-1c2afa168c38" TYPE="ext4" 
/dev/mapper/vg_ynout-var: LABEL="var" UUID="45de6d7d-3e56-4b31-af01-50d54026d180" TYPE="ext4" 
/dev/mapper/vg_ynout-home: LABEL="home" UUID="8b8bb9ea-afdd-4f34-9ff4-35ff537d4d5e" TYPE="ext4" 

# blkid -o udev
ID_FS_SEC_TYPE=msdos
ID_FS_LABEL=DellUtility
ID_FS_LABEL_ENC=DellUtility
ID_FS_UUID=07D9-0C04
ID_FS_UUID_ENC=07D9-0C04
ID_FS_TYPE=vfat

ID_FS_LABEL=root
ID_FS_LABEL_ENC=root
ID_FS_UUID=37a0054c-c595-494d-8aaf-0f01156e719d
ID_FS_UUID_ENC=37a0054c-c595-494d-8aaf-0f01156e719d
ID_FS_TYPE=ext3

ID_FS_UUID=DGSxwj-k4lJ-MRIU-lyoT-UJix-Dj0U-iYg0cV
ID_FS_UUID_ENC=DGSxwj-k4lJ-MRIU-lyoT-UJix-Dj0U-iYg0cV
ID_FS_TYPE=LVM2_member

ID_FS_UUID=6f78d495-da4d-4d9b-9f30-3c6e793d2c81
ID_FS_UUID_ENC=6f78d495-da4d-4d9b-9f30-3c6e793d2c81
ID_FS_TYPE=swap

ID_FS_UUID=7c0cbfe8-b8a5-47be-a1c2-a5312763e68b
ID_FS_UUID_ENC=7c0cbfe8-b8a5-47be-a1c2-a5312763e68b
ID_FS_TYPE=reiserfs

ID_FS_LABEL=usr
ID_FS_LABEL_ENC=usr
ID_FS_UUID=1241a3d8-ef98-472c-833f-1c2afa168c38
ID_FS_UUID_ENC=1241a3d8-ef98-472c-833f-1c2afa168c38
ID_FS_TYPE=ext4

ID_FS_LABEL=var
ID_FS_LABEL_ENC=var
ID_FS_UUID=45de6d7d-3e56-4b31-af01-50d54026d180
ID_FS_UUID_ENC=45de6d7d-3e56-4b31-af01-50d54026d180
ID_FS_TYPE=ext4

ID_FS_LABEL=home
ID_FS_LABEL_ENC=home
ID_FS_UUID=8b8bb9ea-afdd-4f34-9ff4-35ff537d4d5e
ID_FS_UUID_ENC=8b8bb9ea-afdd-4f34-9ff4-35ff537d4d5e
ID_FS_TYPE=ext4

# lvm pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               vg_ynout
  PV Size               232,20 GiB / not usable 2,55 MiB
  Allocatable           yes 
  PE Size               4,00 MiB
  Total PE              59443
  Free PE               3123
  Allocated PE          56320
  PV UUID               DGSxwj-k4lJ-MRIU-lyoT-UJix-Dj0U-iYg0cV
   
# lvm vgdisplay
  --- Volume group ---
  VG Name               vg_ynout
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  20
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                5
  Open LV               5
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232,20 GiB
  PE Size               4,00 MiB
  Total PE              59443
  Alloc PE / Size       56320 / 220,00 GiB
  Free  PE / Size       3123 / 12,20 GiB
  VG UUID               TCWHRs-dnkU-d3a5-bekB-uTf0-fUL5-WNwBZa
   
# lvm lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg_ynout/swap
  VG Name                vg_ynout
  LV UUID                DmTrAs-jTeb-kpz8-bg9a-Zb1M-ebj2-dMGQH0
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                4,00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0
   
  --- Logical volume ---
  LV Name                /dev/vg_ynout/portage
  VG Name                vg_ynout
  LV UUID                Q9c3Mp-D1cZ-WmMx-Ngoj-BStd-eNii-Wv0moR
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                1,00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1
   
  --- Logical volume ---
  LV Name                /dev/vg_ynout/usr
  VG Name                vg_ynout
  LV UUID                yp9N5u-bz8e-VcaP-peIZ-VrQb-O0l0-Gl4TnF
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                20,00 GiB
  Current LE             5120
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2
   
  --- Logical volume ---
  LV Name                /dev/vg_ynout/var
  VG Name                vg_ynout
  LV UUID                CqiG92-AdpS-fkuN-xiRq-z5Uc-jdoh-72xdik
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                5,00 GiB
  Current LE             1280
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:3
   
  --- Logical volume ---
  LV Name                /dev/vg_ynout/home
  VG Name                vg_ynout
  LV UUID                O4CwRV-ag2u-QoXV-Gx9V-DVdS-sP5O-5CHIZe
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                190,00 GiB
  Current LE             48640
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:4
Comment 1 Harald Hoyer 2012-06-04 05:48:17 EDT
can you attach the output of :

# dracut --debug -H -f initramfs.img
Comment 2 Slava Gorbunov 2012-06-05 12:21:02 EDT
Created attachment 589571 [details]
Output of dracut --debug -H -f initramfs.img
Comment 3 Slava Gorbunov 2012-06-05 12:24:51 EDT
Another issue: the initramfs created by dracut on my system with force_add_dracutmodules+="lvm" still doesn't activate lvm during boot (despite the fact that lvm binary is included in initramfs).
Comment 4 Harald Hoyer 2012-06-05 12:32:20 EDT
What is the output of:

$ udevadm info --query=property --name=/dev/sda3
Comment 5 Slava Gorbunov 2012-06-05 12:33:56 EDT
# udevadm info --query=property --name=/dev/sda3
DEVLINKS=/dev/disk/by-id/ata-Hitachi_HTS723225L9A362_091126FC3D00NJGYLPMG-part3 /dev/disk/by-id/wwn-0x5000cca583cd74f3-part3
DEVNAME=/dev/sda3
DEVPATH=/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda3
DEVTYPE=partition
ID_ATA=1
ID_ATA_DOWNLOAD_MICROCODE=1
ID_ATA_FEATURE_SET_AAM=1
ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=254
ID_ATA_FEATURE_SET_AAM_ENABLED=0
ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=128
ID_ATA_FEATURE_SET_APM=1
ID_ATA_FEATURE_SET_APM_CURRENT_VALUE=128
ID_ATA_FEATURE_SET_APM_ENABLED=1
ID_ATA_FEATURE_SET_HPA=1
ID_ATA_FEATURE_SET_HPA_ENABLED=1
ID_ATA_FEATURE_SET_PM=1
ID_ATA_FEATURE_SET_PM_ENABLED=1
ID_ATA_FEATURE_SET_PUIS=1
ID_ATA_FEATURE_SET_PUIS_ENABLED=0
ID_ATA_FEATURE_SET_SECURITY=1
ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=84
ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=82
ID_ATA_FEATURE_SET_SECURITY_FROZEN=1
ID_ATA_FEATURE_SET_SMART=1
ID_ATA_FEATURE_SET_SMART_ENABLED=1
ID_ATA_ROTATION_RATE_RPM=7200
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_ATA_SATA_SIGNAL_RATE_GEN2=1
ID_ATA_WRITE_CACHE=1
ID_ATA_WRITE_CACHE_ENABLED=1
ID_BUS=ata
ID_FS_TYPE=LVM2_member
ID_FS_USAGE=raid
ID_FS_UUID=DGSxwj-k4lJ-MRIU-lyoT-UJix-Dj0U-iYg0cV
ID_FS_UUID_ENC=DGSxwj-k4lJ-MRIU-lyoT-UJix-Dj0U-iYg0cV
ID_FS_VERSION=LVM2 001
ID_MODEL=Hitachi_HTS723225L9A362
ID_MODEL_ENC=Hitachi\x20HTS723225L9A362\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_PART_ENTRY_DISK=8:0
ID_PART_ENTRY_NUMBER=3
ID_PART_ENTRY_OFFSET=1429785
ID_PART_ENTRY_SCHEME=dos
ID_PART_ENTRY_SIZE=486962280
ID_PART_ENTRY_TYPE=0x8e
ID_PART_TABLE_TYPE=dos
ID_REVISION=FCDOC3F9
ID_SERIAL=Hitachi_HTS723225L9A362_091126FC3D00NJGYLPMG
ID_SERIAL_SHORT=091126FC3D00NJGYLPMG
ID_TYPE=disk
ID_WWN=0x5000cca583cd74f3
ID_WWN_WITH_EXTENSION=0x5000cca583cd74f3
MAJOR=8
MINOR=3
SUBSYSTEM=block
UDISKS_PARTITION=1
UDISKS_PARTITION_ALIGNMENT_OFFSET=0
UDISKS_PARTITION_NUMBER=3
UDISKS_PARTITION_OFFSET=732049920
UDISKS_PARTITION_SCHEME=mbr
UDISKS_PARTITION_SIZE=249324687360
UDISKS_PARTITION_SLAVE=/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
UDISKS_PARTITION_TYPE=0x8e
UDISKS_PRESENTATION_NOPOLICY=0
USEC_INITIALIZED=7324297
Comment 6 Harald Hoyer 2012-06-05 12:40:33 EDT
hmm, seems like you are missing /lib/udev/rules.d/11-dm-lvm.rules

which contains something like:

IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"

which sets

#   DM_LV_NAME - logical volume name
#   DM_VG_NAME - volume group name
Comment 7 Harald Hoyer 2012-06-05 12:45:35 EDT
(In reply to comment #6)
> hmm, seems like you are missing /lib/udev/rules.d/11-dm-lvm.rules
> 
> which contains something like:
> 
> IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup splitname --nameprefixes
> --noheadings --rows $env{DM_NAME}"
> 
> which sets
> 
> #   DM_LV_NAME - logical volume name
> #   DM_VG_NAME - volume group name

scratch that comment...
Comment 8 Harald Hoyer 2012-06-05 12:56:57 EDT
I would need:

# udevadm info --query=property --name=/dev/vg_ynout/usr
Comment 9 Slava Gorbunov 2012-06-05 13:10:43 EDT
# udevadm info --query=property --name=/dev/vg_ynout/usr
DEVNAME=/dev/dm-2
DEVPATH=/devices/virtual/block/dm-2
DEVTYPE=disk
DM_SBIN_PATH=/sbin
DM_UDEV_DISABLE_DISK_RULES_FLAG=1
DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
MAJOR=254
MINOR=2
SUBSYSTEM=block
UDISKS_PRESENTATION_NOPOLICY=1
USEC_INITIALIZED=4443556
Comment 10 Harald Hoyer 2012-06-05 13:14:14 EDT
(In reply to comment #9)
> # udevadm info --query=property --name=/dev/vg_ynout/usr
> DEVNAME=/dev/dm-2
> DEVPATH=/devices/virtual/block/dm-2
> DEVTYPE=disk
> DM_SBIN_PATH=/sbin
> DM_UDEV_DISABLE_DISK_RULES_FLAG=1
> DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
> DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
> MAJOR=254
> MINOR=2
> SUBSYSTEM=block
> UDISKS_PRESENTATION_NOPOLICY=1
> USEC_INITIALIZED=4443556

Ok, here ID_FS_TYPE is missing and  DM_LV_NAME and DM_VG_NAME like I said in comment 6.

Seems like some udev rules are missing on your system. This is gentoo, right?
Comment 11 fpemud 2012-07-07 09:21:07 EDT
I encountered this problem in excatly the same way. Yes I'm using gentoo.

Here is my root device:
fpemud-workstation fpemud # udevadm info --query=property --name=/dev/vg0/root
UDEV_LOG=3
DEVPATH=/devices/virtual/block/dm-1
MAJOR=253
MINOR=1
DEVNAME=/dev/dm-1
DEVTYPE=disk
SUBSYSTEM=block
DM_SBIN_PATH=/sbin
DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
DM_UDEV_DISABLE_DISK_RULES_FLAG=1
DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
DEVLINKS=/dev/root
Comment 12 fpemud 2012-07-07 09:24:53 EDT
But I have the file 11-dm-lvm.rules.
So perhaps it is not a dracut bug, I shall find why this rule does not take effect.

fpemud-workstation / # cat /lib/udev/rules.d/11-dm-lvm.rules 
# Copyright (C) 2009 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.

# Udev rules for LVM.
#
# These rules create symlinks for LVM logical volumes in
# /dev/VG directory (VG is an actual VG name). Some udev
# environment variables are set (they can be used in later
# rules as well):
#   DM_LV_NAME - logical volume name
#   DM_VG_NAME - volume group name
#   DM_LV_LAYER - logical volume layer (blank if not set)

# "add" event is processed on coldplug only!
ACTION!="add|change", GOTO="lvm_end"
ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
ENV{DM_UUID}!="LVM-?*", GOTO="lvm_end"

# Use DM name and split it up into its VG/LV/layer constituents.
IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"

ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"

# Do not create symlinks for inappropriate subdevices.
ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"

# Create symlinks for top-level devices only.
ENV{DM_VG_NAME}=="?*", ENV{DM_LV_NAME}=="?*", SYMLINK+="$env{DM_VG_NAME}/$env{DM_LV_NAME}", GOTO="lvm_end"

LABEL="lvm_disable"
ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}="1"
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
OPTIONS:="nowatch"

LABEL="lvm_end"
Comment 13 Fedora End Of Life 2013-04-03 15:19:39 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 14 Harald Hoyer 2013-05-29 09:49:29 EDT
any more info?

Note You need to log in before you can comment on or make changes to this bug.