Server IP : 127.0.0.2 / Your IP : 3.17.175.182 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/open-iscsi/ |
Upload File : |
#!/bin/sh # # This script activates storage at boot after the iSCSI login. It can # be called from both the init script as well as the native systemd # service. # PATH=/sbin:/bin MULTIPATH=/sbin/multipath VGCHANGE=/sbin/vgchange if [ -f /etc/default/open-iscsi ]; then . /etc/default/open-iscsi fi # See if we need to handle LVM if [ ! -x $VGCHANGE ] && [ -n "$LVMGROUPS" ]; then echo "Warning: LVM2 tools are not installed, not honouring LVMGROUPS." >&2 LVMGROUPS="" fi # If we don't have to activate any VGs and are running systemd, we # don't have to activate anything, so doing udevadm settle here and # potentially sleeping (if multipath is used) will not be productive, # because after waiting for both of these things, we will do nothing. # Therefore just drop out early if that is the case. if [ -d /run/systemd/system ] && [ -z "$LVMGROUPS" ] ; then exit 0 fi # Make sure we pick up all devices udevadm settle || true # Handle multipath if [ -x $MULTIPATH ] ; then # If multipath is used, we might need to do udevadm settle # twice to make sure multipathd has seen the devices and # then been able to create the mappings. # (We assume that multipathd is already running.) # # Note that multipathd will race against udev for locking the # block device when it comes to creating the mappings, and it # will retry only once per second (and will typically succeed # on the second try), so we will wait three seconds here to be # sure that it worked as expected. sleep 3 udevadm settle || true fi # Handle LVM if [ -n "$LVMGROUPS" ] ; then if ! $VGCHANGE -ay $LVMGROUPS ; then echo "Warning: could not activate all LVM groups." >&2 fi # Make sure we pick up all LVM devices udevadm settle || true fi # Mount all network filesystems # (systemd takes care of it directly, so don't do it there) if ! [ -d /run/systemd/system ] ; then if [ $HANDLE_NETDEV -eq 1 ] ; then mount -a -O _netdev >/dev/null 2>&1 || true # FIXME: should we really support swap on iSCSI? # If so, we should update umountiscsi.sh! swapon -a -e >/dev/null 2>&1 || true fi fi