Tuesday, 22 December 2020

Another way to assign disks to TrueNas

 Thanks to Craft Computing :-)


root@mars:~# apt-get install lshw

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following NEW packages will be installed:

  lshw

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 254 kB of archives.

After this operation, 781 kB of additional disk space will be used.

Get:1 http://ftp.debian.org/debian buster/main amd64 lshw amd64 02.18.85-0.1 [254 kB]

Fetched 254 kB in 10s (25.2 kB/s)

Selecting previously unselected package lshw.

(Reading database ... 51024 files and directories currently installed.)

Preparing to unpack .../lshw_02.18.85-0.1_amd64.deb ...

Unpacking lshw (02.18.85-0.1) ...

Setting up lshw (02.18.85-0.1) ...

Processing triggers for man-db (2.8.5-2) ...





root@mars:~# lsblk
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                  8:0    0 558.8G  0 disk
├─sda1               8:1    0 558.8G  0 part
└─sda9               8:9    0     8M  0 part
sdb                  8:16   0 558.8G  0 disk
├─sdb1               8:17   0 558.8G  0 part
└─sdb9               8:25   0     8M  0 part
sdc                  8:32   0 558.8G  0 disk
├─sdc1               8:33   0 558.8G  0 part
└─sdc9               8:41   0     8M  0 part
sdd                  8:48   0 558.8G  0 disk
├─sdd1               8:49   0 558.8G  0 part
└─sdd9               8:57   0     8M  0 part
sde                  8:64   0 558.8G  0 disk
├─sde1               8:65   0 558.8G  0 part
└─sde9               8:73   0     8M  0 part
sdf                  8:80   0 558.8G  0 disk
├─sdf1               8:81   0 558.8G  0 part
└─sdf9               8:89   0     8M  0 part
sdg                  8:96   0 558.8G  0 disk
├─sdg1               8:97   0 558.8G  0 part
└─sdg9               8:105  0     8M  0 part
sdh                  8:112  0 558.8G  0 disk
sdi                  8:128  0 558.8G  0 disk
sdj                  8:144  0 558.8G  0 disk
sdk                  8:160  0 558.8G  0 disk
sdl                  8:176  0 558.8G  0 disk
sdm                  8:192  0 558.8G  0 disk
sdn                  8:208  0 558.8G  0 disk
sdo                  8:224  0 558.3G  0 disk
├─sdo1               8:225  0  1007K  0 part
├─sdo2               8:226  0   512M  0 part /boot/efi
└─sdo3               8:227  0 557.8G  0 part
  ├─pve-root       253:0    0    96G  0 lvm  /
  ├─pve-swap       253:1    0     8G  0 lvm  [SWAP]
  ├─pve-data_tmeta 253:2    0   4.4G  0 lvm
  │ └─pve-data     253:4    0   429G  0 lvm
  └─pve-data_tdata 253:3    0   429G  0 lvm
    └─pve-data     253:4    0   429G  0 lvm
sr0                 11:0    1  1024M  0 rom
zd0                230:0    0    50G  0 disk
├─zd0p1            230:1    0     1M  0 part
├─zd0p2            230:2    0     1G  0 part
└─zd0p3            230:3    0    49G  0 part
zd16               230:16   0    50G  0 disk
├─zd16p1           230:17   0   512K  0 part
└─zd16p2           230:18   0    50G  0 part
zd32               230:32   0    50G  0 disk
├─zd32p1           230:33   0     1G  0 part
└─zd32p2           230:34   0    49G  0 part
zd48               230:48   0    50G  0 disk
├─zd48p1           230:49   0     1G  0 part
└─zd48p2           230:50   0    49G  0 part




