VMware 虚拟机增加磁盘空间以成功

上传人:飞*** 文档编号:40355242 上传时间:2018-05-26 格式:DOC 页数:9 大小:60KB
返回 下载 相关 举报
VMware 虚拟机增加磁盘空间以成功_第1页
第1页 / 共9页
VMware 虚拟机增加磁盘空间以成功_第2页
第2页 / 共9页
VMware 虚拟机增加磁盘空间以成功_第3页
第3页 / 共9页
VMware 虚拟机增加磁盘空间以成功_第4页
第4页 / 共9页
VMware 虚拟机增加磁盘空间以成功_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《VMware 虚拟机增加磁盘空间以成功》由会员分享,可在线阅读,更多相关《VMware 虚拟机增加磁盘空间以成功(9页珍藏版)》请在金锄头文库上搜索。

1、VMwareVMware 虚拟机增加磁盘空间以成功虚拟机增加磁盘空间以成功 我的虚拟机之前硬盘的小是 100Gb,但由于数据太的先已经不够用啦,想扩大到 200Gb,在网上找了很多的方法都没有成功,上天不负有心人啊,让我最终找的了这篇文档,现在和大家分享下。一、关闭你的虚拟机系统,找到如下内容:选择“Edit Virtual mache settings”点击“Expand“或者或者下用下用 VMWARE 自带的工具自带的工具 找到你的 vmware 安装目录, 然后在安装目录下找到 vmware-vdiskmanager.exe 这个文件, 当然你双击没有用的,我这里只是想让你确定有这个文件

2、,才能使用它。打开命令 cd 到你 的 vmware 的安装目录然后输入 vmware-vdiskmanager ,你发现列出了一堆的命令就表明是 可以用的了,好我们现在开始使用他来调整 VM 的分区大小。 vmware-vdiskmanager -x 40Gb D:Ubuntu10Ubuntu.vmdk -x 表示扩展新的分区 40GB 是大小 D:Ubuntu10Ubuntu.vmdk 这个是你虚拟机中 OS 的物理磁盘文件好了,现在你就开始慢慢等他给你重新调整分区吧,还是需要一段时间的。其实它就是在 你原来的基础上加了一些分区链接,好比你原来有 10G 那他就又新分 16-10=6 GB

3、 的空间 出来 ,原先的还是保持不变的,所以放心你的数据不会丢失的。扩大虚拟机的空间为“40G“(根据个人需要填写空间大小)。但是 linux 下用 df -h 查看并不可见。二、使用 linux 下的 fdisk 工具进行分区。用 root 用户登录到你的 linux 系统,查看你系统的分区#fdisk -l 会出现以下的信息:Device Boot Start End Blocks Id System/dev/sda1 * 1 64 512000 83 Linux/dev/sda2 64 2611 20458496 8e Linux LVMDisk /dev/mapper/vg_zxw-l

4、v_root: 18.8 GB, 18832424960 bytes255 heads, 63 sectors/track, 2289 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000Disk /dev/mapper/vg_zxw-lv_root doesnt contain

5、 a valid partition tableDisk /dev/mapper/vg_zxw-lv_swap: 2113 MB, 2113929216 bytes255 heads, 63 sectors/track, 257 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0000000

6、0Disk /dev/mapper/vg_zxw-lv_swap doesnt contain a valid partition table根据提示信息可以判断出此系统的磁盘接口为 SCSI,对应“sda”如果上面的红色字体是“hda”,那么此系统的磁盘接口为 IDE 对应“hda”所以我做一下操作:#fdisk /dev/sda/WARNING: DOS-compatible mode is deprecated. Its strongly recommended toswitch off the mode (command c) and change display units tose

7、ctors (command u).Command (m for help):m /“ 列出 fdisk 的帮助”Command actiona toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd delete a partitionl list known partition typesm print this menun add a new partitiono create a new empty DOS partition tablep print the partition ta

8、bleq quit without saving changess create a new empty Sun disklabelt change a partitions system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only)Command (m for help):n /” 命令 n 用于添加新分区“Command actione extendedp primary partitio

9、n (1-4)p /“ 选择创建主分区“此时,Partition number (1-4):3 /fdisk 会让你选择主分区的编号,如果已经有了主分区 sda1,sda2,那么编号就选 3,即要创建的该分区为 sda3.First cylinder (2611-3916, default 2611): /此时,fdisk 又会让你选择该分区的开始值这个就是分区的 Start 值(start cylinder);这里最好直接按回车,Using default value 2611Last cylinder, +cylinders or +sizeK,M,G (2611-3916, defaul

10、t 3916): /此时,fdisk 又会让你选择该分区的开始值这个就是分区的 End 值这里最好直接按回车,Using default value 3916Command (m for help): w /w “保存所有并退出,分区划分完毕“The partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel s

11、till uses the old table. The new table will be used atthe next reboot or after you run partprobe(8) or kpartx(8)Syncing disks. 三、我们的新建分区/dev/sda3,却不是 LVM 的。所以,接下来使用 fdisk 将其改成 LVM 的。#fdisk /dev/sdaCommand (m for help): mCommand (m for help): t /改变分区系统 id Partition number (1-4): 3 /指定分区号Hex code (typ

12、e L to list codes): 8e /指定要改成的 id 号,8e 代表 LVM。Command (m for help): w四、重启系统后,登陆系统。(一定要重启系统,否则无法扩充新分区)五、格式化该新添加的分区:#fdisk -lDevice Boot Start End Blocks Id System/dev/sda1 * 1 64 512000 83 Linux/dev/sda2 64 2611 20458496 8e Linux LVM/dev/sda3 2611 3916 10483750 8e Linux LVM你会发现多了一块分区。#mkfs -t ext3 /d

13、ev/sda3 /在硬盘分区“/dev/sda3”上创建“ext3”文件系统。此时我们就可以使用该新增分区啦:六、扩充新分区#lvs#pvcreate /dev/sda3 /pvcreate 指令用于将物理硬盘分区初始化为物理卷,以便被 LVM 使用。要创建物理卷必须首先对硬盘进行分区,并且将硬盘分区的类型设置为“8e”后,才能使用 pvcreat 指令将分区初始化为物理卷。Physical volume “/dev/sda3“ successfully created#vgextend VolGroup00 /dev/sda3 (其中是当前需要扩充的 lvm 组名,可以通过 df -h 查看

14、,例如我的是: /dev/mapper/VolGroup00-LogVol00) /vgextend 指令用于动态的扩展卷组,它通过向卷组中添加物理卷来增加卷组的容量。#vgdisplay /用于显示 LNM 卷组的元数据信息。- Volume group -VG Name vg_zxwSystem ID Format lvm2Metadata Areas 1Metadata Sequence No 3VG Access read/writeVG Status resizableMAX LV 0Cur LV 2Open LV 2Max PV 0Cur PV 1Act PV 1VG Size 19.51 GiBPE Size 4.00 MiBTotal PE 4994Alloc PE / Size 4994 /

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 研究报告 > 综合/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号