久久99精品久久久久久琪琪,久久人人爽人人爽人人片亞洲,熟妇人妻无码中文字幕,亚洲精品无码久久久久久久

在VMware里面擴(kuò)展Linux根目錄文件系統(tǒng)的空間

時(shí)間:2019-05-12 00:05:30下載本文作者:會(huì)員上傳
簡(jiǎn)介:寫(xiě)寫(xiě)幫文庫(kù)小編為你整理了多篇相關(guān)的《在VMware里面擴(kuò)展Linux根目錄文件系統(tǒng)的空間》,但愿對(duì)你工作學(xué)習(xí)有幫助,當(dāng)然你在寫(xiě)寫(xiě)幫文庫(kù)還可以找到更多《在VMware里面擴(kuò)展Linux根目錄文件系統(tǒng)的空間》。

第一篇:在VMware里面擴(kuò)展Linux根目錄文件系統(tǒng)的空間

在VMware里面擴(kuò)展Linux根目錄文件系統(tǒng)的空間

我們?cè)谑褂锰摂M機(jī)的過(guò)程中進(jìn)程會(huì)遇到磁盤空間不足的情況,下面就介紹一下怎么給虛擬機(jī)的根目錄擴(kuò)展空間。擴(kuò)展前的磁盤空間情況:

[root@rac2 ~]# df-h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 16G 11G 4.2G 72% /

/dev/sda1 99M 16M 78M 17% /boot tmpfs 1005M 0 1005M 0% /dev/shm

1、關(guān)閉虛擬機(jī)在cmd窗口下使用vmware-vdiskmanager.exe命令擴(kuò)展文件大小,這一步也可以在虛擬機(jī)的界面上增加

“C:Program Files(x86)VMwareVMware Workstationvmware-vdiskmanager.exe”-x 40GB “Y:VMRAC 11GRAC1102RAC1101.vmdk” 把磁盤空間擴(kuò)展到40G,包含原來(lái)的20G,即增加20G

2、啟動(dòng)虛擬機(jī),使用Linux的fdisk分區(qū)工具給磁盤分區(qū)

[root@rac2 ~]# fdisk-l

Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2610 20860402+ 8e Linux LVM

根據(jù)提示信息可以判斷出此系統(tǒng)的磁盤接口為SCSI,對(duì)應(yīng)“sda”,如果上面的紅色字體是“hda”,那么此系統(tǒng)的磁盤接口為IDE對(duì)應(yīng)“hda”。下面開(kāi)始分區(qū)

[root@rac2 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1)software that runs at boot time(e.g., old versions of LILO)2)booting and partitioning software from other OSs(e.g., DOS FDISK, OS/2 FDISK)Command(m for help): m //查看幫助 Command action a toggle a bootable flag b edit bsd disklabel 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 a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality(experts only)

Command(m for help): n // n 是增加分區(qū) Command action e extended p primary partition(1-4)p

//“ 選擇創(chuàng)建主分區(qū)”此時(shí) Partition number(1-4): //已經(jīng)就

1,2兩個(gè)分區(qū)了,這里分為第三個(gè)區(qū)

First cylinder(2611-5221, default 2611): //此時(shí),fdisk又會(huì)讓你選擇該分區(qū)的開(kāi)始值這個(gè)就是分區(qū)的Start 值(start cylinder);這里最好直接按回車

Using default value 2611 Last cylinder or +size or +sizeM or +sizeK(2611-5221, default 5221): //此時(shí),fdisk又會(huì)讓你選擇該分區(qū)的開(kāi)始值這個(gè)就是分區(qū)的End 值這里最好直接按回車

Using default value 5221

Command(m for help): w //w “保存所有并退出,分區(qū)劃分完畢” The partition table has been altered!

Calling ioctl()to re-read partition table.WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel still uses the old table.The new table will be used at the next reboot.Syncing disks.[root@rac2 ~]# fdisk-l

Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2610 20860402+ 8e Linux LVM /dev/sda3 2611 5221 20972857+ 83 Linux

