- 论坛徽章:
- 0
|
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 |
|