VMware Cloud Community
ouch
Contributor
Contributor

External USB hard drive detected as SCSI by ESXi, but can it be used for anything?

When I plug a USB hard drive into the ESXi server, it is detected (I was watching the kernel messages on the ALT-F12 screen). When I rescan for devices on the VI client storage adapter screen, it is found and reported as a USB SCSI adapter.

Now my question is, can it be used in ANY way by anything? I don't seem to be able to use it for server storage, but how about connecting it to a VM for use by the hosted op. system there?

Reply
0 Kudos
7 Replies
kjb007
Immortal
Immortal

You may be able to add it to a vm as an RDM. You'll have to try and add it as a generic scsi device when you add it to the vm, because it is attached to the host, but it may work. I can't speak to how well it will perform though.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
ouch
Contributor
Contributor

I can't add it as a generic scsi device because the VM config dialog says "there are no non-disk SCSI devices available on the host". Obviously you are not intended to connect disks that way.

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

Does it show up with fdisk -l ?

Reply
0 Kudos
ouch
Contributor
Contributor

Yes it does

It shows it as /dev/disks/vmhba37:0:0:1, and details, such as 30GB, Win95 FAT32 etc are correct.

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

To manually create a datastore you would do the following. Since you already have the partition, you could just try the part in bold (substituting your device ID). It may fail on the format with vmkfstools format, but it's worth trying.

fdisk -l (to see all devices)

fdisk /dev/disks/vmhba32:0:0:0

in fdisk n (new partition), p (primary), partion number (1 - 4), cylinder, last cylinder

p - should see new partition (with Id 83 (Linux)

t - (change system ID) - pick partition and then enter Hex Code: fb

p - should now show Id: fb / System VMFS

w - (write changes and exit)

fdisk -l to get device (in my cases it is /dev/disk/vmhba32:0:0:1

vmkfstools -C vmfs3 -S datastore2 /dev/disks/vmhba32:0:0:1

Reply
0 Kudos
ouch
Contributor
Contributor

Thanks Dave. Those instructions worked.

However, I didn't want to reformat that external hard drive, so I plugged in a USB flash drive and tried it on that instead. As I said, the instructions worked, but, the server had trouble using the result. The kernel log showed timeout erros, and the gross effect was the whole server virtually hung while trying to access the new datastore.

I rebooted the server, and it hung again while executing the config with similar timeout errors, but, amusingly, when I pulled the USB drive out, the server immediately continued booting normally. So, either the USB flash drive is too slow, or else, USB drives in general are. I need to try this again when I get an external hard drive that I can wipe.

Reply
0 Kudos
ouch
Contributor
Contributor

I cleaned the data off a real external usb hard drive, and added it to the esxi server as per the instructions. It all worked, and the server didn't hang or slow down. The kernel log is showing warnings about "reservation error: I/O error", but the disk is there according to fdisk -l, even after a server reboot.

Still, however, trying to "add storage" using the VI client shows no local drives to add.

Reply
0 Kudos