if you need to "cheat" with your ESXi datastore for more space, you need to stop "/etc/init.d/usbarbitrator" to get the controller and disk in /dev. then "partedUtil mklabel $device gpt" for a gpt label (use disk not the controller). then you need the partition, formated for vmfs, and then change the host storage policies. vmwareesxiusbdatastore
partition you'll need to know the end sector which you can get from "partedUtil getptbl $device" and taking the product. using that, "partedUtil setptbl $disk gpt '1 2048 $product AA31E02A400F11DB9590000C2911D1B8 0'" labels the range you gave it with the GUID type for vmfs.
formatting is pretty easy, just use "vmkfstools -C $filesystem -S $datastore $device" with one of the vmfs filesystems ("vmfs6" or "vmfs5") and the desired datastore name.
changing the policy, though, requires casting a spell. change the settings with: "esxcli system settings advanced set -o /Disk/AllowUsbClaimedAsSSD -I 1"
then apply the satp rule to the device with the following (escaped hyphers because plurk's markdown sucks): "esxcli storage nmp satp rule add -s VMW_SATP_LOCAL \-\-device=$device option=enable_ssd"
afterwards you then need to reload everything with the following (escaped hyphens because plurk's markdown sucks): "esxcli storage core claiming unclaim \-\-type device \-\-device=$device" "esxcli storage core claimrule load" "esxcli storage core claimrule run"
/etc/init.d/usbarbitrator
" to get the controller and disk in/dev
. then "partedUtil mklabel $device gpt
" for a gpt label (use disk not the controller). then you need the partition, formated for vmfs, and then change the host storage policies.vmware esxi usb datastore
partedUtil getptbl $device
" and taking the product. using that, "partedUtil setptbl $disk gpt '1 2048 $product AA31E02A400F11DB9590000C2911D1B8 0'
" labels the range you gave it with the GUID type for vmfs.vmkfstools -C $filesystem -S $datastore $device
" with one of the vmfs filesystems ("vmfs6
" or "vmfs5
") and the desired datastore name."
esxcli system settings advanced set -o /Disk/AllowUsbClaimedAsSSD -I 1
"then apply the satp rule to the device with the following (escaped hyphers because plurk's markdown sucks):
"
esxcli storage nmp satp rule add -s VMW_SATP_LOCAL \-\-device=$device option=enable_ssd
""
esxcli storage core claiming unclaim \-\-type device \-\-device=$device
""
esxcli storage core claimrule load
""
esxcli storage core claimrule run
"this is from fgrehk@virten.net archived at ehowton@livejournal.com.