3、使用fdisk將其改成LVM的 [root@rac2 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1)software that runs at boot time(e.g., old versions of LILO)2)booting and partitioning software from other OSs(e.g., DOS FDISK, OS/2 FDISK)

Command(m for help): m Command action a toggle a bootable flag b edit bsd disklabel 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 a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality(experts only)

Command(m for help): t //改變分區(qū)系統(tǒng)id

Partition number(1-4): 3 //指定分區(qū)號(hào),選擇分區(qū)3

Hex code(type L to list codes): 8e //指定要改成的id號(hào),8e代表LVM Changed system type of partition 3 to 8e(Linux LVM)

Command(m for help): w

//w “保存所有并退出,分區(qū)劃分完畢” The partition table has been altered!

Calling ioctl()to re-read partition table.WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel still uses the old table.The new table will be used at the next reboot.Syncing disks.4、重啟系統(tǒng),格式化該新添加的分區(qū)

[root@rac2 ~]# fdisk-l

Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2610 20860402+ 8e Linux LVM /dev/sda3 2611 5221 20972857+ 8e Linux LVM

已經(jīng)增加了一個(gè)分區(qū),格式也改為L(zhǎng)VM

#mkfs-t ext3 /dev/sda3 //在硬盤分區(qū)“/dev/sda3”上創(chuàng)建“ext3”文件系統(tǒng)。

[root@rac2 ~]# mkfs-t ext3 /dev/sda3 mke2fs 1.39(29-May-2006)warning: 334 blocks unused.Filesystem label= OS type: Linux Block size=4096(log=2)Fragment size=4096(log=2)2626560 inodes, 5242880 blocks 262160 blocks(5.00%)reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 160 block groups 32768 blocks per group, 32768 fragments per group 16416 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000

Writing inode tables: done Creating journal(32768 blocks): done Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first.Use tune2fs-c or-i to override.5、擴(kuò)展文件系統(tǒng) 創(chuàng)建PV [root@rac2 ~]# pvcreate /dev/sda3 Physical volume “/dev/sda3” successfully created //pvcreate指令用于將物理硬盤分區(qū)初始化為物理卷,以便被LVM使用。要?jiǎng)?chuàng)建物理卷必須首先對(duì)硬盤進(jìn)行分區(qū),并且將硬盤分區(qū)的類型設(shè)置為“8e”后,才能使用pvcreat指令將分區(qū)初始化為物理卷。

擴(kuò)展VG

[root@rac2 ~]# vgextend VolGroup00 /dev/sda3 /dev/hdc: open failed: Read-only file system /dev/cdrom: open failed: Read-only file system Attempt to close device '/dev/cdrom' which is not open.Volume group “VolGroup00” successfully extended(其中是當(dāng)前需要擴(kuò)充的lvm組名,可以通過(guò)df-h查看,例如我的是: /dev/mapper/VolGroup00-LogVol00)//vgextend指令用于動(dòng)態(tài)的擴(kuò)展卷組,它通過(guò)向卷組中添加物理卷來(lái)增加卷組的容量。

#vgdisplay //用于顯示LNM卷組的元數(shù)據(jù)信息。

[root@rac2 ~]# vgdisplay---Volume group---VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 2 Act PV 2 VG Size 39.88 GB PE Size 32.00 MB Total PE 1276 Alloc PE / Size 636 / 19.88 GB Free PE / Size 640 / 20.00 GB

VG UUID GEwLeI-DRdi-NKXI-cB89-JQ81-2eMf-C2quKf(主要查看Free PE / Size 640 / 20.00 GB,說(shuō)明我們最多可以有20GB的擴(kuò)充空間。)

擴(kuò)展LV,這里的擴(kuò)展空間要小于VG的Free PE [root@rac2 ~]# lvextend-L+19.8G /dev/VolGroup00/LogVol00 /dev/sda3 /dev/hdc: open failed: Read-only file system Rounding up size to full physical extent 19.81 GB Extending logical volume LogVol00 to 35.78 GB Logical volume LogVol00 successfully resized 再查看VG的信息

