免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1382 | 回复: 0
打印 上一主题 下一主题

Vmware Workstation增加硬盘空间 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-26 19:26 |只看该作者 |倒序浏览
Vmware Workstation增加硬盘空间************先将虚拟机Power Off,在Virtual Machine Setting对话框里点击左下角的“Add”,选择“Hard Disk”,之后选择“Create a new virtual disk”,分配容量。[root@centos u01]# df -h文件系统              容量  已用 可用 已用% 挂载点/dev/sda1             6.8G  6.8G     0 100% /tmpfs                 506M     0  506M   0% /dev/shm①fdisk -l查看是否识别了新硬盘,如果添加的是IDE硬盘,就应该看到hdb,如果是SCSI硬盘,看到的就应该是sdb[root@centos u01]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *           1         913     7333641   83  Linux/dev/sda2             914        1044     1052257+  82  Linux swap / Solaris
Disk /dev/sdb: 4294 MB, 4294967296 bytes255 heads, 63 sectors/track, 522 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table②使用fdisk /dev/sdc,在出现的选项中选择“w”,即将分区表写入硬盘并退出[root@centos u01]# fdisk /dev/sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): wThe partition table has been altered!
Calling ioctl() to re-read partition table.Syncing disks.③fdisk -l查看[root@centos u01]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes255 heads, 63 sectors/track, 1044 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *           1         913     7333641   83  Linux/dev/sda2             914        1044     1052257+  82  Linux swap / Solaris
Disk /dev/sdb: 4294 MB, 4294967296 bytes255 heads, 63 sectors/track, 522 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System[root@centos u01]# df -h文件系统              容量  已用 可用 已用% 挂载点/dev/sda1             6.8G  6.8G     0 100% /tmpfs                 506M     0  506M   0% /dev/shm④用mkfs命令将其格式化,mkfs /dev/sdc[root@centos u01]# mkfs /dev/sdbmke2fs 1.39 (29-May-2006)/dev/sdb is entire device, not just one partition!Proceed anyway? (y,n) yFilesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)524288 inodes, 1048576 blocks52428 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=107374182432 block groups3⑤用mount命令将其挂载,mount -t ext2 /dev/sdb /media[root@centos u01]# mount -t ext2 /dev/sdb /media[root@centos u01]# df -h文件系统              容量  已用 可用 已用% 挂载点/dev/sda1             6.8G  6.8G     0 100% /tmpfs                 506M     0  506M   0% /dev/shm/dev/sdb              4.0G  8.0M  3.8G   1% /media
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/82363/showart_2008300.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP