Bug 1286799 - Mounting sysroot fails with root=iscsi
Mounting sysroot fails with root=iscsi
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: dracut-maint-list
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-30 13:32 EST by martinjilg
Modified: 2015-12-01 07:36 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-01 07:36:25 EST
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)
Report generated by dracut (93.08 KB, text/plain)
2015-11-30 13:32 EST, martinjilg
no flags Details

  None (edit)
Description martinjilg 2015-11-30 13:32:30 EST
Created attachment 1100580 [details]
Report generated by dracut

Description of problem:
We have a diskless setup where we boot client machines via PXE-boot 
with the Fedora root filesystem provided read-only via iSCSI. 
During PXE-boot, the client machines receive the kernel, a non-hostonly 
initramfs created with dracut, and a kernel command line containing
"root=iscsi..." to locate the root device (see attachments).
This setup worked fine for us since Fedora 20.
However, after upgrading to Fedora 23, the boot process fails when 
trying to mount the iscsi root to /sysroot.
Interestingly, the iscsi target is already connected properly at this point, 
i.e. the block device shows up (/dev/sdb). Furthermore, /dev/root correctly points on this block device, and when executing mount -a, /sysroot is
mounted as expected. The problem seems to be caused by the auto-generated file
/run/systemd/generator/sysroot.mount, which can not be handled correctly
by the mount command.
Despite the hostonly="no", we do not use any non-default dracut config.

We attach the following files and information below (please note that personal information has been anonymized):
1) cmdline - the kernel command line passed during PXE-boot
2) dracut-shell_fstab - the /etc/fstab found in the dracut emergency shell
3) dracut-shell_sysroot.mount - the above mentioned sysroot.mount file which causes the error
4) dracut-shell_systemctl-status-sysroot.mount - the output of systemctl status sysroot.mount
executed in the dracut emergency shell
5) fstab - the fstab file of the root file system
6) rdsosreport.txt - auto-generated by dracut

If we can help by providing further information please don't hesitate to ask.



Version-Release number of selected component (if applicable):
Fedora 23
dracut  Version: 043 Release: 61.git20151120.fc23
systemd Version: 222 Release: 8.fc23


How reproducible:
Set up PXE-boot with root=iscsi and perform PXE-boot.


Steps to Reproduce:
1.
2.
3.

Actual results:
Mounting /sysroot fails and dracut drops to an emergency shell.


Expected results:
/sysroot is mounted properly and the boot process continues.


Additional info:

1) cmdline
initrd=initrd.img_fedoraA ro root=iscsi:192.168.178.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.disklessA readonlyroot vconsole.keymap=de BOOT_IMAGE=vmlinuz_fedoraA BOOTIF=01-aa-bb-cc-dd-ee-ff 

2) dracut-shell_fstab
/dev/root /sysroot auto ro,x-initrd.mount 0 0

3) dracut-shell_sysroot.mount
# Automatically generated by systemd-fstab-generator

[Unit]
SourcePath=/proc/cmdline
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=initrd-root-fs.target

[Mount]
What=iscsi:192.168.178.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.disklessA
Where=/sysroot
Options=ro

4) dracut-shell_systemctl-status-sysroot.mount
● sysroot.mount - /sysroot
   Loaded: loaded (/proc/cmdline)
   Active: failed (Result: exit-code) since Mon 2015-11-30 17:45:24 UTC; 2min 52s ago
    Where: /sysroot
     What: iscsi:192.168.178.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.disklessA
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 802 ExecMount=/usr/bin/mount iscsi:192.168.178.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.disklessA /sysroot -o ro (code=exited, status=32)

Nov 30 17:45:24 my-pc2.my.domain.de systemd[1]: Mounting /sysroot...
Nov 30 17:45:24 my-pc2.my.domain.de mount[802]: mount.nfs: Failed to resolve server iscsi: No address associated with hostname
Nov 30 17:45:24 my-pc2.my.domain.de systemd[1]: sysroot.mount: Mount process exited, code=exited status=32
Nov 30 17:45:24 my-pc2.my.domain.de systemd[1]: Failed to mount /sysroot.
Nov 30 17:45:24 my-pc2.my.domain.de systemd[1]: sysroot.mount: Unit entered failed state.

5) fstab
# rootfs
UUID=5b600a5a-a9ff-47ad-af07-32208aedbc4d /   ext4   defaults    1 1

# home
192.168.178.1:/home  /home  nfs4  sec=krb5,rw,noatime,nodiratime,noacl 0 0

6) rdsosreport.txt
See attached file
Comment 1 Harald Hoyer 2015-12-01 02:36:57 EST
Could you please try version 044 from rawhide.
Comment 2 Harald Hoyer 2015-12-01 02:42:26 EST
Oh, maybe no need to use 044...

Instead of:
root=iscsi:192.178.168.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.disklessA

you may specify:

root=LABEL=fedora
netroot=iscsi:192.178.168.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.disklessA
Comment 3 martinjilg 2015-12-01 07:36:25 EST
(In reply to Harald Hoyer from comment #2)
> Oh, maybe no need to use 044...
> 
> Instead of:
> root=iscsi:192.178.168.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.
> disklessA
> 
> you may specify:
> 
> root=LABEL=fedora
> netroot=iscsi:192.178.168.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.
> disklessA

We weren't aware of this option. Using:

root=UUID=5b600a5a-a9ff-47ad-af07-32208aedbc4d
netroot=iscsi:192.178.168.1::::iqn.2003-01.org.linux-iscsi.my-pc1.x8664:sn.disklessA

solved the problem. Thanks!

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