VM虚拟机中Linux扩展磁盘空间的方法
2017-09-19 16:12
501 查看
一 VM中删除快照,扩展磁盘
二
linux-ffa4:~ # fdisk -l
Disk /dev/sda: 75.2 GB, 75161927680 bytes
255 heads, 63 sectors/track, 9137 cylinders, total 146800640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003f680
Device 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 就行了。
、
二
linux-ffa4:~ # fdisk -l
Disk /dev/sda: 75.2 GB, 75161927680 bytes
255 heads, 63 sectors/track, 9137 cylinders, total 146800640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003f680
Device 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 就行了。
、
相关文章推荐
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- linux 磁盘转移空间的方法
- linux下使用 du查看某个文件或目录占用磁盘空间的大小方法
- Linux查看磁盘空间的好方法
- linux下使用 du查看某个文件或目录占用磁盘空间的大小方法
- linux系统限制磁盘空间的两种方法
- Linux LVM磁盘空间扩容的新方法
- linux磁盘空间用满的处理方法
- Linux查看磁盘空间的好方法
- VMware下linux磁盘空间扩展
- linux查看磁盘空间的指令方法
- VMware下ubuntu扩展磁盘空间的方法