Bug 842976

Summary: [dracut] udevd failed to execute '/sbin/partx'
Product: Red Hat Enterprise Linux 7 Reporter: Xiaowei Li <xiaoli>
Component: dracutAssignee: dracut-maint
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: harald, qcai
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-024-25.git20130205.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-27 04:13:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xiaowei Li 2012-07-25 08:02:01 UTC
Description of problem:
2 issues:
1. udevd failed to execute /sbin/partx since no such command from the filesystem
2. mpath devices is created but the mpath partition is not created. so fail to mount the partition via /dev/sdx1. 
>>workaround: multipath -F to remove the mpath devices


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:

udevd[258]: failed to execute '/sbin/partx' '/sbin/partx -d --nr 1-102[   15.620269] sd 6:0:0:0: [sde] Write cache: enabled, read cache: enabled, supports DPO and FUA
4 /dev/sdd': No such file or directory

udevd[269]: failed to execute '/sbin/partx' '/sbin/partx -d --nr 1-1024 /dev/sdb': No such file or directory

udevd[288]: failed to execute '/sbin/partx' '/sbin/partx -d --nr 1-1024 /dev/sda': No such file or directory

mount: /dev/sda2 is already mounted or /sysroot busy
umount: /sysroot: not mounted
e2fsck: Device or resource busy while trying to open /dev/disk/by-uuid/d2a5fe7d-f972-4d82-b50a-ff115a872729
dracut Warning: e2fsck returned with 8
dracut Warning: Filesystem mounted or opened exclusively by another program?
dracut Warning: *** An error occurred during the file system check.
dracut Warning: *** Dropping you to a shell; the system will try
dracut Warning: *** to mount the filesystem(s), when yo[   15.670571]  sde: sde1 sde2 sde3
u leave the shell.


dracut Warning: 

Dropping to debug shell.

>>> some investigation >>>
# /sbin/partx
sh: /sbin/partx: No such file or directory  >>> no such command

(Repair filesystem):/# multipath -l
mpathb (20090ef127000004a) dm-0 IQSTOR,iQ2880
size=50G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=0 status=active
| `- 5:0:1:0 sdc 8:32  active undef running
|-+- policy='round-robin 0' prio=0 status=enabled
| `- 5:0:0:0 sda 8:0   active undef running
|-+- policy='round-robin 0' prio=0 status=enabled
| `- 6:0:1:0 sdg 8:96  active undef running
`-+- policy='round-robin 0' prio=0 status=enabled
  `- 6:0:0:0 sde 8:64  active undef running
mpatha (20090ef1270000082) dm-1 IQSTOR,iQ2880
size=9.9G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=0 status=active
| `- 5:0:0:1 sdb 8:16  active undef running
|-+- policy='round-robin 0' prio=0 status=enabled
| `- 6:0:0:1 sdf 8:80  active undef running
|-+- policy='round-robin 0' prio=0 status=enabled
| `- 6:0:1:1 sdh 8:112 active undef running
`-+- policy='round-robin 0' prio=0 status=enabled
  `- 5:0:1:1 sdd 8:48  active undef running

(Repair filesystem):/# ls /dev/mapper/
control  mpatha  mpathb   >>>> don't see the mpath partition 

(Repair filesystem):/# fsck /dev/sda1
fsck from util-linux 2.21.1
e2fsck 1.42.3 (14-May-2012)
fsck.ext4: Device or resource busy while trying to open /dev/sda1
Filesystem mounted or opened exclusively by another program?

# multipath -F >> remove the mpath 

(Repair filesystem): exit >> can continue to boot the os now, but boot to the emergency mode since only the rootfs partition is created.

