VM虚拟机中Linux扩展磁盘空间的方法
2017-02-14 17:36
465 查看
一、Vm虚拟机下Linux扩展原有磁盘空间,详细步骤如下:
需注意以下几点: linux只能扩展磁盘容量而不能减小, 所填写的容量为总容量,即包含已分区的磁盘, 扩展容量时不能有快照哟,大家可以先把快照删除掉。
2.启动Linux,查看系统分区,并创建分区sda3,命令如下:红色字体命令,#后为注释:
[root@localhost~]#fdisk -l
Disk /dev/sda:32.2GB,32212254720 bytes
255heads,63sectors/track,3916cylinders
Units=cylindersof16065*512=8225280 bytes
DeviceBoot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1566 12474472+ 8e Linux LVM
#我的电脑有2个分区-sda1 sda2
[root@localhost~]#fdisk /dev/sda
Thenumberofcylindersforthisdiskissetto3916.
Thereisnothingwrongwiththat,butthisislargerthan1024,
andcouldincertainsetupscauseproblemswith:
1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)
2)bootingandpartitioningsoftwarefromotherOSs
(e.g.,DOSFDISK,OS/2FDISK)
Command(mforhelp):m
Commandaction
a toggle a bootable flag
b edit bsd disk label
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 apartition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (expertsonly)
输入【reboot】 重启linux,必须reboot,否则/dev/sda4无法格式化。
这时在/dev/目录下,才能看到了新的分区比如/dev/sda4
【mkfs.ext2 /dev/sda4】格式化
需注意以下几点: linux只能扩展磁盘容量而不能减小, 所填写的容量为总容量,即包含已分区的磁盘, 扩展容量时不能有快照哟,大家可以先把快照删除掉。
2.启动Linux,查看系统分区,并创建分区sda3,命令如下:红色字体命令,#后为注释:
[root@localhost~]#fdisk -l
Disk /dev/sda:32.2GB,32212254720 bytes
255heads,63sectors/track,3916cylinders
Units=cylindersof16065*512=8225280 bytes
DeviceBoot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1566 12474472+ 8e Linux LVM
#我的电脑有2个分区-sda1 sda2
[root@localhost~]#fdisk /dev/sda
Thenumberofcylindersforthisdiskissetto3916.
Thereisnothingwrongwiththat,butthisislargerthan1024,
andcouldincertainsetupscauseproblemswith:
1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)
2)bootingandpartitioningsoftwarefromotherOSs
(e.g.,DOSFDISK,OS/2FDISK)
Command(mforhelp):m
Commandaction
a toggle a bootable flag
b edit bsd disk label
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 apartition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (expertsonly)
输入【reboot】 重启linux,必须reboot,否则/dev/sda4无法格式化。
这时在/dev/目录下,才能看到了新的分区比如/dev/sda4
【mkfs.ext2 /dev/sda4】格式化
相关文章推荐
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- VM虚拟机中Linux扩展磁盘空间的方法
- vm虚拟机linux磁盘空间不足,手动扩大
- 释放Linux磁盘空间方法
- Linux中查看磁盘剩余空间的方法
- linux系统限制磁盘空间的两种方法
- [翻译]清理Linux磁盘空间的4种方法
- Linux查看磁盘剩余空间方法
- VMware 虚拟机(linux)增加根目录磁盘空间的方法
- Linux系统上给文件按占用磁盘空间大小排序的方法
- Linux查看磁盘空间的好方法
- linux 服务器如何扩展磁盘空间
- LINUX下添加磁盘空间的方法详解