esxi6.7下添加USB硬盘作为数据存储
Xplorist Lv6

esxi6.7下添加USB硬盘作为数据存储

code

1
2
3
4
5
6
7
8
9

/etc/init.d/usbarbitrator stop

chkconfig usbarbitrator off

esxcli storage core device list |grep -i usb

ls /dev/disks/

t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB

1
2
3
4
5

partedUtil mklabel /dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB gpt

partedUtil getptbl /dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB

gpt
121601 255 63 1953525167

1
2
3

eval expr $(partedUtil getptbl /dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB | tail -1 | awk '{print $1 " \\* " $2 " \\* " $3}') - 1

1953520064

1
2
3

partedUtil setptbl /dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB gpt "1 2048 1953520064 AA31E02A400F11DB9590000C2911D1B8 0"

gpt
0 0 0 0
1 2048 1953520064 AA31E02A400F11DB9590000C2911D1B8 0

1
2
3

vmkfstools -C vmfs5 -S USB_Datastore /dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB:1

create fs deviceName:’/dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB:1’, fsShortName:’vmfs5’, fsName:’USB_Datastore’
deviceFullPath:/dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB:1 deviceFile:t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB:1
ATS on device /dev/disks/t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB:1: not supported
.
Checking if remote hosts are using this device as a valid file system. This may take a few seconds…
Creating vmfs5 file system on “t10.000000000000000000000000000000000000000000000000000000000000000000000000NAA4R5RB:1” with blockSize 1048576 and volume label “USB_Datastore”.
Successfully created new volume: 60ce206c-f342860c-5ca8-844709047094

 评论