Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232347 - sys-block/open-iscsi - Automatic mounting of partitions available through iSCSI not early enough
Summary: sys-block/open-iscsi - Automatic mounting of partitions available through iSC...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-19 16:03 UTC by Jeff Waller
Modified: 2012-02-09 09:22 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Waller 2008-07-19 16:03:05 UTC
iscsid can tag targets to be automatically logged in.  Applications can use those partitions as resources integral to their startup.  In that sense, iscsid mounts need to be available sooner than netmounts.


Reproducible: Always




The localmount script will mount iscsi provided partitions, but this requires a re-arrangement of the boot time startup.

root then modules then net then iscsid then localmount.  Note how this pushes localmount way down in the list.  This is different.

This may be accomplished if:
1) Remove the localmount requirement from net.lo and substitute it with root
2) Add "before localmount" to iscsid dependencies.
3) Relocate iscsid distribution from /usr/sbin to /sbin
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-07-19 16:21:38 UTC
Please post your `emerge --info'.
Comment 2 Jeff Waller 2008-07-20 21:47:31 UTC
changeling ~ # emerge --info open-iscsi
Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-changeling i686)
=================================================================
                        System Settings
=================================================================
System uname: 2.6.25-changeling i686 Intel(R) Xeon(TM) CPU 2.80GHz
Timestamp of tree: Wed, 09 Jul 2008 02:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--deep"
FEATURES="buildpkg ccache distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="--jobs=4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl avahi bash-completion berkdb bzip2 caps cli cracklib crypt cups dbus dga directfb doc dri expat fortran gdbm gif gnome gpm gtk hal iconv ipv6 isdnlog java jpeg ldap midi mmx mono mp3 mudflap ncurses nls nptl nptlonly nss ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 readline reflection sdl session spl sse sse2 ssl tcpd threads tiff truetype unicode vorbis x86 xml xorg xv zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================
>>> Attempting to run pkg_info() for 'sys-block/open-iscsi-2.0.868_rc1'
Adjusting permissions recursively: '/tmp/tmpyAqWbz/ccache'
 * pkg_info() is not defined: 'open-iscsi-2.0.868_rc1.ebuild'
Comment 3 Jeff Waller 2008-07-24 02:25:09 UTC
Added requested info
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-12 09:25:12 UTC
I'll revisit this after Roy handle the net.lo stuff.
But probably with a USE option to move it to /sbin and update the init.d, NOT
doing it by default.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-10 22:23:51 UTC
openrc impact here:
does net actually need localmount, or can we make do with root?
Comment 6 Jim Ramsay (lack) (RETIRED) gentoo-dev 2010-10-08 17:00:55 UTC
Here's an alternative solution that I think is worth considering:

Let's fix init.d/localmount and init.d/netmount to actually respect the '_netdev' option in /etc/fstab, and then just make init.d/iscsid depend on 'before netmount'

This removes the requirement that iscsid be placed in /sbin since we know that /usr is already mounted, and will keep 'localmount' nice and early in the boot order.

Changes needed for openrc:
  localmount
    Change the line that mounts all local filesystems:
      mount -at "$types"
    To exclude any with the '_netdev' option:
      mount -at "$types" -O no_netdev
  netmount
    Right after we actually mount we mount all the types in net_fs_list:
      mount -at $fs
    Also tell it to mount anything else that's marked with the '_netdev' option:
      mount -a -O _netdev

(Some more work may be needed for unmounting... I haven't really played with that side of these scripts yet.)

Then just add 'before netmount' to init.d/iscsid
Comment 7 William Hubbs gentoo-dev 2010-12-08 04:58:37 UTC
Hi all,

(In reply to comment #6)
> Here's an alternative solution that I think is worth considering:
> Let's fix init.d/localmount and init.d/netmount to actually respect the
> '_netdev' option in /etc/fstab, and then just make init.d/iscsid depend on
> 'before netmount'
> This removes the requirement that iscsid be placed in /sbin since we know that
> /usr is already mounted, and will keep 'localmount' nice and early in the boot
> order.
> Changes needed for openrc:
>   localmount
>     Change the line that mounts all local filesystems:
>       mount -at "$types"
>     To exclude any with the '_netdev' option:
>       mount -at "$types" -O no_netdev
>   netmount
>     Right after we actually mount we mount all the types in net_fs_list:
>       mount -at $fs
>     Also tell it to mount anything else that's marked with the '_netdev'
> option:
>       mount -a -O _netdev
> (Some more work may be needed for unmounting... I haven't really played with
> that side of these scripts yet.)

The changes requested here have been made as of openrc-0.6.8, as well as adding the command to netmount so that it will unmount any filesystems with _netdev in their options.

> Then just add 'before netmount' to init.d/iscsid

As soon as you have openrc-0.6.8 you should be able to do this.
Comment 8 William Hubbs gentoo-dev 2011-02-01 00:33:48 UTC
What is the status on this bug? The changes for openrc have been made as
requested.

Is it still an issue for openrc, or can I remove openrc from the cc
list?
Comment 9 Mike Doty (RETIRED) gentoo-dev 2011-02-02 03:36:02 UTC
No longer my package.  Have at it people.
Comment 10 William Hubbs gentoo-dev 2011-04-15 23:09:28 UTC
I have removed #292894 from the dependencies for this bug, because they are not related after the suggested changes were made.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-09 09:22:02 UTC
@Jeff:

What's the status of this wrt to the Fedora changes of /usr being mounted by initramfs?

I think due to that, it needs to be done in genkernel, which is already supported, so is there anything needed here still? Please reopen if needed.