一 VM中删除快照,扩展磁盘
二
linux-ffa4:~ # fdisk -l
Disk /dev/sda: 75.2 GB, 75161927680 bytes
255 heads, 63 sectors/track, 9137 cylinders, total 146800640 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0003f680Device Boot Start End Blocks Id System
/dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris/dev/sda2 * 4208640 104857599 50324480 83 Linux
linux-ffa4:~ # fdisk /dev/sda
Command (m for help): m
Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)
我们执行一下该命令:
[root@db1 dev]# partprobe
Warning: Unable to open /dev/hdc read-write (Read-only file system). /dev/hdc has been opened read-only.
如果还有错误,可以从错误中看出来,需要reboot重启然后再mkfs格式化硬盘空间就可以了。
mkfs -t ext3 /dev/sda3
mount /dev/sda3 /exapp
现在分区好了我们用mount 挂载一下该分区即可使用了,这里我把它挂载到mnt目录下
如果想每次系统重启都能自动挂载该分区可修改/etc/fstab文件,在最后加一段 /dev/sda3 /www ext3 defaults 1 2 (格式说明:/dev/sdb1 代表哪个分区 ext3是该分区的格式 defaults 是挂载时所要设定的参数(只读,读写,启用quota等),输入defaults包括的参数有(rw、dev、exec、auto、nouser、async) ,1是使用dump是否要记录,0是不要。 2是开机时检查的顺序,是boot系统文件就为1,其他文件系统都为2,如不要检查就为0)
/dev/sda3 /www ext3 defaults 就行了。
、