VM虚拟机中Linux扩展磁盘空间的方法
一、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)
總結
以上是生活随笔為你收集整理的VM虚拟机中Linux扩展磁盘空间的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: hdu 2833(Floyd + dp)
- 下一篇: hdu 1599(Floyd求最小环)