歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> ESXI 4.1 Linux虛擬機調整擴充磁盤大小

ESXI 4.1 Linux虛擬機調整擴充磁盤大小

日期:2017/2/28 15:29:30   编辑:Linux教程

首先調整磁盤大小為60G

點確定後,重啟虛擬機OS

[root@download1 ~] shutdown -r now

[root@download1 ~]fdisk -l

Disk /dev/sda: 64.4 GB, 64424509440 bytes

255 heads, 63 sectors/track, 7832 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 2610 20860402+ 8e Linux LVM

[root@download1 ~]# df -hl

文件系統 容量 已用 可用 已用% 掛載點

/dev/mapper/VolGroup00-LogVol00

19G 12G 6.4G 64% /

/dev/sda1 99M 20M 75M 21% /boot

tmpfs 2.0G 0 2.0G 0% /dev/shm

[root@download1 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 7832.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 3

First cylinder (2611-7832, default 2611): 默認回車

Using default value 2611

Last cylinder or +size or +sizeM or +sizeK (2611-7832, default 7832):默認回車

Using default value 7832

Command (m for help): t

Partition number (1-4): 3

Hex code (type L to list codes): 8e

Changed system type of partition 3 to 8e (Linux LVM)

Command (m for help): p

Disk /dev/sda: 64.4 GB, 64424509440 bytes

255 heads, 63 sectors/track, 7832 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 2610 20860402+ 8e Linux LVM

/dev/sda3 2611 7832 41945715 8e Linux LVM

Command (m for help): w 保持退出

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 設備或資源忙.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

重啟虛擬機OS

[root@download1 ~]# shutdown -r now

[root@download1 ~]fdisk -l

Disk /dev/sda: 64.4 GB, 64424509440 bytes

255 heads, 63 sectors/track, 7832 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 2610 20860402+ 8e Linux LVM

/dev/sda3 2611 7832 41945715 8e Linux LVM

[root@download1 ~]# df -hl

文件系統 容量 已用 可用 已用% 掛載點

/dev/mapper/VolGroup00-LogVol00

19G 12G 6.4G 64% /

/dev/sda1 99M 20M 75M 21% /boot

tmpfs 2.0G 0 2.0G 0% /dev/shm

[root@download1 ~]# df -T /dev/sda1

文件系統 類型 1K-塊 已用 可用 已用% 掛載點

/dev/sda1 ext3 101086 19487 76380 21% /boot

Copyright © Linux教程網 All Rights Reserved