你好,游客 登录 注册 搜索
背景:
阅读新闻

ESXI 4.1 Linux虚拟机调整扩充磁盘大小

[日期:2012-11-06] 来源:Linux社区  作者:viong [字体:大 中 小]

首先调整磁盘大小为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

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款