关闭你的虚拟机,免备案空间,挂载新磁盘不可以在开机状态做
它会问你,添加虚拟磁盘是要创建一个新文件来保存数据,还是选择一个现有文件保存,我们选择“创建新的虚拟磁盘”
选择“动态分配”磁盘空间,只在需要的时候扩展物理磁盘空间,点击“下一步”
虚拟磁盘映像文件的路径:E:\Vritaulbox\leonarding2.vdi
虚拟磁盘映像文件的大小:20GB
点击“创建”
二 Linux系统进行新磁盘分区
[root@leonarding1~]# fdisk –l 检查现有系统磁盘空间
Disk/dev/sda: 21.4 GB, 21474836480 bytes 这是我们原来的那块旧磁盘
255 heads, 63sectors/track, 2610 cylinders
Units = cylindersof 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksIdSystem 旧磁盘就分了2个分区
/dev/sda1 * 1 13 104391 83Linux
/dev/sda2 14 2610 20860402+8eLinux LVM
Disk/dev/sdb: 21.4 GB, 21474836480 bytes 这是我们新添加的磁盘/dev/sdb,还没有分区
255 heads, 63sectors/track, 2610 cylinders
Units = cylindersof 16065 * 512 = 8225280 bytes
Disk /dev/sdbdoesn’t contain a valid partition table不包含有效分区表信息,我们需要给新磁盘创建分区表
Disk /dev/dm-0:18.2 GB, 18253611008 bytes 下面这些都不用管
255 heads, 63sectors/track, 2219 cylinders
Units = cylindersof 16065 * 512 = 8225280 bytes
Disk /dev/dm-0doesn’t contain a valid partition table
Disk /dev/dm-1:3087 MB, 3087007744 bytes
255 heads, 63sectors/track, 375 cylinders
Units = cylindersof 16065 * 512 = 8225280 bytes
Disk /dev/dm-1doesn’t contain a valid partition table
[root@leonarding1~]# fdisk /dev/sdb sdb磁盘分区,有很多选项,我们选择m帮助信息
Device containsneither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOSdisklabel. Changes will remain in memory only,
until you decideto write them. After that, of course, the previous
content won’t be recoverable.
The number ofcylinders for this disk is set to 2610.
There is nothingwrong with that, but this is larger than 1024,
and could incertain setups cause problems with:
1) software thatruns at boot time (e.g., old versions of LILO)
2) booting andpartitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalidflag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m forhelp): m 选择m即可看到帮助信息
Command action
atoggle a bootable flag
bedit bsd disklabel
ctoggle the dos compatibility flag
ddelete a partition
llist known partition types
mprint this menu
n add a new partition 创建一个新分区
ocreate a new empty DOS partition table
pprint the partition table
qquit without saving changes
screate a new empty Sun disklabel
tchange a partition’s system id
uchange display/entry units
vverify the partition table
wwrite table to disk and exit
xextra functionality (experts only)
Command (m forhelp): n 创建一个新分区
Command action
eextended
pprimary partition (1-4)
可以一个人,可以几个人,一起放松那劳累的心情或者劳累自己的身体,