Hello,
I have an iscsi target which contains an LVM partition that I want to mount on proxmox. (Command line only)
Could you help me.
Mount iSCSI:
vgscan
vgchange -ay
pvdisplay :
vgdisplay :
lvdisplay
I have an iscsi target which contains an LVM partition that I want to mount on proxmox. (Command line only)
Could you help me.
Mount iSCSI:
# Target:
PROXMOX=iqn.2011-08.com.asustor:as5304t-8d5b27.proxmox
#USER / PASS CHAP +Reverse Chap
PROXMOX_USERNAME_CHAP=
PROXMOX_PASSWORD_CHAP=
PROXMOX_USERNAME_CHAP_MUTUEL=
PROXMOX_PASSWORD_CHAP_MUTUEL=
# Clean
iscsiadm --mode node --logoutall=all ;
rm -r /etc/iscsi/nodes/iqn.* ;
# Discovery
iscsiadm --mode discovery -t sendtargets --portal 192.168.1.2 | grep 192.168.1.2
# Node Startup is set to Automatic
sed -i 's/node.startup = manual/node.startup = automatic/g' "/etc/iscsi/nodes/$PROXMOX/192.168.1.2,3260,1/default"
# Authentification Mode : Chap
sed -i 's/node.session.auth.authmethod = None/node.session.auth.authmethod = CHAP/g' "/etc/iscsi/nodes/$PROXMOX/192.168.1.2,3260,1/default"
# ADD Parameter for Authentification:
echo "
#############################################################
node.session.auth.username = $PROXMOX_USERNAME_CHAP
node.session.auth.password = $PROXMOX_PASSWORD_CHAP
node.session.auth.username_in = $PROXMOX_USERNAME_CHAP_MUTUEL
node.session.auth.password_in = $PROXMOX_PASSWORD_CHAP_MUTUEL
#############################################################" >> "/etc/iscsi/nodes/$PROXMOX/192.168.1.2,3260,1/default"
# Connect:
iscsiadm --mode node --targetname $PROXMOX --portal 192.168.1.2 --login ;
# Check Session
iscsiadm -m session ;
# tcp: [1] 192.168.1.2:3260,1 iqn.2011-08.com.asustor:as5304t-8d5b27.proxmox (non-flash)
vgscan
Reading all physical volumes. This may take a while...
Found volume group "Proxmox" using metadata type lvm2
vgchange -ay
9 logical volume(s) in volume group "Proxmox" now active
pvdisplay :
--- Physical volume ---
PV Name /dev/sdb
VG Name Proxmox
PV Size <200.00 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 51199
Free PE 9212
Allocated PE 41987
PV UUID 3IupBC-KG8x-EiQn-cfSH-gSM7-7cUW-qDjG0H
vgdisplay :
--- Volume group ---
VG Name Proxmox
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 11
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 9
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <200.00 GiB
PE Size 4.00 MiB
Total PE 51199
Alloc PE / Size 41987 / 164.01 GiB
Free PE / Size 9212 / 35.98 GiB
VG UUID kcvtcF-Ifn3-LIg0-ctyt-Wg15-jiPr-Z0e5KG
lvdisplay
lvscan--- Logical volume ---
LV Path /dev/Proxmox/vm-100-disk-0
LV Name vm-100-disk-0
VG Name Proxmox
LV UUID XS4SuJ-RiQP-afru-h4HF-27mE-Ties-Irp3P3
LV Write Access read/write
LV Creation host, time proxmox, 2021-05-27 21:06:32 +0200
LV Status available
# open 0
LV Size 40.00 GiB
Current LE 10240
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/Proxmox/vm-200-disk-0
LV Name vm-200-disk-0
VG Name Proxmox
LV UUID 1YE2co-xzub-RJP9-HbBh-0P0w-aVde-dPtPd3
LV Write Access read/write
LV Creation host, time proxmox, 2021-05-27 21:11:14 +0200
LV Status available
# open 0
LV Size 5.00 GiB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Path /dev/Proxmox/vm-201-disk-0
LV Name vm-201-disk-0
VG Name Proxmox
LV UUID 5rq0xf-LjEb-rHxk-Kc8r-VgdY-kXnw-zrGn7d
LV Write Access read/write
LV Creation host, time proxmox, 2021-05-27 21:11:56 +0200
LV Status available
# open 0
LV Size 5.00 GiB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Path /dev/Proxmox/vm-100-disk-1
LV Name vm-100-disk-1
VG Name Proxmox
LV UUID G93uZj-e3rR-yt4o-zf5r-zM5K-kcoi-H79NPD
LV Write Access read/write
LV Creation host, time proxmox, 2021-05-27 21:20:52 +0200
LV Status available
# open 0
LV Size 4.00 MiB
Current LE 1
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
--- Logical volume ---
LV Path /dev/Proxmox/vm-303-disk-0
LV Name vm-303-disk-0
VG Name Proxmox
LV UUID w4R8pz-P3xT-2r3r-Bt3v-tt0n-z8l1-8zmSeD
LV Write Access read/write
LV Creation host, time proxmox, 2021-06-05 01:07:53 +0200
LV Status available
# open 0
LV Size 4.00 MiB
Current LE 1
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4
--- Logical volume ---
LV Path /dev/Proxmox/vm-303-disk-1
LV Name vm-303-disk-1
VG Name Proxmox
LV UUID qK3W0L-uyzT-wxsZ-qYoA-1Ns2-nbHP-7AprgQ
LV Write Access read/write
LV Creation host, time proxmox, 2021-06-05 01:07:54 +0200
LV Status available
# open 0
LV Size 32.00 GiB
Current LE 8192
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5
--- Logical volume ---
LV Path /dev/Proxmox/vm-300-disk-0
LV Name vm-300-disk-0
VG Name Proxmox
LV UUID LuBPpq-4fd6-JERx-DL2Q-spGK-6rY4-AAfOhI
LV Write Access read/write
LV Creation host, time proxmox, 2021-06-05 01:23:17 +0200
LV Status available
# open 0
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:6
--- Logical volume ---
LV Path /dev/Proxmox/vm-303-disk-2
LV Name vm-303-disk-2
VG Name Proxmox
LV UUID C8AWcT-Ox0n-moqC-YbmT-AbB3-NDnW-GxrdOL
LV Write Access read/write
LV Creation host, time proxmox, 2021-06-05 01:36:55 +0200
LV Status available
# open 0
LV Size 4.00 MiB
Current LE 1
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:7
--- Logical volume ---
LV Path /dev/Proxmox/vm-303-disk-3
LV Name vm-303-disk-3
VG Name Proxmox
LV UUID VfUDU8-bZ5R-67HB-JUFc-VdQz-qdFF-22pG6y
LV Write Access read/write
LV Creation host, time proxmox, 2021-06-05 01:36:56 +0200
LV Status available
# open 0
LV Size 32.00 GiB
Current LE 8192
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:8
ACTIVE '/dev/Proxmox/vm-100-disk-0' [40.00 GiB] inherit
ACTIVE '/dev/Proxmox/vm-200-disk-0' [5.00 GiB] inherit
ACTIVE '/dev/Proxmox/vm-201-disk-0' [5.00 GiB] inherit
ACTIVE '/dev/Proxmox/vm-100-disk-1' [4.00 MiB] inherit
ACTIVE '/dev/Proxmox/vm-303-disk-0' [4.00 MiB] inherit
ACTIVE '/dev/Proxmox/vm-303-disk-1' [32.00 GiB] inherit
ACTIVE '/dev/Proxmox/vm-300-disk-0' [50.00 GiB] inherit
ACTIVE '/dev/Proxmox/vm-303-disk-2' [4.00 MiB] inherit
ACTIVE '/dev/Proxmox/vm-303-disk-3' [32.00 GiB] inherit
Last edited: