20160123

vmware create vmfs datastore on the same 16G usb flash drive :)


ESXI (VMware-VMvisor-Installer-201601001-3380124.x86_64.iso) is installed on SanDisk Cruzer Fit 16G usb flash



======

[root@localhost:~] esxcli storage core device list
mpx.vmhba32:C0:T0:L0
   Display Name: Local USB Direct-Access (mpx.vmhba32:C0:T0:L0)
   Has Settable Display Name: false
   Size: 15267
   Device Type: Direct-Access
   Multipath Plugin: NMP
   Devfs Path: /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0
   Vendor: SanDisk
   Model: Cruzer Fit
   Revision: 1.27
   SCSI Level: 2
   Is Pseudo: false
   Status: on
   Is RDM Capable: false
   Is Local: true
   Is Removable: true
   Is SSD: false
   Is VVOL PE: false
   Is Offline: false
   Is Perennially Reserved: false
   Queue Full Sample Size: 0
   Queue Full Threshold: 0
   Thin Provisioning Status: unknown
   Attached Filters:
   VAAI Status: unsupported
   Other UIDs: vml.0000000000766d68626133323a303a30
   Is Shared Clusterwide: false
   Is Local SAS Device: false
   Is SAS: false
   Is USB: true
   Is Boot USB Device: true
   Is Boot Device: true
   Device Max Queue Depth: 1
   No of outstanding IOs with competing worlds: 32
   Drive Type: unknown
   RAID Level: unknown
   Number of Physical Drives: unknown
   Protection Enabled: false
   PI Activated: false
   PI Type: 0
   PI Protection Mask: NO PROTECTION
   Supported Guard Types: NO GUARD SUPPORT
   DIX Enabled: false
   DIX Guard Type: NO GUARD SUPPORT
   Emulated DIX/DIF Enabled: false

[root@localhost:~] ls -alh /vmfs/devices/disks
total 960812721
drwxr-xr-x    2 root     root         512 Jan 23 17:21 .
drwxr-xr-x   15 root     root         512 Jan 23 17:21 ..
-rw-------    1 root     root       14.9G Jan 23 17:21 mpx.vmhba32:C0:T0:L0
-rw-------    1 root     root        4.0M Jan 23 17:21 mpx.vmhba32:C0:T0:L0:1
-rw-------    1 root     root      250.0M Jan 23 17:21 mpx.vmhba32:C0:T0:L0:5
-rw-------    1 root     root      250.0M Jan 23 17:21 mpx.vmhba32:C0:T0:L0:6
-rw-------    1 root     root      110.0M Jan 23 17:21 mpx.vmhba32:C0:T0:L0:7
-rw-------    1 root     root      286.0M Jan 23 17:21 mpx.vmhba32:C0:T0:L0:8
-rw-------    1 root     root        2.5G Jan 23 17:21 mpx.vmhba32:C0:T0:L0:9
lrwxrwxrwx    1 root     root          20 Jan 23 17:21 vml.0000000000766d68626133323a303a30 -> mpx.vmhba32:C0:T0:L0
lrwxrwxrwx    1 root     root          22 Jan 23 17:21 vml.0000000000766d68626133323a303a30:1 -> mpx.vmhba32:C0:T0:L0:1
lrwxrwxrwx    1 root     root          22 Jan 23 17:21 vml.0000000000766d68626133323a303a30:5 -> mpx.vmhba32:C0:T0:L0:5
lrwxrwxrwx    1 root     root          22 Jan 23 17:21 vml.0000000000766d68626133323a303a30:6 -> mpx.vmhba32:C0:T0:L0:6
lrwxrwxrwx    1 root     root          22 Jan 23 17:21 vml.0000000000766d68626133323a303a30:7 -> mpx.vmhba32:C0:T0:L0:7
lrwxrwxrwx    1 root     root          22 Jan 23 17:21 vml.0000000000766d68626133323a303a30:8 -> mpx.vmhba32:C0:T0:L0:8
lrwxrwxrwx    1 root     root          22 Jan 23 17:21 vml.0000000000766d68626133323a303a30:9 -> mpx.vmhba32:C0:T0:L0:9


