在VMWARE linux虚拟机中扩展动态磁盘容量测试结果.docx
- 文档编号:9447123
- 上传时间:2023-02-04
- 格式:DOCX
- 页数:16
- 大小:140.74KB
在VMWARE linux虚拟机中扩展动态磁盘容量测试结果.docx
《在VMWARE linux虚拟机中扩展动态磁盘容量测试结果.docx》由会员分享,可在线阅读,更多相关《在VMWARE linux虚拟机中扩展动态磁盘容量测试结果.docx(16页珍藏版)》请在冰豆网上搜索。
在VMWARElinux虚拟机中扩展动态磁盘容量测试结果
在VMWARElinux虚拟机中扩展动态磁盘容量
1、在做之前,linux虚拟机的配置如下:
[root@jhrzftp~]#df-h
/dev/mapper/VolGroup00-LogVol00103G8.0G90G9%/
/dev/sda199M12M83M13%/boot
tmpfs506M0506M0%/dev/shm
[root@jhrzftp~]#fdisk-l
Disk/dev/sda:
115.9GB,115964116992bytes
255heads,63sectors/track,14098cylinders
Units=cylindersof16065*512=8225280bytes
DeviceBootStartEndBlocksIdSystem
/dev/sda1*11310439183Linux
/dev/sda21414098113137762+8eLinuxLVM
[root@jhrzftp~]#lvdisplay
---Logicalvolume---
LVName/dev/VolGroup00/LogVol00
VGNameVolGroup00
LVUUIDqmBTOe-L3PX-bgPo-R2BI-N5tq-r6ox-rS8Btd
LVWriteAccessread/write
LVStatusavailable
#open1
LVSize105.94GB
CurrentLE3390
Segments1
Allocationinherit
Readaheadsectors0
Blockdevice253:
0
---Logicalvolume---
LVName/dev/VolGroup00/LogVol01
VGNameVolGroup00
LVUUID95IVL9-bxaE-k0T5-HP1V-jkqM-PP5f-1oDy7u
LVWriteAccessread/write
LVStatusavailable
#open1
LVSize1.94GB
CurrentLE62
Segments1
Allocationinherit
Readaheadsectors0
Blockdevice253:
1
[root@jhrzftp~]#mount
/dev/mapper/VolGroup00-LogVol00on/typeext3(rw)
procon/proctypeproc(rw)
sysfson/systypesysfs(rw)
devptson/dev/ptstypedevpts(rw,gid=5,mode=620)
/dev/sda1on/boottypeext3(rw)
tmpfson/dev/shmtypetmpfs(rw)
noneon/proc/sys/fs/binfmt_misctypebinfmt_misc(rw)
sunrpcon/var/lib/nfs/rpc_pipefstyperpc_pipefs(rw)
[root@jhrzftp~]#vim/etc/fstab
/dev/VolGroup00/LogVol00/ext3defaults11
LABEL=/boot/bootext3defaults12
tmpfs/dev/shmtmpfsdefaults00
devpts/dev/ptsdevptsgid=5,mode=62000
sysfs/syssysfsdefaults00
proc/procprocdefaults00
/dev/VolGroup00/LogVol01swapswapdefaults00
2、启动虚拟机,打开虚拟机的settings,按照以下步骤新增加一块40GB的HardDisk(SCSI),最后重启linux虚拟机生效:
3、增加硬盘后,重启机器后,可以看到多了块硬盘/dev/sdb
[root@jhrzftp~]#fdisk-l
Disk/dev/sda:
115.9GB,115964116992bytes
255heads,63sectors/track,14098cylinders
Units=cylindersof16065*512=8225280bytes
DeviceBootStartEndBlocksIdSystem
/dev/sda1*11310439183Linux
/dev/sda21414098113137762+8eLinuxLVM
Disk/dev/sdb:
42.9GB,42949672960bytes
255heads,63sectors/track,5221cylinders
Units=cylindersof16065*512=8225280bytes
Disk/dev/sdbdoesn'tcontainavalidpartitiontable
[root@jhrzftp~]#
4、将/dev/sdb添加到VolGroup00组里,并把LogVol00的容量扩展20GB,过程如下:
[root@jhrzftp~]#fdisk/dev/sdb
DevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabel
BuildinganewDOSdisklabel.Changeswillremaininmemoryonly,
untilyoudecidetowritethem.Afterthat,ofcourse,theprevious
contentwon'tberecoverable.
Thenumberofcylindersforthisdiskissetto5221.
Thereisnothingwrongwiththat,butthisislargerthan1024,
andcouldincertainsetupscauseproblemswith:
1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)
2)bootingandpartitioningsoftwarefromotherOSs
(e.g.,DOSFDISK,OS/2FDISK)
Warning:
invalidflag0x0000ofpartitiontable4willbecorrectedbyw(rite)
Command(mforhelp):
n
Commandaction
eextended
pprimarypartition(1-4)
p
Partitionnumber(1-4):
1
Firstcylinder(1-5221,default1):
Usingdefaultvalue1
Lastcylinderor+sizeor+sizeMor+sizeK(1-5221,default5221):
Usingdefaultvalue5221
Command(mforhelp):
t
Selectedpartition1
Hexcode(typeLtolistcodes):
8e
Changedsystemtypeofpartition1to8e(LinuxLVM)
Command(mforhelp):
w
Thepartitiontablehasbeenaltered!
Callingioctl()tore-readpartitiontable.
Syncingdisks.
[root@jhrzftp~]#
[root@jhrzftp~]#fdisk-l
Disk/dev/sda:
115.9GB,115964116992bytes
255heads,63sectors/track,14098cylinders
Units=cylindersof16065*512=8225280bytes
DeviceBootStartEndBlocksIdSystem
/dev/sda1*11310439183Linux
/dev/sda21414098113137762+8eLinuxLVM
Disk/dev/sdb:
42.9GB,42949672960bytes
255heads,63sectors/track,5221cylinders
Units=cylindersof16065*512=8225280bytes
DeviceBootStartEndBlocksIdSystem
/dev/sdb115221419376518eLinuxLVM
[root@jhrzftp~]#
[root@jhrzftp~]#pvcreate/dev/sdb1
Physicalvolume"/dev/sdb1"successfullycreated
[root@jhrzftp~]#vgextendVolGroup00/dev/sdb1
/dev/hdc:
openfailed:
?
..?
.欢绯荤?
/dev/cdrom:
openfailed:
?
..?
.欢绯荤?
Attempttoclosedevice'/dev/cdrom'whichisnotopen.
Volumegroup"VolGroup00"successfullyextended
[root@jhrzftp~]#
[root@jhrzftp~]#pvscan
PV/dev/sda2VGVolGroup00lvm2[107.88GB/0free]
PV/dev/sdb1VGVolGroup00lvm2[39.97GB/39.97GBfree]
Total:
2[147.84GB]/inuse:
2[147.84GB]/innoVG:
0[0]
[root@jhrzftp~]#
[root@jhrzftp~]#lvextend-L+20G/dev/VolGroup00/LogVol00
/dev/cdrom:
openfailed:
?
..?
.欢绯荤?
ExtendinglogicalvolumeLogVol00to125.94GB
LogicalvolumeLogVol00successfullyresized
[root@jhrzftp~]#
[root@jhrzftp~]#lvdisplay
---Logicalvolume---
LVName/dev/VolGroup00/LogVol00
VGNameVolGroup00
LVUUIDqmBTOe-L3PX-bgPo-R2BI-N5tq-r6ox-rS8Btd
LVWriteAccessread/write
LVStatusavailable
#open1
LVSize125.94GB
CurrentLE4030
Segments2
Allocationinherit
Readaheadsectors0
Blockdevice253:
0
---Logicalvolume---
LVName/dev/VolGroup00/LogVol01
VGNameVolGroup00
LVUUID95IVL9-bxaE-k0T5-HP1V-jkqM-PP5f-1oDy7u
LVWriteAccessread/write
LVStatusavailable
#open1
LVSize1.94GB
CurrentLE62
Segments1
Allocationinherit
Readaheadsectors0
Blockdevice253:
1
[root@jhrzftp~]#
[root@jhrzftp~]#df-h
/dev/mapper/VolGroup00-LogVol00
103G8.0G90G9%/
/dev/sda199M12M83M13%/boot
tmpfs506M0506M0%/dev/shm
[root@jhrzftp~]#
[root@jhrzftp~]#e2fsck-f/dev/VolGroup00/LogVol00
e2fsck1.39(29-May-2006)
/dev/VolGroup00/LogVol00ismounted.
WARNING!
!
!
Runninge2fsckonamountedfilesystemmaycause
SEVEREfilesystemdamage.
Doyoureallywanttocontinue(y/n)?
yes
/dev/VolGroup00/LogVol00:
recoveringjournal
Pass1:
Checkinginodes,blocks,andsizes
Pass2:
Checkingdirectorystructure
Entry'saved_state'in/root/.gconfd(13434891)hasdeleted/unusedinode13435073.
Clear
yes
Pass3:
Checkingdirectoryconnectivity
Pass4:
Checkingreferencecounts
Unattachedzero-lengthinode13435079.Clear
yes
Pass5:
Checkinggroupsummaryinformation
Blockbitmapdifferences:
+13436929+13436931+(13436933--13436937)+(13436939--13436947)
-13436949-(13436954--13436968)
Fix
yes
Inodebitmapdifferences:
-13435073
Fix
yes
/dev/VolGroup00/LogVol00:
*****FILESYSTEMWASMODIFIED*****
/dev/VolGroup00/LogVol00:
*****REBOOTLINUX*****
/dev/VolGroup00/LogVol00:
135625/27787264files(0.5%non-contiguous),2945721/27770880
blocks
[root@jhrzftp~]#
[root@jhrzftp~]#resize2fs/dev/VolGroup00/LogVol00
resize2fs1.39(29-May-2006)
Filesystemat/dev/VolGroup00/LogVol00ismountedon/;on-lineresizingrequired
Performinganon-lineresizeof/dev/VolGroup00/LogVol00to33013760(4k)blocks.
Thefilesystemon/dev/VolGroup00/LogVol00isnow33013760blockslong.
[root@jhrzftp~]#
[root@jhrzftp~]#df-h
/dev/mapper/VolGroup00-LogVol00
122G8.0G108G7%/
/dev/sda199M12M83M13%/boot
tmpfs506M0506M0%/dev/shm
[root@jhrzftp~]#
(至此,可以看到VolGroup00-LogVol00的大小由原来的103G变为122G)
5、整个完成之后,linux虚拟机的配置如下:
[root@jhrzftp~]#df-h
/dev/mapper/VolGroup00-LogVol00
122G8.0G108G7%/
/dev/sda199M12M83M13%/boot
tmpfs506M0506M0%/dev/shm
[root@jhrzftp~]#fdisk-l
Disk/dev/sda:
115.9GB,115964116992bytes
255heads,63sectors/track,14098cylinders
Units=cylindersof16065*512=8225280bytes
DeviceBootStartEndBlocksIdSystem
/dev/sda1*11310439183Linux
/dev/sda21414098113137762+8eLinuxLVM
Disk/dev/sdb:
42.9GB,42949672960bytes
255heads,63sectors/track,5221cylinders
Units=cylindersof16065*512=8225280bytes
DeviceBootStartEndBlocksIdSystem
/dev/sdb115221419376518eLinuxLVM
[root@jhrzftp~]#lvdisplay
---Logicalvolume---
LVName/dev/VolGroup00/LogVol00
VGNameVolGroup00
LVUUIDqmBTOe-L3PX-bgPo-R2BI-N5tq-r6ox-rS8Btd
LVWriteAccessread/write
LVStatusavailable
#open1
LVSize125.94GB
CurrentLE4030
Segments2
Allocationinherit
Readaheadsectors0
Blockdevice253:
0
---Logicalvolume---
LVName/dev/VolGroup00/LogVol01
VGNameVolGroup00
LVUUID95IVL9-bxaE-k0T5-HP1V-jkqM-PP5f-1oDy7u
LVWriteAccessread/write
LVStatusavailable
#open1
LVSize1.94GB
CurrentLE62
Segments1
Allocationinherit
Readaheadsectors0
Blockdevice253:
1
[root@jhrzftp~]#pvscan
PV/dev/sda2VGVolGroup00lvm2[107.88GB/0free]
PV/dev/sdb1VGVolGroup00lvm2[39.97GB/19.97GBfree]
Total:
2[147.84GB]/inuse:
2[147.84GB]/innoVG:
0[0]
[root@jhrzftp~]#
[root@jhrzftp~]#mount
/dev/mapper/VolGroup00-LogVol00on/typeext3(rw)
procon/proctypeproc(rw)
sysfson/systypesysfs(rw)
devptson/dev/ptstypedevpts(rw,gid=5,mode=620)
/dev/sda1on/boottypeext3(rw)
tmpfson/dev/shmtypetmpfs(rw)
noneon/proc/sys/fs/binfmt_misctypebinfmt_misc(rw)
sunrpcon/var/lib/nfs/rpc_pipefstyperpc_pipefs(rw)
[root@jhrzftp~]#vim/etc/fstab
/dev/VolGroup00/LogVol00/ext3defaults11
LABEL=/boot/bootext3defaults12
tmpfs/dev/shmtmpfsdefaults00
devpts/dev/ptsdevptsgid=5,mode=62000
sysfs/syssysfsdefaults00
proc/procprocdefaults00
/dev/VolGroup00/LogVol01swapswapdefaults00
经检查,Linux虚拟机各方面运行正常,读写正常。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 在VMWARE linux虚拟机中扩展动态磁盘容量测试结果 VMWARE linux 虚拟机 扩展 动态 磁盘 容量 测试 结果