VMware Cloud Community
YORKLY
Contributor
Contributor

Need help on mounting 4TB USB External Storage device to ESXi 4.0.

Good day folks,  I am currently running ESXi 4.0 and planning to upgrade to v5.1.   Prior upgrading,  I need to backup all my VM images to a 4TB USB external storage device hooked up to my VMWare host server directly.

I already created a single partition using these steps below.

    1. Run the command:

      fdisk -u /dev/disks/mpx.vmhba34:C0:T0:L0

    2. Type p and press Enter to list partition information.
    3. Type d and press Enter to delete existing partition information.
    4. Type n and press Enter for new partition.
    5. Type p and press Enter for a primary partition.
    6. Type 1 and press Enter.
    7. For the First cylinder prompt, press Enter for the default.
    8. For last cylinder or +size, press Enter for the default.
    9. Type t and press Enter to change volume type.
    10. Type 1 and press Enter to select the first partition.
    11. Type fb and press Enter.

      Note: fb is the hexadecimal code for VMFS volumes.

    12. Type x and press Enter to enter Expert mode.
    13. Type b and press Enter to start the process of changing the starting block of the partition.
    14. Type 1 and press Enter to select the first partition.
    15. Type 128 and press Enter to set the starting block to 128.
    16. Type w and press Enter to save the changes and exit fdisk.

  • To list the newly created partition information:

        fdisk -lu /dev/disks/mpx.vmhba34:C0:T0:L0


        Note: sector size is 4096 (not 512)

        Disk /dev/disks/mpx.vmhba34:C0:T0:L0: 4000.7 GB, 4000752599040 bytes
        255 heads, 63 sectors/track, 60799 cylinders, total 976746240 sectors
        Units = sectors of 1 * 4096 = 4096 bytes

                           Device Boot      Start         End      Blocks  Id System
        /dev/disks/mpx.vmhba34:C0:T0:L0p1           128 4294967294 17179868668   fb  VMFS

When I tried to use the vmkfstools command to format the new partition as a VMFS-3 datastore.

vmkfstools -C vmfs3 -b 8m -S USBDatastore /dev/disks/mpx.vmhba34:C0:T0:L0p1

I got this error.

Device path name "/dev/disks/mpx.vmhba34:C0:T0:L0p1" is not a valid absolute or relative path
Failed to resolve device name path /dev/disks/mpx.vmhba34:C0:T0:L0p1
Usage: vmkfstools -C vmfs3 /vmfs/devices/disks/vml... or,
       vmkfstools -C vmfs3 /vmfs/devices/disks/naa... or,
       vmkfstools -C vmfs3 /vmfs/devices/disks/mpx.vmhbaA:T:L:P
Error: No such file or directory

I also tried

vmkfstools -C vmfs3 -b 8m -S USBDatastore /dev/disks/mpx.vmhba34:C0:T0:L0:1

vmkfstools -C vmfs3 -b 8m -S USBDatastore /dev/disks/mpx.vmhba34:C0:T0:L0:p1

Same error

Then I tried

vmkfstools -C vmfs3 -b 8m -S USBDatastore /dev/disks/mpx.vmhba34:C0:T0:L0

got this error

Creating vmfs3 file system on "mpx.vmhba34:C0:T0:L0" with blockSize 8388608 and volume label "USBDatastore".
/dev/disks/mpx.vmhba34:C0:T0:L0: Permission denied.  (Have you set the partition type to 0xfb?)
Error: Permission denied

What did I do wrong?    I know that there is a partition created under this name below.   Why can't I format it?

/dev/disks/mpx.vmhba34:C0:T0:L0p1           128 4294967294 17179868668   fb  VMFS

~ # ls -alh /vmfs/devices/disks


drwxr-xr-x    1 root     root          512 Apr 24 05:20 .
drwxr-xr-x    1 root     root          512 Apr 24 05:20 ..
-rw-------    1 root     root         3.6T Apr 24 05:20 mpx.vmhba34:C0:T0:L0

~ # esxcfg-mpath -b

mpx.vmhba34:C0:T0:L0 : Local USB Direct-Access (mpx.vmhba34:C0:T0:L0)
   vmhba34:C0:T0:L0 LUN:0 state:active  Local HBA vmhba34 channel 0 target 0

mpx.vmhba34:C0:T0:L1 : Local USB Enclosure Svc Dev(mpx.vmhba34:C0:T0:L1)
   vmhba34:C0:T0:L1 LUN:1 state:active  Local HBA vmhba34 channel 0 target 0

mpx.vmhba0:C0:T0:L0 : Local HL-DT-ST CD-ROM (mpx.vmhba0:C0:T0:L0)
   vmhba0:C0:T0:L0 LUN:0 state:active  Local HBA vmhba0 channel 0 target 0

Anyone please help.

Thanks.

York

Reply
0 Kudos
4 Replies
Josh26
Virtuoso
Virtuoso

  • Plug that disk into your client desktop
  • Use either the "Export" utility from vSphere client, or a tool like Veeam to export to that disk
  • Done, without any messing around with unsupported processes
Reply
0 Kudos
a_p_
Leadership
Leadership

Welcome to the Community,

firstly, ESXi versions prior to 5.0 do not support LUN/disk sizes larger than ~2TB and secondly VMFS is not supported on USB devices. I'd suggest you consider to backup the VMs with a 3rd-party tool as mentioned by Josh26

André

Reply
0 Kudos
YORKLY
Contributor
Contributor

Thanks folks,  guess I have to mount this device to another Redhat Linux machine and do a remote nfs mount over to that machine.  

York

Reply
0 Kudos
YORKLY
Contributor
Contributor

Assuming the same processes will be supported with ESXi 5.1?

York

Reply
0 Kudos