Welcome to emergency mode. Use "systemctl default" or ^D to enter default mode.
Give root password for maintenance
(or type Control-D to continue): 
[root@storageqe-17 ~]# df
Filesystem     1K-blocks    Used Available Use% Mounted on
rootfs          41653508 1728108  37838336   5% /
devtmpfs         3928248       0   3928248   0% /dev
tmpfs            3937284       0   3937284   0% /dev/shm
tmpfs            3937284     584   3936700   1% /run
/dev/sde2       41653508 1728108  37838336   5% /
tmpfs            3937284       0   3937284   0% /sys/fs/cgroup
tmpfs            3937284       0   3937284   0% /media
[root@storageqe-17 ~]# ls /dev/sd*
/dev/sda  /dev/sdc  /dev/sde   /dev/sdf  /dev/sdh
/dev/sdb  /dev/sdd  /dev/sde2  /dev/sdg
[root@storageqe-17 ~]# kpartx  /dev/sde
sde1 : 0 1024000 /dev/sde 2048
sde2 : 0 83482624 /dev/sde 1026048
sde3 : 0 20217856 /dev/sde 84508672
[root@storageqe-17 ~]# partprobe 
device-mapper: table ioctl on  failed: No such device or address
device-mapper: table ioctl on  failed: No such device or address
[root@storageqe-17 ~]# ls /dev/sd*
/dev/sda   /dev/sda3  /dev/sdc1  /dev/sdd   /dev/sde2  /dev/sdg   /dev/sdg3
/dev/sda1  /dev/sdb   /dev/sdc2  /dev/sde   /dev/sde3  /dev/sdg1  /dev/sdh
/dev/sda2  /dev/sdc   /dev/sdc3  /dev/sde1  /dev/sdf   /dev/sdg2
[root@storageqe-17 ~]# mount /boot
[ 1339.907229] EXT4-fs (sde1): mounted filesystem with ordered data mode. Opts: (null)
[ 1339.948911] SELinux: initialized (dev sde1, type ext4), uses xattr
[root@storageqe-17 ~]# df
Filesystem     1K-blocks    Used Available Use% Mounted on
rootfs          41653508 1728108  37838336   5% /
devtmpfs         3928248       0   3928248   0% /dev
tmpfs            3937284       0   3937284   0% /dev/shm
tmpfs            3937284     584   3936700   1% /run
/dev/sde2       41653508 1728108  37838336   5% /
tmpfs            3937284       0   3937284   0% /sys/fs/cgroup
tmpfs            3937284       0   3937284   0% /media
/dev/sde1         508745   55094    428051  12% /boot

Comment 1 Harald Hoyer 2012-07-25 11:03:20 UTC
very strange... partx is part of util-linux.. it should have been installed on the system.

Can you post the output of:

# lsinitrd &> dracut-debug.txt
# dracut --debug -f test.img &>> dracut-debug.txt

Comment 2 Xiaowei Li 2012-07-26 08:56:33 UTC
(In reply to comment #1)
> very strange... partx is part of util-linux.. it should have been installed
> on the system.
> 
> Can you post the output of:
> 
> # lsinitrd &> dracut-debug.txt
> # dracut --debug -f test.img &>> dracut-debug.txt

has kpartx in the initrd.img but no partx.

attaching the debug txt.

Comment 4 Xiaowei Li 2012-07-26 09:03:45 UTC
using RHEL-7.0-20120711.2 tree.
dracut-018-65.git20120612.el7.noarch

Comment 5 Harald Hoyer 2012-07-26 10:55:14 UTC
ok, fixed upstream

Comment 6 Xiaowei Li 2012-07-27 06:52:10 UTC
(In reply to comment #5)
> ok, fixed upstream

I am curious the root cause. can you provide the patch link?

Comment 9 Harald Hoyer 2013-02-26 09:32:45 UTC
fixed with dracut-024-25.git20130205.el7

Comment 10 Xiaowei Li 2013-04-27 04:13:52 UTC
didn't hit this issue on my SAN boot test cases on tree RHEL-7.0-20130403.0 including dracut-024-29.git20130227.el7.x86_64.rpm