ESXi und Datastore auf einem USB-Stick

(hier gibts das original: http://wladimir-tm4pda.blogspot.com/2016/01/vmware-create-vmfs-datastore-on-same.html)

USB-Stick identifizieren (fängt mit mpx.vmhba32: … oder mit naa.XXXXX an)

[root@localhost:~] esxcli storage core device list

<font 11px/inherit;;inherit;;inherit>naa.2020030102060804
Display Name: Local USB Direct-Access (naa.2020030102060804)
Has Settable Display Name: false
Size: 30992
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/naa.2020030102060804
Vendor: Intenso
Model: Intenso Premium
Revision: 1100
SCSI Level: 2
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: true
Is SSD: false
Is VVOL PE: false
Is Offline: false
Is Perennially Reserved: false
Queue Full Sample Size: 0
Queue Full Threshold: 0
Thin Provisioning Status: unknown
Attached Filters:
VAAI Status: unsupported
Other UIDs: vml.010000000031323135303030303030303230363233496e74656e73
Is Shared Clusterwide: false
Is SAS: false
Is USB: true
Is Boot Device: true
Device Max Queue Depth: 1
No of outstanding IOs with competing worlds: 1
Drive Type: unknown
RAID Level: unknown
Number of Physical Drives: unknown
Protection Enabled: false
PI Activated: false
PI Type: 0
PI Protection Mask: NO PROTECTION
Supported Guard Types: NO GUARD SUPPORT
DIX Enabled: false
DIX Guard Type: NO GUARD SUPPORT
Emulated DIX/DIF Enabled: false</font>

[root@ESXi:~] ls -alh /vmfs/devices/disks
total 14726540898
drwxr-xr-x 2 root root 512 Sep 26 11:38 .
drwxr-xr-x 16 root root 512 Sep 26 11:38 ..
-rw——- 1 root root 30.3G Sep 26 11:38 naa.2020030102060804
-rw——- 1 root root 4.0M Sep 26 11:38 naa.2020030102060804:1
-rw——- 1 root root 26.9G Sep 26 11:38 naa.2020030102060804:10
-rw——- 1 root root 250.0M Sep 26 11:38 naa.2020030102060804:5
-rw——- 1 root root 250.0M Sep 26 11:38 naa.2020030102060804:6
-rw——- 1 root root 110.0M Sep 26 11:38 naa.2020030102060804:7
-rw——- 1 root root 286.0M Sep 26 11:38 naa.2020030102060804:8
-rw——- 1 root root 2.5G Sep 26 11:38 naa.2020030102060804:9
-rw——- 1 root root 238.5G Sep 26 11:38 t10.ATA_MTFDDAK256MAM2D1K121246091C518B
-rw——- 1 root root 238.5G Sep 26 11:38 t10.ATA
_MTFDDAK256MAM2D1K121246091C518B:1
-rw——- 1 root root 232.9G Sep 26 11:38 t10.ATA_Samsung_SSD_840_EVO_250GB_S1DBNSADA59976D_
-rw——- 1 root root 232.9G Sep 26 11:38 t10.ATA
_Samsung_SSD_840_EVO_250GB_S1DBNSADA59976D_:1
-rw——- 1 root root 1.8T Sep 26 11:38 t10.ATA_WDC_WD20NPVX2D00EA4T0_WD2DWXM1E1542DK0
-rw——- 1 root root 5.5T Sep 26 11:38 t10.ATA_WDC_WD60EZRX2D00MVLB1_WD2DWX11DC4FK61V
-rw——- 1 root root 5.5T Sep 26 11:38 t10.ATA_WDC_WD60EZRX2D00MVLB1_WD2DWX11DC4FK61V:1
lrwxrwxrwx 1 root root 73 Sep 26 11:38 vml.010000000020202020202020203132343630393143353138424d5446444441 → t10.ATA_MTFDDAK256MAM2D1K121246091C518B
lrwxrwxrwx 1 root root 75 Sep 26 11:38 vml.010000000020202020202020203132343630393143353138424d5446444441:1 → t10.ATA
_MTFDDAK256MAM2D1K121246091C518B:1
lrwxrwxrwx 1 root root 74 Sep 26 11:38 vml.0100000000202020202057442d57583131444334464b363156574443205744 → t10.ATA_WDC_WD60EZRX2D00MVLB1_WD2DWX11DC4FK61V
lrwxrwxrwx 1 root root 76 Sep 26 11:38 vml.0100000000202020202057442d57583131444334464b363156574443205744:1 → t10.ATA_WDC_WD60EZRX2D00MVLB1_WD2DWX11DC4FK61V:1
lrwxrwxrwx 1 root root 74 Sep 26 11:38 vml.0100000000202020202057442d57584d314531353432444b30574443205744 → t10.ATA_WDC_WD20NPVX2D00EA4T0_WD2DWXM1E1542DK0
lrwxrwxrwx 1 root root 20 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73 → naa.2020030102060804
lrwxrwxrwx 1 root root 22 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73:1 → naa.2020030102060804:1
lrwxrwxrwx 1 root root 23 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73:10 → naa.2020030102060804:10
lrwxrwxrwx 1 root root 22 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73:5 → naa.2020030102060804:5
lrwxrwxrwx 1 root root 22 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73:6 → naa.2020030102060804:6
lrwxrwxrwx 1 root root 22 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73:7 → naa.2020030102060804:7
lrwxrwxrwx 1 root root 22 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73:8 → naa.2020030102060804:8
lrwxrwxrwx 1 root root 22 Sep 26 11:38 vml.010000000031323135303030303030303230363233496e74656e73:9 → naa.2020030102060804:9
lrwxrwxrwx 1 root root 72 Sep 26 11:38 vml.0100000000533144424e53414441353939373644202020202053616d73756e → t10.ATA_Samsung_SSD_840_EVO_250GB_S1DBNSADA59976D_
lrwxrwxrwx 1 root root 74 Sep 26 11:38 vml.0100000000533144424e53414441353939373644202020202053616d73756e:1 → t10.ATA
_Samsung_SSD_840_EVO_250GB_S1DBNSADA59976D_:1
[root@ESXi:~]

[root@ESXi:~] partedUtil getptbl „/vmfs/devices/disks/naa.2020030102060804“
gpt
3950 255 63 <font inherit/inherit;;#c0392b;;inherit>63472128</font>
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
9 1843200 <font inherit/inherit;;#1abc9c;;inherit>7086079</font>9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
[root@ESXi:~]

Die Größe des Sticks merken <font inherit/inherit;;#c0392b;;inherit>63472128</font> und 2048 davon abziehen = <font inherit/inherit;;#9b59b6;;inherit>63470080</font>

Letzten Block von Partion 9 (<font inherit/inherit;;#1abc9c;;inherit>7086079</font>+ 1 = <font inherit/inherit;;#2980b9;;inherit>7086080</font>) als startblock für die Partition 10 nehmen
UUID (AA31E02A400F11DB9590000C2911D1B8) ??? keine Ahnung hab ich so aus dem Netz übernommen.

[root@ESXi:~] partedUtil setptbl „/vmfs/devices/disks/naa.2020030102060804“ gpt „1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B 128“ „5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 0“ „6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 0“ „7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 0“ „8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 0“ „9 1843200 7086079 9D27538040AD11DBBF97000C2911D1B8 0“ „10 <font inherit/inherit;;#2980b9;;inherit>7086080</font><font inherit/inherit;;#9b59b6;;inherit>63470080</font>AA31E02A400F11DB9590000C2911D1B8 0“
[root@ESXi:~]

Dann mit vmkfstools einen neuen Datastore anlegen
Die :10 am Ende der Zeile ist wichtig, da damit die Partition 10 angegeben wird (die gerade neu angelegt wurde)

<font inherit/inherit;;inherit;;inherit>root@localhost:~] vmkfstools -C vmfs5 -b 1m -S NewDatastore /vmfs/devices/disks/naa.2020030102060804:10</font>

Zuletzt geändert: 2018/09/26 13:53