meta data for this page
This is an old revision of the document!
Storage
Storage types
- Network storage
- LVM Group on iSCSI
- can be shared
- ZFS over iSCSI
- thin provisioning
- iSCSI target / iSCSI direct (user-level library
libiscsi2
) - NFS
- Ceph RDB
- GlusterFS
- Local storage
- LVM Group overy any block device
- LVM Thin pools: only on LOCAL - cannot be shared!
- Directory (storage on existing FS)
- ZFS
Content types
- tbd
Local storage
- Backups - /var/lib/vz/dump
- ISOs - /var/lib/vz/template/iso
- Images - /var/lib/vz/images
- Templates - /var/lib/vz/template/cache
iSCSI
Proxmox doc recommends:
iSCSI is a block level type storage, and provides no management interface. So it is usually best to export one big LUN, and setup LVM on top of that LUN. You can then use the LVM plugin to manage the storage on that iSCSI LUN.
iSCSI target/direct is capable to store only following content types
- images
- none
Use LUNs directly - use directly as VM disk without putting LVM volume on it
NAS326 CHAP issue
NAS326 requires CHAP authentication and initiator user name. There are 2 options to use NAS326:
- disable CHAP on NAS326
- enable CHAP on Proxmox
Proxmox initiator name can be found in file: /etc/iscsi/initiatorname.iscsi
disable CHAP on NAS326
- create the LUN(s) and target via the webgui
- login to your zyxel via ssh as root
- targetcli (this will open a shell where you can manage iscsi, use tab completion to get around in it)
- ls (to get an overview)
- cd /iscsi/iqn.2018-03.com.zyxel:targetname.randomstring/tpg1/ (again use tab completion, so cd /iscsi/iqn<tab><tab<tab<tab> etc. etc.)
- set attribute authentication=0
- set attribute generate_node_acls=1
- set attribute demo_mode_write_protect=0
- I also deleted the ACLS by doing; cd acls, delete iqn<tab><tab>
- exit
- targetcli saveconfig (normally if you exit targetcli, it will autosave, so this is just in case)
use CHAP on Proxmox
Logout and remove all failed trials to connect to NAS326. Especially if IPv6 was enabled on NAS326, proxmox detect two send_targets: one for IPv4 and one for IPv6 (not reachable). After disabling IPv6 on NAS326, please delete IPv6 target portal:
targetcli ls targetcli /iscsi/iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux/tpg1/portals ls targetcli /iscsi/iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux/tpg1/portals/ 'delete fd57::be99:11ff:fe06:18b0 3260' targetcli saveconfig
ls /etc/iscsi/nodes # logout iscsiadm -m node -u -T "iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux" --portal 192.168.28.150 iscsiadm -m node -u -T "iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux" --portal fd57::be99:11ff:fe06:18b0 # remove iscsiadm -m node -o delete -T "iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux" --portal 192.168.28.150 iscsiadm -m node -o delete -T "iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux" --portal fd57::be99:11ff:fe06:18b0
Uncomment and set following config lines:
- | /etc/iscsi/iscsid.conf
node.session.auth.authmethod = CHAP # get initiator name from /etc/iscsi/initiatorname.iscsi node.session.auth.username = iqn.1993-08.org.debian:01:4dad9d97a329 node.session.auth.password = my_chap_password_for_NAS326
Now disovery should return only one IPv4 target:
# iscsiadm -m discovery -t sendtargets -p 192.168.28.150 192.168.28.150:3260,1 iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux # list config options iscsiadm -m node -o show # login # iscsiadm -m node --login Logging in to [iface: default, target: iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux, portal: 192.168.28.150,3260] (multiple) Login to [iface: default, target: iqn.2020-04.com.zyxel:nas326-iscsi-pve1-isos-target.tjlintux, portal: 192.168.28.150,3260] successful. # check new block device cat /proc/partitions
iSCSI+LVM supports HA and Live Migration of VMs –> mark LVM storage as shared