- Plug in the USB device to the ESXi host
- Make sure that usbarbitrator service is off on the ESXi host so that the host will not use it as Passthrough :
# /etc/init.d/usbarbitrator stop
- Check the usb in core device list :
# esxcli storage core device list
t10.SanDisk00Cruzer_Blade000000004C530001111202103073
Display Name: Local USB Direct-Access (t10.SanDisk00Cruzer_Blade000000004C530001111202103073)
Has Settable Display Name: false
Size: 29952
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/t10.SanDisk00Cruzer_Blade000000004C530001111202103073
Vendor: SanDisk
Model: Cruzer Blade
Revision: 0100
- Get the Identifier of the device :
# ls -l /dev/disks
-rw——- 1 root root 7969177600 Dec 11 18:57 mpx.vmhba32:C0:T0:L0
-rw——- 1 root root 4161536 Dec 11 18:57 mpx.vmhba32:C0:T0:L0:1
-rw——- 1 root root 31406948352 Dec 11 18:57 t10.SanDisk00Cruzer_Blade000000004C530001111202103073
-rw——- 1 root root 31405899776 Dec 11 18:57 t10.SanDisk00Cruzer_Blade000000004C530001111202103073:1
lrwxrwxrwx 1 root root 20 Dec 11 18:57 vml.0000000000766d68626133323a303a30 -> mpx.vmhba32:C0:T0:L0
lrwxrwxrwx 1 root root 22 Dec 11 18:57 vml.0000000000766d68626133323a303a30:1 -> mpx.vmhba32:C0:T0:L0:1
lrwxrwxrwx 1 root root 22 Dec 11 18:57
vml.0000000000766d68626133333a303a30 -> t10.SanDisk00Cruzer_Blade000000004C530001111202103073
lrwxrwxrwx 1 root root 55 Dec 11 18:57 vml.0000000000766d68626133333a303a30:1 -> t10.SanDisk00Cruzer_Blade000000004C530001111202103073:1
- Write GPT label to device :
# partedUtil getptbl /vmfs/devices/disks/t10.SanDisk00Cruzer_Blade000000004C530001111202103073
- Get the end sector with below command :
# eval expr $(partedUtil getptbl /vmfs/devices/disks/t10.SanDisk00Cruzer_Blade000000004C530001111202103073 | tail -1 | awk ‘{print $1 ” \\* ” $2 ” \\* ” $3}’) – 1
61336169
- Create VMFS partition on the device (Here 61336169 is the End sector. Change the value as per your output of above command):
# partedUtil setptbl /vmfs/devices/disks/t10.SanDisk00Cruzer_Blade000000004C530001111202103073 gpt “1 2048 61336169 AA31E02A400F11DB9590000C2911D1B8 0”
- Create VMFS5 or VMFS6 filesystem (change the version as per your need) on the usb:
vmkfstools -C vmfs5 -S USB-Datastore /vmfs/devices/disks/t10.SanDisk00Cruzer_Blade000000004C530001111202103073:1
- List the datastore and path with below command to confirm :
# esxcfg-scsidevs -m
t10.SanDisk00Cruzer_Blade000000004C530001111202103073:1 /vmfs/devices/disks/t10.SanDisk00Cruzer_Blade000000004C530001111202103073:1 5df14298-96623282-6dd9-48df3713e9d0 0
Thanks for the easy post