The SAN_SERVER
address is displayed in your Dedibox console.
How to mount a Scaleway Dedibox RPN-SAN volume on Linux
You can mount RPN SAN volumes on Linux machines using Open-iSCSI.
Before you start
To complete the actions presented below, you must have:
- A Dedibox account logged into the console
- A Dedibox dedicated server
- An RPN SAN
How to install and configure Open-iSCSI
- Update the APT package cache and install Open-iSCSI:
apt update && apt install -y open-iscsi
- Open the file
/etc/iscsi/iscsid.conf
in a text editor:nano /etc/iscsi/iscsid.conf - Add the following configuration lines:
The purpose of this modification is to prevent your file system from becoming read-only if the link is interrupted for more than two minutes (by default) between your server and the storage server.node.conn[0].timeo.noop_out_interval = 0node.conn[0].timeo.noop_out_timeout = 0node.session.timeo.replacement_timeout = 86400
- Adjust the setting for automatic reconnection of targets
node.startup = automatic
- Change the following settings to benefit from the data integrity check, if available:
node.conn[0].iscsi.HeaderDigest = CRC32C,Nonenode.conn[0].iscsi.DataDigest = CRC32C,None
How to discover and connect to targets
-
Run the following command to obtain the list of available targets:
iscsiadm -m discovery -t sendtargets -p SAN_SERVERNoteThe target name should look like the following example:
X.X.X.X:3260,1 iqn.2013-01.net.online:XXXXXXXXXXX -
Connect to the target by typing the following command:
iscsiadm -m node -T iqn.2013-01.net.online:XXXXXXXXXXX --login -
Type
dmesg
to see the kernel logs. You should see some lines like in the following examplescsi25 : iSCSI Initiator over TCP/IPscsi 25:0:0:0: Direct-Access IET VIRTUAL-DISK 0 PQ: 0 ANSI: 4sd 25:0:0:0: Attached scsi generic sg4 type 0sd 25:0:0:0: [sdd] 2147483648 512-byte logical blocks: (1.09 TB/1.00 TiB)sd 25:0:0:0: [sdd] Write Protect is offsd 25:0:0:0: [sdd] Mode Sense: 77 00 00 08sd 25:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUAsdd: sdd1sd 25:0:0:0: [sdd] Attached SCSI diskIn the example above, the disk detected is
sdd
, available at/dev/sdd
.NoteThe assigned device name may be different, depending on your configuration.
You can now use your SAN disk like you would any other disk.
Important recommendations for use
As seen in the example above, the disk is available as /dev/sdd.
It is not guaranteed that at the next reboot the same drive letter will be used, especially if you add other targets, or if your hardware configuration changes. It is therefore recommended not to use the names /dev/sdX
in your configuration files.
How to address devices when using LVM
LVM automatically uses UUIDs to recognize the partitions it uses. In this case, no problems should arise.
How to address devices when using direct disk formatting
This method is not recommended, because it aggregates several RPN SAN storage spaces, and does not allow you to make changes afterward.
If you format the device or one of its partitions directly, use the link created by the system in /dev/disk/by-uuid/
or the fstab notation UUID=XXX-XXX...
for addressing purposes.
How to address devices directly by their UUID
If (unlike LVM) your application does not support the auto-detection of the partitions associated with it via the UUID, it is recommended to use the link in /dev/disk/by-id/
.