ESXI. CLI. Диски и разделы. Просмотр и управление через консоль

Материал из Wiki
Перейти к навигации Перейти к поиску

Links

https://kb.vmware.com/s/article/1036609

Show disks

ls -lh /vmfs/devices/disks/

28.7G Jan 16 08:42 mpx.vmhba32:C0:T0:L0  -  SD-card 32 GB

2.6T Jan 16 08:42 naa.600508b1001c76fc7a88bf86316a3002  -  hardware RAID 2.6 TB

mpx.vmhba32:C0:T0:L0:[1-9]  -  Partitions

...
total 5686081064
-rw-------    1 root     root       28.7G Jan 16 08:42 mpx.vmhba32:C0:T0:L0
-rw-------    1 root     root        4.0M Jan 16 08:42 mpx.vmhba32:C0:T0:L0:1
-rw-------    1 root     root      250.0M Jan 16 08:42 mpx.vmhba32:C0:T0:L0:5
-rw-------    1 root     root      250.0M Jan 16 08:42 mpx.vmhba32:C0:T0:L0:6
-rw-------    1 root     root      110.0M Jan 16 08:42 mpx.vmhba32:C0:T0:L0:7
-rw-------    1 root     root      286.0M Jan 16 08:42 mpx.vmhba32:C0:T0:L0:8
-rw-------    1 root     root       27.9G Jan 16 08:42 mpx.vmhba32:C0:T0:L0:9
-rw-------    1 root     root        2.6T Jan 16 08:42 naa.600508b1001c76fc7a88bf86316a3002
-rw-------    1 root     root        2.6T Jan 16 08:42 naa.600508b1001c76fc7a88bf86316a3002:1
lrwxrwxrwx    1 root     root          20 Jan 16 08:42 vml.0000000000766d68626133323a303a30 -> mpx.vmhba32:C0:T0:L0
lrwxrwxrwx    1 root     root          22 Jan 16 08:42 vml.0000000000766d68626133323a303a30:1 -> mpx.vmhba32:C0:T0:L0:1
lrwxrwxrwx    1 root     root          22 Jan 16 08:42 vml.0000000000766d68626133323a303a30:5 -> mpx.vmhba32:C0:T0:L0:5
lrwxrwxrwx    1 root     root          22 Jan 16 08:42 vml.0000000000766d68626133323a303a30:6 -> mpx.vmhba32:C0:T0:L0:6
lrwxrwxrwx    1 root     root          22 Jan 16 08:42 vml.0000000000766d68626133323a303a30:7 -> mpx.vmhba32:C0:T0:L0:7
lrwxrwxrwx    1 root     root          22 Jan 16 08:42 vml.0000000000766d68626133323a303a30:8 -> mpx.vmhba32:C0:T0:L0:8
lrwxrwxrwx    1 root     root          22 Jan 16 08:42 vml.0000000000766d68626133323a303a30:9 -> mpx.vmhba32:C0:T0:L0:9
lrwxrwxrwx    1 root     root          36 Jan 16 08:42 vml.0200010000600508b1001c76fc7a88bf86316a30024c4f47494341 -> naa.600508b1001c76fc7a88bf86316a3002
lrwxrwxrwx    1 root     root          38 Jan 16 08:42 vml.0200010000600508b1001c76fc7a88bf86316a30024c4f47494341:1 -> naa.600508b1001c76fc7a88bf86316a3002:1
...

Get disk info

partedUtil get "/vmfs/devices/disks/mpx.vmhba32:C0:T0:L0"

...
3750 255 63 60258304
1 64 8191 0 128
5 8192 520159 0 0
6 520160 1032127 0 0
7 1032128 1257375 0 0
8 1257376 1843071 0 0
9 1843072 60258270 0 0
...

The first line displays the disk geometry information read from the underlying device:

17834 255 63 286513152
| | | |
| | | \----- quantity of sectors
| | \-------- quantity of sectors per track
| \------------ quantity of heads
\------------------ quantity of cylinders

The remaining lines identify each defined partition. If no partitions are defined, this list is blank. The list may not be sorted.

For example: Here there are 4 partitions defined. The first partition (type 131 = 0x83 = Linux) is bootable. The second partition is a VMKcore coredump partition datastore (type 252 = 0xFC). The third partition is an // Extended partition (type 5) containing additional Logical partitions. The fourth partition (numbered 5), is a Logical partition within partition number 5 and contains a VMFS Datastore (type 251 = 0xFB).

1 64 8191 0 128
5 8192 520159 0 0
6 520160 1032127 0 0
7 1032128 1257375 0 0
8 1257376 1843071 0 0
9 1843072 60258270 0 0
| | | | |
| | | | \--- attribute
| | | \------- type
| | \----------------- ending sector
| \------------------------- starting sector
\--------------------------- partition number