Bug 699750

Summary: /etc/init/device_cio_free.conf needs to be rewritten for systemd
Product: [Fedora] Fedora Reporter: Jan Stodola <jstodola>
Component: s390utilsAssignee: Dan HorĂ¡k <dan>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dan
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: s390utils-1.8.2-32.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-06 08:42:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 467765    

Description Jan Stodola 2011-04-26 14:24:47 UTC
Description of problem:
/etc/init/device_cio_free.conf does no longer works with systemd and needs to be rewritten. Proposed service configuration file for systemd:

[root@rtt7 ~]# cat /lib/systemd/system/device_cio_free.service
[Unit]
Description=Free all devices on startup
DefaultDependencies=no
Before=sysinit.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/device_cio_free
StandardOutput=syslog


Also one symlink needs to be created:

[root@rtt7 ~]# ls -l /etc/systemd/system/sysinit.target.wants/device_cio_free.service 
lrwxrwxrwx. 1 root root 43 Apr 26 09:56 /etc/systemd/system/sysinit.target.wants/device_cio_free.service -> /lib/systemd/system/device_cio_free.service


Tested with qeth network device and non-root DASD drive attached in /mnt/data - network was working and the DASD drive was mounted when the system finished booting.

[root@rtt7 ~]# cat /proc/cmdline 
root=/dev/mapper/vg_rtt7-lv_root rd_DASD=0.0.3527 rd_DASD=0.0.3627 rd_DASD=0.0.3727 rd_LVM_LV=vg_rtt7/lv_root rd_LVM_LV=vg_rtt7/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us cio_ignore=all,!0.0.0009 BOOT_IMAGE=0

[root@rtt7 ~]# mount | grep /mnt/data
/dev/dasdd1 on /mnt/data type ext4 (rw,relatime,seclabel,barrier=1,stripe=256,data=ordered)

[root@rtt7 ~]# systemctl status mnt-data.mount
mnt-data.mount - /mnt/data
          Loaded: loaded
          Active: active (mounted) since Tue, 26 Apr 2011 10:01:43 -0400; 18min ago
           Where: /mnt/data
            What: /dev/dasdd1
         Process: 883 ExecMount=/bin/mount /mnt/data (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/mnt-data.mount

[root@rtt7 ~]# lsqeth 
Device name                     : eth0                
---------------------------------------------
        card_type               : GuestLAN QDIO
        cdev0                   : 0.0.0a00
        cdev1                   : 0.0.0a01
        cdev2                   : 0.0.0a02
        chpid                   : 00
        online                  : 1
        portname                : FOOBAR
        portno                  : 0
        state                   : UP (LAN ONLINE)
        priority_queueing       : always queue 2
        buffer_count            : 16
        layer2                  : 1
        isolation               : none


Version-Release number of selected component (if applicable):
s390utils-1.8.2-30.fc15.s390x

How reproducible:
always

Steps to Reproduce:
1. boot with the "cio_ignore=all,!0.0.0009" parameter
2. see if all filesystems are mounted and network device(s) are up