[root@rac2 ~]# vgdisplay---Volume group---VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 5 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 2 Act PV 2 VG Size 39.88 GB PE Size 32.00 MB Total PE 1276 Alloc PE / Size 1270 / 39.69 GB Free PE / Size 6 / 192.00 MB VG UUID GEwLeI-DRdi-NKXI-cB89-JQ81-2eMf-C2quKf

[root@rac2 ~]# resize2fs /dev/VolGroup00/LogVol00 resize2fs 1.39(29-May-2006)Filesystem at /dev/VolGroup00/LogVol00 is mounted on /;on-line resizing required Performing an on-line resize of /dev/VolGroup00/LogVol00 to 9404416(4k)blocks.The filesystem on /dev/VolGroup00/LogVol00 is now 9404416 blocks long.//resize2fs指令被用來(lái)增大或者收縮未加載的“ext2/ext3”文件系統(tǒng)的大小。

[root@rac2 ~]# df-h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 35G 14G 20G 41% / /dev/sda1 99M 16M 78M 17% /boot tmpfs 1005M 200M 806M 20% /dev/shm 這是查看文件系統(tǒng)空間已經(jīng)擴(kuò)展成功,如果resize2fs 之后文件系統(tǒng)空間沒(méi)增加可以嘗試重啟虛擬機(jī)。

下載在VMware里面擴(kuò)展Linux根目錄文件系統(tǒng)的空間word格式文檔
下載在VMware里面擴(kuò)展Linux根目錄文件系統(tǒng)的空間.doc
將本文檔下載到自己電腦,方便修改和收藏,請(qǐng)勿使用迅雷等下載。
點(diǎn)此處下載文檔

文檔為doc格式


聲明:本文內(nèi)容由互聯(lián)網(wǎng)用戶自發(fā)貢獻(xiàn)自行上傳,本網(wǎng)站不擁有所有權(quán),未作人工編輯處理,也不承擔(dān)相關(guān)法律責(zé)任。如果您發(fā)現(xiàn)有涉嫌版權(quán)的內(nèi)容,歡迎發(fā)送郵件至:645879355@qq.com 進(jìn)行舉報(bào),并提供相關(guān)證據(jù),工作人員會(huì)在5個(gè)工作日內(nèi)聯(lián)系你,一經(jīng)查實(shí),本站將立刻刪除涉嫌侵權(quán)內(nèi)容。

相關(guān)范文推薦

    主站蜘蛛池模板: 久久精品久久精品久久39| 精品无码三级在线观看视频| 婷婷亚洲久悠悠色悠在线播放| 久久99精品久久久久婷婷暖| 好男人在线社区www在线影院| 三个老头同嫖一个老妇| 在线播放真实国产乱子伦| 日本黄网站免费| 久久久无码精品亚洲日韩蜜桃| 久久久国产成人一区二区| 欧美人禽zozo动人物杂交| 无套内谢老熟女| 热久久99这里有精品综合久久| 国产精品99久久久久久宅男小说| 99精品一区二区三区无码吞精| 欧美精品高清在线观看| av无码免费岛国动作片片段欣赏网| av老司机亚洲精品天堂| 成人免费午夜无码视频在线播放| 精品久久综合1区2区3区激情| 人人狠狠综合久久亚洲婷婷| 日本在线一区二区三区欧美| 东北少妇不戴套对白第一次| 极品人妻少妇一区二区三区| 狠狠色噜噜狠狠狠7777奇米| 日韩精品无码一区二区三区视频| 69堂人成无码免费视频果冻传媒| 日日躁夜夜躁狠狠久久av| 精品日本一区二区三区在线观看| 使劲快高潮了国语对白在线| 日本肥老妇色xxxxx日本老妇| 久久亚洲欧美国产精品| 亚洲一区二区三区自拍公司| 亚洲国产日韩在线人成蜜芽| 色欲色香天天天综合无码www| 日本熟妇色xxxxx欧美老妇| 中国精品18videosex性中国| 国产色诱视频在线播放网站| 亚洲伊人色欲综合网| 亚洲精品久久久久久久久久吃药| 孩交精品xxxx视频视频|