[root@localhost:~] partedUtil getptbl "/vmfs/devices/disks/mpx.vmhba32:C0:T0:L0"
gpt
1946 255 63 31266816
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
9 1843200 7086079 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
[root@localhost:~]
[root@localhost:~]#add last partition with 1MB gap at the end of flash disk - like this gap laft all the partitioning tools from linux
[root@localhost:~] #in this flash disk - last sector = 31266816
[root@localhost:~] #so 31266816 - 2048 = 31264767
[root@localhost:~] #and according to doc:
[root@localhost:~] #For ESXi/ESX 4.1 and later, use the command:
[root@localhost:~] #partedUtil setptbl "/vmfs/devices/disks/DeviceName" DiskLabel ["partNum startSector endSector type/guid
attribute"]*
[root@localhost:~] #Using the partedUtil command line utility on ESXi and ESX (1036609)
[root@localhost:~] partedUtil getptbl "/vmfs/devices/disks/mpx.vmhba32:C0:T0:L0"
gpt
1946 255 63 31266816
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
9 1843200 7086079 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
[root@localhost:~] partedUtil setptbl "/vmfs/devices/disks/mpx.vmhba32:C0:T0:L0" gpt "1 64 8191 C12A7328F81F11D2BA4B00A0C93E
C93B 128" "5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 0" "6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 0" "7 103222
4 1257471 0" "8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 0" "9 1843200 7086079 9D27538040AD11DBBF97000C2911D1B8 0" "
10 7086080 31264767 AA31E02A400F11DB9590000C2911D1B8 0"
Invalid number of tokens

Invalid partition information: 7 1032224 1257471 0

Invalid Partition information

[root@localhost:~] partedUtil setptbl "/vmfs/devices/disks/mpx.vmhba32:C0:T0:L0" gpt "1 64 8191 C12A7328F81F11D2BA4B00A0C93E
C93B 128" "5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 0" "6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 0" "7 103222
4 1257471 9D27538040AD11DBBF97000C2911D1B8 0" "8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 0" "9 1843200 7086079 9D27
538040AD11DBBF97000C2911D1B8 0" "10 7086080 31264767 AA31E02A400F11DB9590000C2911D1B8 0"
gpt
0 0 0 0
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 0
9 1843200 7086079 9D27538040AD11DBBF97000C2911D1B8 0
10 7086080 31264767 AA31E02A400F11DB9590000C2911D1B8 0
[root@localhost:~] partedUtil getptbl "/vmfs/devices/disks/mpx.vmhba32:C0:T0:L0"
gpt
1946 255 63 31266816
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
9 1843200 7086079 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
10 7086080 31264767 AA31E02A400F11DB9590000C2911D1B8 vmfs 0
[root@localhost:~] #PartitionGUIDType (Hex)Type (Decimal)
[root@localhost:~] #VMFS Datastore AA31E02A400F11DB9590000C2911D1B8 0xFB 251
[root@localhost:~] #etc.
[root@localhost:~] vmkfstools -C vmfs5 -b 1m -S NewDatastore /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0:10
create fs deviceName:'/vmfs/devices/disks/mpx.vmhba32:C0:T0:L0:10', fsShortName:'vmfs5', fsName:'NewDatastore'
deviceFullPath:/dev/disks/mpx.vmhba32:C0:T0:L0:10 deviceFile:mpx.vmhba32:C0:T0:L0:10
ATS on device /dev/disks/mpx.vmhba32:C0:T0:L0:10: 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 "mpx.vmhba32:C0:T0:L0:10" with blockSize 1048576 and volume label "NewDatastore".
Successfully created new volume: 56a3bdf4-65a64697-f032-101f744c0550
[root@localhost:~] #last command was how to add "NewDatastore" to esxi from cli
[root@localhost:~] #To create a new VMFS volume from the ESX/ESXi host command line:
[root@localhost:~] #Manually creating a VMFS volume using vmkfstools -C (1009829)
[root@localhost:~] esxcli storage core adapter list
HBA Name  Driver       Link State  UID           Capabilities  Description
--------  -----------  ----------  ------------  ------------  -------------------------------------------------------------------------
vmhba0    ahci         link-n/a    sata.vmhba0                 (0000:00:1f.2) Intel Corporation Cougar Point 6 port SATA AHCI Controller
vmhba32   usb-storage  link-n/a    usb.vmhba32                 () USB
vmhba33   ahci         link-n/a    sata.vmhba33                (0000:00:1f.2) Intel Corporation Cougar Point 6 port SATA AHCI Controller
vmhba34   ahci         link-n/a    sata.vmhba34                (0000:00:1f.2) Intel Corporation Cougar Point 6 port SATA AHCI Controller
vmhba35   ahci         link-n/a    sata.vmhba35                (0000:00:1f.2) Intel Corporation Cougar Point 6 port SATA AHCI Controller
vmhba36   ahci         link-n/a    sata.vmhba36                (0000:00:1f.2) Intel Corporation Cougar Point 6 port SATA AHCI Controller
vmhba37   ahci         link-n/a    sata.vmhba37                (0000:00:1f.2) Intel Corporation Cougar Point 6 port SATA AHCI Controller
[root@localhost:~] esxcli storage core adapter rescan --adapter vmhba32
[root@localhost:~] vmkfstools -V
[root@localhost:~] #last was acc to Performing a rescan of the storage on an ESX/ESXi host (1003988)
[root@localhost:~]


result:







======

Немає коментарів:

Дописати коментар

#EXTRACT4 ubuntu server

server 202011 #EXTRACT4: enable the “partner” repository: https://askubuntu.com/questions/14629/how-do-i-enable-the-partner-repository sud...