Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2021 06:54:55 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        =?UTF-8?Q?BERTRAND_Jo=C3=ABl?= <joel.bertrand@systella.fr>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Mounting swap device on iscsi target
Message-ID:  <202101181454.10IEstwl062370@gndrsh.dnsmgr.net>
In-Reply-To: <fe95f085-b516-f431-9bfd-6c4f9b63e900@systella.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
> 	Hello,
> 
> 	I'm trying to mount iSCSI swap device during boot process. Of course, I
> have checked that configuration doesn't contains errors.
> 
> 	On running system, if I start /etc/rc.d/iscsictl start, device is
> mounted without error. But not during boot, I obtains :
> 
> Jan 17 10:48:17 pythagore iscsid[1009]: cannot open or create pidfile
> "/var/run/iscsid.pid": Operation not supported

Looks like a startup sequence problem, it could be that / is still mounted
readonly, but I do not see how that happens, as /etc/rc.d/iscsid should
be pretty late in the startup phase.   Are you trying to run with a
readonly root filesystem?

Since you dont really need iscsid until you go to mount additional file
systems maybe it can be moved to a later start up phase.  Argh, you trying
to swap to it, hum, that is going to be a "new file system" and would
need iscsid to setup the connection.

What does "services -e" show for a startup sequence.
What does your /etc/fstab look like.

> Jan 17 10:48:17 pythagore root[1010]: /etc/rc: WARNING: failed to start
> iscsid
> Jan 17 10:48:28 pythagore root[1014]: /etc/rc: WARNING: failed to start
> iscsictl
> Jan 17 10:49:20 pythagore kernel: WARNING: 192.168.10.128
> (iqn.2020-02.fr.systella.legendre.istgt:pythagore): timed out waiting
> for iscsid(8) for 61 seconds; reconnecting
> Jan 17 10:50:23 pythagore kernel: WARNING: 192.168.10.128
> (iqn.2020-02.fr.systella.legendre.istgt:pythagore): timed out waiting
> for iscsid(8) for 61 seconds; reconnecting
> 
> 	This workstation doesn't have any hard disk :
> 
> root@pythagore:/var/log # df -h
> Filesystem                       Size    Used   Avail Capacity  Mounted on
> 192.168.10.128:/srv/pythagore    523G    221G    276G    44%    /
> devfs                            1.0K    1.0K      0B   100%    /dev
> procfs                           4.0K    4.0K      0B   100%    /proc
> fdescfs                          1.0K    1.0K      0B   100%    /dev/fd
> 192.168.10.128:/home             3.6T    2.4T    1.0T    71%    /home
> 
> 	After boot, /var/run/iscsid.pid is created but doesn't contains
> anything. If I start by hands iscsid and iscsictl, this file contains
> real PID of iscsid and target is connected as da0.

Thats odd, how did it get created if the open failed.
Can you stop iscsid/iscsictl,
rm /var/run/iscsid.pid and do a reboot, see if it comes back
do not start anything manually I want to know if an empty
file really is being created during boot?

> 
> 	For information, rc.conf contains :
> 
> iscsid_enable="YES"
> iscsictl_enable="YES"
> iscsictl_flags="-Aa -w 10"

What is in your /etc/iscsictl.conf file, your asking for All
sessions in it to be added here, I am assuming that is /home?

> 	Best regards,
> 	JKB

-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101181454.10IEstwl062370>