root@mars:~# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Dec 19 23:06 ata-PLDS_DVD+_-RW_DS-8A9SH_8P71R550813CI40JVA00 -> ../../sr0
lrwxrwxrwx 1 root root 10 Dec 19 23:06 dm-name-pve-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Dec 19 23:06 dm-name-pve-swap -> ../../dm-1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 dm-uuid-LVM-MZlv4CZ1lawgUAmFlmypc2ALUFsjZ2RJJivRzI1a0LNpZRPXmtI21sU19mMOqIJ6 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 dm-uuid-LVM-MZlv4CZ1lawgUAmFlmypc2ALUFsjZ2RJTk9QkywOaWNmNZdeCBSHgzROlUdeEAjN -> ../../dm-0
lrwxrwxrwx 1 root root 11 Dec 19 23:06 lvm-pv-uuid-3hcjRP-E2Cb-65YQ-BeAP-2Ih6-i3m6-4440Jf -> ../../zd0p3
lrwxrwxrwx 1 root root 12 Dec 19 23:06 lvm-pv-uuid-BS0Ddm-jJd9-eYQB-UlNh-RH6N-haPF-HQkJdP -> ../../zd48p2
lrwxrwxrwx 1 root root 10 Dec 19 23:06 lvm-pv-uuid-GJZgVk-eecm-Xpfh-xeob-qWzx-put0-AC2KkE -> ../../sdo3
lrwxrwxrwx 1 root root 12 Dec 19 23:06 lvm-pv-uuid-qJ1cGB-DqoA-Vmvj-S65u-uPdX-HVYk-joYUn7 -> ../../zd32p2
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca01210dfa0 -> ../../sdl
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca012151abc -> ../../sdn
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca012199738 -> ../../sdh
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca0121bad10 -> ../../sdc
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121bad10-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121bad10-part9 -> ../../sdc9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca0121be358 -> ../../sdf
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121be358-part1 -> ../../sdf1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121be358-part9 -> ../../sdf9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca0121de690 -> ../../sdd
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121de690-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121de690-part9 -> ../../sdd9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca0121edc58 -> ../../sde
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121edc58-part1 -> ../../sde1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121edc58-part9 -> ../../sde9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca0121ef56c -> ../../sdg
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121ef56c-part1 -> ../../sdg1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0121ef56c-part9 -> ../../sdg9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca0121f6d10 -> ../../sdi
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca012b30390 -> ../../sda
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca012b30390-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca012b30390-part9 -> ../../sda9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca012b4e91c -> ../../sdm
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca012b539d8 -> ../../sdk
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca012b5ceb4 -> ../../sdj
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca0595503b8 -> ../../sdb
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0595503b8-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-35000cca0595503b8-part9 -> ../../sdb9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-36c81f660de4d3a002767523311be93c6 -> ../../sdo
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-36c81f660de4d3a002767523311be93c6-part1 -> ../../sdo1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-36c81f660de4d3a002767523311be93c6-part2 -> ../../sdo2
lrwxrwxrwx 1 root root 10 Dec 19 23:06 scsi-36c81f660de4d3a002767523311be93c6-part3 -> ../../sdo3
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca01210dfa0 -> ../../sdl
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012151abc -> ../../sdn
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012199738 -> ../../sdh
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca0121bad10 -> ../../sdc
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121bad10-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121bad10-part9 -> ../../sdc9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca0121be358 -> ../../sdf
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121be358-part1 -> ../../sdf1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121be358-part9 -> ../../sdf9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca0121de690 -> ../../sdd
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121de690-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121de690-part9 -> ../../sdd9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca0121edc58 -> ../../sde
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121edc58-part1 -> ../../sde1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121edc58-part9 -> ../../sde9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca0121ef56c -> ../../sdg
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121ef56c-part1 -> ../../sdg1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0121ef56c-part9 -> ../../sdg9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca0121f6d10 -> ../../sdi
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012b30390 -> ../../sda
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca012b30390-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca012b30390-part9 -> ../../sda9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012b4e91c -> ../../sdm
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012b539d8 -> ../../sdk
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012b5ceb4 -> ../../sdj
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca0595503b8 -> ../../sdb
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0595503b8-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x5000cca0595503b8-part9 -> ../../sdb9
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x6c81f660de4d3a002767523311be93c6 -> ../../sdo
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x6c81f660de4d3a002767523311be93c6-part1 -> ../../sdo1
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x6c81f660de4d3a002767523311be93c6-part2 -> ../../sdo2
lrwxrwxrwx 1 root root 10 Dec 19 23:06 wwn-0x6c81f660de4d3a002767523311be93c6-part3 -> ../../sdo3

==============


lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca01210dfa0 -> ../../sdl
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012151abc -> ../../sdn
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012199738 -> ../../sdh
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012b4e91c -> ../../sdm
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012b539d8 -> ../../sdk
lrwxrwxrwx 1 root root  9 Dec 19 23:06 wwn-0x5000cca012b5ceb4 -> ../../sdj
lrwxrwxrwx 1 root root  9 Dec 19 23:06 scsi-35000cca012b5ceb4 -> ../../sdj


---

qm set 102 -scsi2 /dev/disk/by-id/scsi-35000cca0121f6d10 
qm set 102 -scsi3 /dev/disk/by-id/scsi-35000cca01210dfa0
qm set 102 -scsi4 /dev/disk/by-id/scsi-35000cca012151abc 
qm set 102 -scsi5 /dev/disk/by-id/scsi-35000cca012199738 
qm set 102 -scsi6 /dev/disk/by-id/scsi-35000cca012b4e91c 
qm set 102 -scsi7 /dev/disk/by-id/scsi-35000cca012b539d8 
qm set 102 -scsi8 /dev/disk/by-id/scsi-35000cca012b5ceb4


----------


root@mars:~# qm set 102 -scsi3 /dev/disk/by-id/scsi-35000cca01210dfa0
qm set 102 -scsi4 /dev/disk/by-id/scsi-35000cca012151abc
qm set 102 -scsi5 /dev/disk/by-id/scsi-35000cca012199738
qm set 102 -scsi6 /dev/disk/by-id/scsi-35000cca012b4e91c
qm set 102 -scsi7 /dev/disk/by-id/scsi-35000cca012b539d8
qm set 102 -scsi8 /dev/disk/by-id/scsi-35000cca012b5ceb4
update VM 102: -scsi3 /dev/disk/by-id/scsi-35000cca01210dfa0
root@mars:~# qm set 102 -scsi4 /dev/disk/by-id/scsi-35000cca012151abc
update VM 102: -scsi4 /dev/disk/by-id/scsi-35000cca012151abc
root@mars:~# qm set 102 -scsi5 /dev/disk/by-id/scsi-35000cca012199738
update VM 102: -scsi5 /dev/disk/by-id/scsi-35000cca012199738
root@mars:~# qm set 102 -scsi6 /dev/disk/by-id/scsi-35000cca012b4e91c
update VM 102: -scsi6 /dev/disk/by-id/scsi-35000cca012b4e91c
root@mars:~# qm set 102 -scsi7 /dev/disk/by-id/scsi-35000cca012b539d8
update VM 102: -scsi7 /dev/disk/by-id/scsi-35000cca012b539d8
root@mars:~# qm set 102 -scsi8 /dev/disk/by-id/scsi-35000cca012b5ceb4
update VM 102: -scsi8 /dev/disk/by-id/scsi-35000cca012b5ceb4

No comments:

Post a Comment