這期內(nèi)容當(dāng)中小編將會給大家?guī)碛嘘P(guān)linux中如何進(jìn)行LVM擴容,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
創(chuàng)新互聯(lián)建站-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價比綏化網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式綏化網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋綏化地區(qū)。費用合理售后完善,十余年實體公司更值得信賴。1、 查看本機現(xiàn)在磁盤的情況
[root@oralce10g ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_oralce10g-LogVol03 9591312 4765404 4338692 53% /
tmpfs 883132 72 883060 1% /dev/shm
/dev/sda1 198337 29991 158106 16% /boot
/dev/mapper/vg_oralce10g-LogVol01 4031680 73636 3753244 2% /tmp
/dev/mapper/vg_oralce10g-LogVol02 15118728 14334340 16388 100% /u01
[root@oralce10g ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00085d3a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 3917 31251456 8e Linux LVM
Disk /dev/sdb: 21.5 GB, 21474836480 bytes ##找 doesn't contain a valid partition table
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_oralce10g-LogVol00: 2097 MB, 2097152000 bytes
255 heads, 63 sectors/track, 254 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_oralce10g-LogVol03: 9978 MB, 9978249216 bytes
255 heads, 63 sectors/track, 1213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_oralce10g-LogVol01: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_oralce10g-LogVol02: 15.7 GB, 15728640000 bytes
255 heads, 63 sectors/track, 1912 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
2、 創(chuàng)建物理卷
[root@oralce10g ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
3、“pvdisplay”命令查看物理卷情況
[root@oralce10g ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_oralce10g
PV Size 29.80 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 7629
Free PE 0
Allocated PE 7629
PV UUID lRqQzT-LRSi-xUS0-wO54-OBw1-pVan-kCKWIb
"/dev/sdb" is a new physical volume of "20.00 GiB" ###新建的物理卷
--- NEW Physical volume ---
PV Name /dev/sdb
VG Name
PV Size 20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID 5nHvN3-xTgI-uYNO-245u-arM0-1M8H-CeR1Tp
4、 將新添的物理卷加入到已有的邏輯卷組中
[root@oralce10g ~]# vgextend vg_oralce10g /dev/sdb
Volume group "vg_oralce10g" successfully extended
5、查看卷組的空間
[root@oralce10g ~]# vgdisplay
--- Volume group ---
VG Name vg_oralce10g ##VG名稱
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 6
VG Access read/write ##VG 訪問權(quán)限
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 4
Max PV 0
Cur PV 2
Act PV 2
VG Size 49.80 GiB
PE Size 4.00 MiB
Total PE 12748 ##總的PE個數(shù)
Alloc PE / Size 7629 / 29.80 GiB ##已經(jīng)分配的PE
Free PE / Size 5119 / 20.00 GiB ##自由PE數(shù)量和大小
VG UUID uSfeH7-09v9-dMRE-E6ex-IQlB-C4QM-3clpUm
6、 擴展已有卷的容量 (若有 29.9G為剩余可用容量,則可< -L +29.9G > ,在原有空間上擴容 )
[root@oralce10g ~]# lvextend -L 34G -n /dev/mapper/vg_oralce10g-LogVol02 /dev/sdb
Extending logical volume LogVol02 to 34.00 GiB
Logical volume LogVol02 successfully resized
7、 以上配置完卷擴容,執(zhí)行以下命令重新分配磁盤:
[root@oralce10g ~]# resize2fs /dev/mapper/vg_oralce10g-LogVol02
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/vg_oralce10g-LogVol02 is mounted on /u01; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 3
Performing an on-line resize of /dev/mapper/vg_oralce10g-LogVol02 to 8912896 (4k) blocks.
The filesystem on /dev/mapper/vg_oralce10g-LogVol02 is now 8912896 blocks long.
[root@oralce10g ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oralce10g-LogVol03 9.2G 4.6G 4.2G 53% /
tmpfs 863M 72K 863M 1% /dev/shm
/dev/sda1 194M 30M 155M 16% /boot
/dev/mapper/vg_oralce10g-LogVol01 3.9G 72M 3.6G 2% /tmp
/dev/mapper/vg_oralce10g-LogVol02 34G 14G 19G 44% /u01 >lvm已經(jīng)擴大
上述就是小編為大家分享的linux中如何進(jìn)行LVM擴容了,如果剛好有類似的疑惑,不妨參照上述分析進(jìn)行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道。
本文題目:linux中如何進(jìn)行LVM擴容-創(chuàng)新互聯(lián)
網(wǎng)址分享:http://jinyejixie.com/article42/coichc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站排名、域名注冊、自適應(yīng)網(wǎng)站、網(wǎng)站內(nèi)鏈、定制網(wǎng)站、搜索引擎優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)