导读:A.给虚拟机添加硬盘 B.拓展虚拟机的存储容量
1 <span style=”font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;
mso-font-kerning:0pt”>关闭虚拟机,添加磁盘。
1**、选择“VM”—-“setting”并打开,将光标定位在hard Disk这一选项,然后点击下方的Add按钮**
2**、点击next,执行下一个步骤**
3**、根据提示,创建一个虚拟的磁盘,并点击下一步**
****
4**、按照默认的,选择SCSI格式的磁盘即可,点击next执行下一步**
名称默认。
5**、按照默认的点击下一步即可完成虚拟磁盘的添加**
我添加了三块盘。
2 <span style=”font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;
mso-font-kerning:0pt”>格式化磁盘。
1.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">~]#</span><span class="pln"> **fdisk **</span><span class="pun">**-**</span><span class="pln">**l** //查看</span>
2.3.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda</span><span class="pun">:</span><span class="pln"> </span><span class="lit">19.3</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">19327352832</span><span class="pln"> bytes</span>
4.5.<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2349</span><span class="pln"> cylinders</span>
6.7.<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
8.9.<span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="typ">Boot</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> </span><span class="typ">End</span><span class="pln"> </span><span class="typ">Blocks</span><span class="pln"> </span><span class="typ">Id</span><span class="pln"> </span><span class="typ">System</span>
10.11.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda1 </span><span class="pun">*</span><span class="pln"> </span><span class="lit">1</span><span class="pln"> </span><span class="lit">13</span><span class="pln"> </span><span class="lit">104391</span><span class="pln"> </span><span class="lit">83</span><span class="pln"> </span><span class="typ">Linux</span>
12.13.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda2 </span><span class="lit">14</span><span class="pln"> </span><span class="lit">2349</span><span class="pln"> </span><span class="lit">18763920</span><span class="pln"> </span><span class="lit">8e</span><span class="pln"> </span><span class="typ">Linux</span><span class="pln"> LVM</span>
14.15.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21.4</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">21474836480</span><span class="pln"> bytes</span>
16.17.<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> cylinders</span>
18.19.<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
20.21.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb doesn</span><span class="str">'t contain a valid partition table</span>
22.23.<span class="str">Disk /dev/sdc: 21.4 GB, 21474836480 bytes</span>
24.25.<span class="str">255 heads, 63 sectors/track, 2610 cylinders</span>
26.27.<span class="str">Units = cylinders of 16065 * 512 = 8225280 bytes</span>
28.29.<span class="str">Disk /dev/sdc doesn'</span><span class="pln">t contain a valid partition table</span>
30.31.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdd</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21.4</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">21474836480</span><span class="pln"> bytes</span>
32.33.<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> cylinders</span>
34.35.<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
36.37.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdd doesn</span><span class="str">'t contain a valid partition table</span>
开始格式化
1.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">~]#</span><span class="pln"> fdisk </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb</span>
2.3.<span class="typ">Device</span><span class="pln"> contains neither a valid DOS partition table</span><span class="pun">,</span><span class="pln"> nor </span><span class="typ">Sun</span><span class="pun">,</span><span class="pln"> SGI or OSF disklabel</span>
4.5.<span class="typ">Building</span><span class="pln"> a new DOS disklabel</span><span class="pun">.</span><span class="pln"> </span><span class="typ">Changes</span><span class="pln"> will remain </span><span class="kwd">in</span><span class="pln"> memory only</span><span class="pun">,</span>
6.7.<span class="kwd">until</span><span class="pln"> you decide to write them</span><span class="pun">.</span><span class="pln"> </span><span class="typ">After</span><span class="pln"> that</span><span class="pun">,</span><span class="pln"> of course</span><span class="pun">,</span><span class="pln"> the previous</span>
8.9.<span class="pln">content won</span><span class="str">'t be recoverable.</span>
10.11.<span class="str">The number of cylinders for this disk is set to 2610.</span>
12.13.<span class="str">There is nothing wrong with that, but this is larger than 1024,</span>
14.15.<span class="str">and could in certain setups cause problems with:</span>
16.17.<span class="str">1) software that runs at boot time (e.g., old versions of LILO)</span>
18.19.<span class="str">2) booting and partitioning software from other OSs</span>
20.21.<span class="str"> (e.g., DOS FDISK, OS/2 FDISK)</span>
22.23.<span class="str">Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)</span>
24.25.26.<span class="str">Command (m for help):</span>
27.28.<span class="str">Command (m for help): m</span>
29.30.<span class="str">Command action</span>
31.32.<span class="str"> a toggle a bootable flag</span>
33.34.<span class="str"> b edit bsd disklabel</span>
35.36.<span class="str"> c toggle the dos compatibility flag</span>
37.38.<span class="str"> d delete a partition</span>
39.40.<span class="str"> l list known partition types</span>
41.42.<span class="str"> m print this menu</span>
43.44.<span class="str"> n add a new partition</span>
45.46.<span class="str"> o create a new empty DOS partition table</span>
47.48.<span class="str"> p print the partition table</span>
49.50.<span class="str"> q quit without saving changes</span>
51.52.<span class="str"> s create a new empty Sun disklabel</span>
53.54.<span class="str"> t change a partition'</span><span class="pln">s system id</span>
55.56.<span class="pln"> u change display</span><span class="pun">/</span><span class="pln">entry units</span>
57.58.<span class="pln"> v verify the partition table</span>
59.60.<span class="pln"> w write table to disk and exit</span>
61.62.<span class="pln"> x extra functionality </span><span class="pun">(</span><span class="pln">experts only</span><span class="pun">)</span>
63.64.<span class="typ">Command</span><span class="pln"> </span><span class="pun">(</span><span class="pln">m </span><span class="kwd">for</span><span class="pln"> help</span><span class="pun">):</span><span class="pln"> **n**</span>
65.66.<span class="typ">Command</span><span class="pln"> action</span>
67.68.<span class="pln"> e extended</span>
69.70.<span class="pln"> p primary partition </span><span class="pun">(</span><span class="lit">1</span><span class="pun">-</span><span class="lit">4</span><span class="pun">)** **</span>
p
71.72.73.<span class="typ">Partition</span><span class="pln"> number </span><span class="pun">(</span><span class="lit">1</span><span class="pun">-</span><span class="lit">4</span><span class="pun">):</span><span class="pln"> </span><span class="lit">**1**</span>
74.75.<span class="typ">First</span><span class="pln"> cylinder </span><span class="pun">(</span><span class="lit">1</span><span class="pun">-</span><span class="lit">2610</span><span class="pun">,</span><span class="pln"> default </span><span class="lit">1</span><span class="pun">):</span>
76.77.<span class="typ">Using</span><span class="pln"> default value </span><span class="lit">1</span>
78.79.<span class="typ">Last</span><span class="pln"> cylinder or </span><span class="pun">+</span><span class="pln">size or </span><span class="pun">+</span><span class="pln">sizeM or </span><span class="pun">+</span><span class="pln">sizeK </span><span class="pun">(</span><span class="lit">1</span><span class="pun">-</span><span class="lit">2610</span><span class="pun">,</span><span class="pln"> default </span><span class="lit">2610</span><span class="pun">):</span>
80.81.<span class="typ">Using</span><span class="pln"> default value </span><span class="lit">2610</span>
82.83.<span class="typ">Command</span><span class="pln"> </span><span class="pun">(</span><span class="pln">m </span><span class="kwd">for</span><span class="pln"> help</span><span class="pun">):</span><span class="pln">** w**</span>
84.85.<span class="typ">The</span><span class="pln"> partition table has been altered</span><span class="pun">!</span>
86.87.<span class="typ">Calling</span><span class="pln"> ioctl</span><span class="pun">()</span><span class="pln"> to re</span><span class="pun">-</span><span class="pln">read partition table</span><span class="pun">.</span>
88.89.<span class="typ">Syncing</span><span class="pln"> disks</span><span class="pun">.</span>
<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">~]#</span><span class="pln"> fdisk </span><span class="pun">-</span><span class="pln">l //再次查看</span>
<span class="pln"> </span>
<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda</span><span class="pun">:</span><span class="pln"> </span><span class="lit">19.3</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">19327352832</span><span class="pln"> bytes</span>
<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2349</span><span class="pln"> cylinders</span>
<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
<span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="typ">Boot</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> </span><span class="typ">End</span><span class="pln"> </span><span class="typ">Blocks</span><span class="pln"> </span><span class="typ">Id</span><span class="pln"> </span><span class="typ">System</span>
<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda1 </span><span class="pun">*</span><span class="pln"> </span><span class="lit">1</span><span class="pln"> </span><span class="lit">13</span><span class="pln"> </span><span class="lit">104391</span><span class="pln"> </span><span class="lit">83</span><span class="pln"> </span><span class="typ">Linux</span>
<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda2 </span><span class="lit">14</span><span class="pln"> </span><span class="lit">2349</span><span class="pln"> </span><span class="lit">18763920</span><span class="pln"> </span><span class="lit">8e</span><span class="pln"> </span><span class="typ">Linux</span><span class="pln"> LVM</span>
<span class="pln"> </span>
<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21.4</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">21474836480</span><span class="pln"> bytes</span>
<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> cylinders</span>
<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
<span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="typ">Boot</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> </span><span class="typ">End</span><span class="pln"> </span><span class="typ">Blocks</span><span class="pln"> </span><span class="typ">Id</span><span class="pln"> </span><span class="typ">System</span>
<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb1 </span><span class="lit">1</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> </span><span class="lit">20964793</span><span class="pun">+</span><span class="pln"> </span><span class="lit">83</span><span class="pln"> </span><span class="typ">Linux</span>
<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdc</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21.4</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">21474836480</span><span class="pln"> bytes</span>
<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> cylinders</span>
<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdc doesn</span><span class="str">'t contain a valid partition table</span>
<span class="str">Disk /dev/sdd: 21.4 GB, 21474836480 bytes</span>
<span class="str">255 heads, 63 sectors/track, 2610 cylinders</span>
<span class="str">Units = cylinders of 16065 * 512 = 8225280 bytes</span>
<span class="str">Disk /dev/sdd doesn'</span><span class="pln">t contain a valid partition table</span>
3 <span style=”font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;
mso-font-kerning:0pt”>挂载磁盘。
1.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">~]#</span><span class="pln"> mkfs </span><span class="pun">-</span><span class="pln">t ext3 </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb1</span>
2.3.<span class="pln">mke2fs </span><span class="lit">1.39</span><span class="pln"> </span><span class="pun">(</span><span class="lit">29</span><span class="pun">-</span><span class="typ">May</span><span class="pun">-</span><span class="lit">2006</span><span class="pun">)</span>
4.5.<span class="typ">Filesystem</span><span class="pln"> label</span><span class="pun">=</span>
6.7.<span class="pln">OS type</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Linux</span>
8.9.<span class="typ">Block</span><span class="pln"> size</span><span class="pun">=</span><span class="lit">4096</span><span class="pln"> </span><span class="pun">(</span><span class="pln">log</span><span class="pun">=</span><span class="lit">2</span><span class="pun">)</span>
10.11.<span class="typ">Fragment</span><span class="pln"> size</span><span class="pun">=</span><span class="lit">4096</span><span class="pln"> </span><span class="pun">(</span><span class="pln">log</span><span class="pun">=</span><span class="lit">2</span><span class="pun">)</span>
12.13.<span class="lit">2621440</span><span class="pln"> inodes</span><span class="pun">,</span><span class="pln"> </span><span class="lit">5241198</span><span class="pln"> blocks</span>
14.15.<span class="lit">262059</span><span class="pln"> blocks </span><span class="pun">(</span><span class="lit">5.00</span><span class="pun">%)</span><span class="pln"> reserved </span><span class="kwd">for</span><span class="pln"> the super user</span>
16.17.<span class="typ">First</span><span class="pln"> data block</span><span class="pun">=</span><span class="lit">0</span>
18.19.<span class="typ">Maximum</span><span class="pln"> filesystem blocks</span><span class="pun">=</span><span class="lit">0</span>
20.21.<span class="lit">160</span><span class="pln"> block groups</span>
22.23.<span class="lit">32768</span><span class="pln"> blocks per group</span><span class="pun">,</span><span class="pln"> </span><span class="lit">32768</span><span class="pln"> fragments per group</span>
24.25.<span class="lit">16384</span><span class="pln"> inodes per group</span>
26.27.<span class="typ">Superblock</span><span class="pln"> backups stored on blocks</span><span class="pun">:</span>
28.29.<span class="pln"> </span><span class="lit">32768</span><span class="pun">,</span><span class="pln"> </span><span class="lit">98304</span><span class="pun">,</span><span class="pln"> </span><span class="lit">163840</span><span class="pun">,</span><span class="pln"> </span><span class="lit">229376</span><span class="pun">,</span><span class="pln"> </span><span class="lit">294912</span><span class="pun">,</span><span class="pln"> </span><span class="lit">819200</span><span class="pun">,</span><span class="pln"> </span><span class="lit">884736</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1605632</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2654208</span><span class="pun">,</span>
30.31.<span class="pln"> </span><span class="lit">4096000</span>
32.33.<span class="pln"> </span>
34.35.<span class="typ">Writing</span><span class="pln"> inode tables</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">done</span><span class="pln"> </span>
36.37.<span class="typ">Creating</span><span class="pln"> journal </span><span class="pun">(</span><span class="lit">32768</span><span class="pln"> blocks</span><span class="pun">):</span><span class="pln"> </span><span class="kwd">done</span>
38.39.<span class="typ">Writing</span><span class="pln"> superblocks and filesystem accounting information</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">done</span>
40.41.<span class="typ">This</span><span class="pln"> filesystem will be automatically checked every </span><span class="lit">35</span><span class="pln"> mounts or</span>
42.43.<span class="lit">180</span><span class="pln"> days</span><span class="pun">,</span><span class="pln"> whichever comes first</span><span class="pun">.</span><span class="pln"> </span><span class="typ">Use</span><span class="pln"> tune2fs </span><span class="pun">-</span><span class="pln">c or </span><span class="pun">-</span><span class="pln">i to override</span><span class="pun">.</span>
修改配置文件,启动自动挂载
1.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">/]#</span><span class="pln"> vi </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">fsta</span>
2.3.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="typ">VolGroup00</span><span class="pun">/</span><span class="typ">LogVol00</span><span class="pln"> </span><span class="pun">/</span><span class="pln"> ext3 defaults </span><span class="lit">1</span><span class="pln"> </span><span class="lit">1</span>
4.5.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb1 </span><span class="pun">/</span><span class="pln">disk2 ext3 defaults </span><span class="lit">1</span><span class="pln"> </span><span class="lit">1</span>
6.7.<span class="pln">LABEL</span><span class="pun">=/</span><span class="pln">boot </span><span class="pun">/</span><span class="pln">boot ext3 defaults </span><span class="lit">1</span><span class="pln"> </span><span class="lit">2</span>
8.9.<span class="pln">tmpfs </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">shm tmpfs defaults </span><span class="lit">0</span><span class="pln"> </span><span class="lit">0</span>
10.11.<span class="pln">devpts </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">pts devpts gid</span><span class="pun">=</span><span class="lit">5</span><span class="pun">,</span><span class="pln">mode</span><span class="pun">=</span><span class="lit">620</span><span class="pln"> </span><span class="lit">0</span><span class="pln"> </span><span class="lit">0</span>
12.13.<span class="pln">sysfs </span><span class="pun">/</span><span class="pln">sys sysfs defaults </span><span class="lit">0</span><span class="pln"> </span><span class="lit">0</span>
14.15.<span class="pln">proc </span><span class="pun">/</span><span class="pln">proc proc defaults </span><span class="lit">0</span><span class="pln"> </span><span class="lit">0</span>
16.17.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="typ">VolGroup00</span><span class="pun">/</span><span class="typ">LogVol01</span><span class="pln"> swap swap defaults </span><span class="lit">0</span><span class="pln"> </span><span class="lit">0</span>
18.19.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">/]#</span><span class="pln"> cd </span><span class="pun">/</span>
20.21.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">/]#</span><span class="pln"> mkdir </span><span class="pun">/</span><span class="pln">disk2</span>
22.23.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">/]#</span><span class="pln"> mount /dev/sdb1 </span><span class="pun">/</span><span class="pln">disk2 //将 </span>
/dev/sdb1挂载在disk2下
24.25.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">/]#</span><span class="pln"> df </span><span class="pun">-</span><span class="pln">h //查看磁盘占用情况</span>
26.27.<span class="typ">Filesystem</span><span class="pln"> </span><span class="typ">Size</span><span class="pln"> </span><span class="typ">Used</span><span class="pln"> </span><span class="typ">Avail</span><span class="pln"> </span><span class="typ">Use</span><span class="pun">%</span><span class="pln"> </span><span class="typ">Mounted</span><span class="pln"> on</span>
28.29.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">mapper</span><span class="pun">/</span><span class="typ">VolGroup00</span><span class="pun">-</span><span class="typ">LogVol00</span>
30.31.<span class="pln"> </span><span class="lit">17G</span><span class="pln"> </span><span class="lit">11G</span><span class="pln"> </span><span class="lit">5.5G</span><span class="pln"> </span><span class="lit">66</span><span class="pun">%</span><span class="pln"> </span><span class="pun">/</span>
32.33.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda1 </span><span class="lit">99M</span><span class="pln"> </span><span class="lit">12M</span><span class="pln"> </span><span class="lit">82M</span><span class="pln"> </span><span class="lit">13</span><span class="pun">%</span><span class="pln"> </span><span class="pun">/</span><span class="pln">boot</span>
34.35.<span class="pln">tmpfs </span><span class="lit">506M</span><span class="pln"> </span><span class="lit">0</span><span class="pln"> </span><span class="lit">506M</span><span class="pln"> </span><span class="lit">0</span><span class="pun">%</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">shm</span>
36.37.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb1 </span><span class="lit">20G</span><span class="pln"> </span><span class="lit">173M</span><span class="pln"> </span><span class="lit">19G</span><span class="pln"> </span><span class="lit">1</span><span class="pun">%</span><span class="pln"> </span><span class="pun">/</span><span class="pln">disk2</span>
<span style=”font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:
Calibri”>如何扩虚拟机大小:
先power off
1.<span class="pun">[</span><span class="pln">root@gc1 </span><span class="pun">~]#</span><span class="pln"> fdisk </span><span class="pun">-</span><span class="pln">l</span>
2.3.4.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda</span><span class="pun">:</span><span class="pln"> </span><span class="lit">32.2</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">32212254720</span><span class="pln"> bytes</span>
5.6.<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">3916</span><span class="pln"> cylinders</span>
7.8.<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
9.10.11.<span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="typ">Boot</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> </span><span class="typ">End</span><span class="pln"> </span><span class="typ">Blocks</span><span class="pln"> </span><span class="typ">Id</span><span class="pln"> </span><span class="typ">System</span>
12.13.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda1 </span><span class="pun">*</span><span class="pln"> </span><span class="lit">1</span><span class="pln"> </span><span class="lit">13</span><span class="pln"> </span><span class="lit">104391</span><span class="pln"> </span><span class="lit">83</span><span class="pln"> </span><span class="typ">Linux</span>
14.15.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda2 </span><span class="lit">14</span><span class="pln"> </span><span class="lit">2349</span><span class="pln"> </span><span class="lit">18763920</span><span class="pln"> </span><span class="lit">8e</span><span class="pln"> </span><span class="typ">Linux</span><span class="pln"> LVM</span>
16.17.<span class="pln"> </span>
18.19.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21.4</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">21474836480</span><span class="pln"> bytes</span>
20.21.<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> cylinders</span>
22.23.<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
24.25.<span class="pln"> </span>
26.27.<span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="typ">Boot</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> </span><span class="typ">End</span><span class="pln"> </span><span class="typ">Blocks</span><span class="pln"> </span><span class="typ">Id</span><span class="pln"> </span><span class="typ">System</span>
28.29.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb1 </span><span class="lit">1</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> </span><span class="lit">20964793</span><span class="pun">+</span><span class="pln"> </span><span class="lit">83</span><span class="pln"> </span><span class="typ">Linux</span>
30.31.<span class="pln"> </span>
32.33.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdc</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21.4</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">21474836480</span><span class="pln"> bytes</span>
34.35.<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> cylinders</span>
36.37.<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
38.39.<span class="pln"> </span>
40.41.<span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="typ">Boot</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> </span><span class="typ">End</span><span class="pln"> </span><span class="typ">Blocks</span><span class="pln"> </span><span class="typ">Id</span><span class="pln"> </span><span class="typ">System</span>
42.43.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdc1 </span><span class="lit">1</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> </span><span class="lit">20964793</span><span class="pun">+</span><span class="pln"> </span><span class="lit">83</span><span class="pln"> </span><span class="typ">Linux</span>
44.45.<span class="pln"> </span>
46.47.<span class="typ">Disk</span><span class="pln"> </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdd</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21.4</span><span class="pln"> GB</span><span class="pun">,</span><span class="pln"> </span><span class="lit">21474836480</span><span class="pln"> bytes</span>
48.49.<span class="lit">255</span><span class="pln"> heads</span><span class="pun">,</span><span class="pln"> </span><span class="lit">63</span><span class="pln"> sectors</span><span class="pun">/</span><span class="pln">track</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> cylinders</span>
50.51.<span class="typ">Units</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> cylinders of </span><span class="lit">16065</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> </span><span class="lit">512</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8225280</span><span class="pln"> bytes</span>
52.53.<span class="pln"> </span>
54.55.<span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="typ">Boot</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> </span><span class="typ">End</span><span class="pln"> </span><span class="typ">Blocks</span><span class="pln"> </span><span class="typ">Id</span><span class="pln"> </span><span class="typ">System</span>
56.57.<span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdd1 </span><span class="lit">1</span><span class="pln"> </span><span class="lit">2610</span><span class="pln"> </span><span class="lit">20964793</span><span class="pun">+</span><span class="pln"> </span><span class="lit">83</span><span class="pln"> </span><span class="typ">Linux</span>