systemd: root device on iscsi

Karel Zak kzak at redhat.com
Tue Nov 29 18:25:30 UTC 2011


On Tue, Nov 29, 2011 at 12:18:03PM -0500, Bill Nottingham wrote:
> Jeremy Sanders (jeremy at jeremysanders.net) said: 
> > > What are you using for networking - the old network service or
> > > NetworkManager?
> > 
> > The old network service. The root device is cloned from a non-iscsi 
> > installation, however, as kickstart didn't like to install onto a non-
> > partitioned iscsi device: https://bugzilla.redhat.com/show_bug.cgi?id=757106
> > I thought that the _netdev option would be sufficient to get the ordering 
> > correct.
> 
> Ah, crud. The issue is that we're checking /etc/mtab for _netdev, which is
> now /proc/mounts, which doesn't transfer over random options such as these
> into its data store.
> 
> So, we either need it to start doing that (cc: kzak), or we need to have th
> code cross-reference devices against /etc/fstab.
> 

libmount manages the option _netdev in userspace (in /run/mount/utab -- but this
private libmount file is not part of any API, so don't read it), use findmnt(8):

$ grep _netdev /etc/fstab 
/dev/sdb1   /mnt   ext3    defaults,_netdev        0      

$ findmnt --mtab /mnt
TARGET SOURCE    FSTYPE OPTIONS
/mnt   /dev/sdb1 ext3   rw,relatime,errors=continue,barrier=0,data=ordered,_netdev

$ mount | grep /mnt
/dev/sdb1 on /mnt type ext3(rw,relatime,errors=continue,barrier=0,data=ordered,_netdev)


Note that things like _netdev are ugly hacks, it would be nice to found a 
better way how mark/detect some specific devices.

    Karel

-- 
 Karel Zak  <kzak at redhat.com>
 http://karelzak.blogspot.com


More information about the devel mailing list