View previous topic :: View next topic |
Author |
Message |
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Thu Aug 13, 2020 12:06 pm Post subject: Swap on iSCSI -- wrong information in wiki |
|
|
Hello, I've followed the instructions at https://wiki.gentoo.org/wiki/ISCSI/Initiator and they all work except for the last step
iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> [-p <ip[:port]>] -o update -n node.startup -v automatic
which is supposed to make the connection persistent (I think). It doesn't work. On reboot, the connection is lost and has to be re-established with
iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> [-p <ip[:port]>] -l
What's the correct way of making the connection persist? _________________ Michael Mounteney
Last edited by mounty1 on Fri Aug 14, 2020 2:37 am; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3950
|
Posted: Thu Aug 13, 2020 4:43 pm Post subject: |
|
|
Hi maybe enabling "iscsid"?
Code: |
rc-update add iscsid default
|
Failing that maybe you can use a cronjob...
The iscsi volume should look like a block device in your client machine.
Something like
In that disk you should create a partition format it as swap and create an entry like this in /etc/fstab
Code: |
/dev/sdxx none swap defaults,_netdev 0 0
|
Also remember to have REISUB enabled in your client machine because sometimes it may hang @shutdown if not properly loged out.
If not syncronized still then maybe comment out the fstab entry and create a script to connect to the target and to activate the swap @boot
Something like
Code: |
while ! iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --login
do sleep 1
done
swapon /dev/sdxx
|
and run it via cron.
|
|
Back to top |
|
|
mounty1 l33t
Joined: 06 Jul 2006 Posts: 942 Location: Queensland
|
Posted: Thu Aug 13, 2020 7:53 pm Post subject: |
|
|
alamahant wrote: | Hi maybe enabling "iscsid"?
Code: |
rc-update add iscsid default
|
| Already ran Code: | systemctl enable iscsid | and it's running.
alamahant wrote: | Failing that maybe you can use a cronjob... |
I want to know why it's failing, not bodge a workaround.
alamahant wrote: | The iscsi volume should look like a block device in your client machine.[...]
and run it via cron.
|
Yep, thanks, I'm already doing all that, except that I reference the partition by UUID. The block device is not created on startup. _________________ Michael Mounteney |
|
Back to top |
|
|
|