1、Vm虚拟机下Linux扩展原有磁盘空间,详细步骤以下:linux
需注意如下几点: linux只能扩展磁盘容量而不能减少, 所填写的容量为总容量,即包含已分区的磁盘, 扩展容量时不能有快照哟,你们能够先把快照删除掉。
字体
2.启动Linux,查看系统分区,并建立分区sda3,命令以下:红色字体命令,#后为注释:
ui
[root@localhost~]#fdisk -l
Disk /dev/sda:32.2GB,32212254720 bytesthis
255heads,63sectors/track,3916cylinders
Units=cylindersof16065*512=8225280 bytesspa
DeviceBoot Start End Blocks Id System虚拟机
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1566 12474472+ 8e Linux LVMit
#个人电脑有2个分区-sda1 sda2io
[root@localhost~]#fdisk /dev/sdatable
Thenumberofcylindersforthisdiskissetto3916.function
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)