Linux磁盤管理之LVM的使用_Linux

來源:腳本之家  責任編輯:小易  

LVM卷組是邏輯層面的一種磁盤空間管理機制,硬盤驅動器是物理層面的一個物理設備。日常工作中我們可以用邏輯卷組對硬盤進行管理,通過邏輯卷組靈活增減存儲空間。比如我可以把10塊硬盤劃分成一塊硬盤進行使用,從而增加存儲使用空間www.13333515.buzz防采集請勿采集本網。

一、LVM介紹

看你的圖顯示sda2已經在使用,劃分了2個邏輯卷,107.4G的lv_root和12.4G的lv其他:vgdisplay可查看lvm 卷組(vg)情況,lvdisplay可以查看邏輯卷(lv)情況 具體命令用法可搜索“lvm管理命令”。

在我們管理Linux磁盤的時候,通常會遇到這么一種情況。在最初規劃Linux的磁盤的時候,我們給某個分區劃分了一定量的磁盤空間,使用一段時間后,發現我們規劃的磁盤空間不足了,這個時候怎么辦?我們肯定要想辦法給擴容呀,找一塊磁盤分區,格式化,然后掛載,然后把數據拷貝到新加的磁盤上,然后把原有的磁盤卸載掉,通常我們是這樣做的。這樣一來雖然達到了擴容的目的,但是費時費力;如果第二次擴容,空間還是不夠,我們又要重復上面的步驟;如果分配的磁盤空間過大,使用了很久才發現它根本用不到那么多空間,這個時候是不是又要調整呀,聽著就感覺很繁瑣。這時候你肯定要想有沒有那種可掛載上一塊盤,我們利用某種管理手段,可以在線的調整磁盤的空間,這樣有節約了時間,也可實現彈性管理磁盤。對,lvm就有這樣的功能。

你不會只是把分區標志改成8e了吧,把df的結果發一下看看 LVM是指邏輯卷管理,需要將磁盤或分區創建PV,加入到卷組VG,VG上創建邏輯卷LV,最后邏輯卷上建立文件系統 你的情況下sda3建立/home文件

LVM(logical volume manager)邏輯卷管理,它可以彈性的管理文件系統的容量,LVM的工作原理是將一個或多個底層塊設備組織成一個邏輯設備,這個邏輯設備可以在未來新增或移除其他的分區到這個邏輯設備中,從而實現了彈性管理磁盤。

擴完lv,你還得擴lv上的文件系統,比如ext4在線擴,執行 resize2fs/dev/vgname/lvname

PV:物理卷(physical volume);物理卷就是指硬盤分區或從邏輯上與磁盤分區具有同樣功能的設備(如raid),是LVM的基本儲存邏輯塊,但和基本的物理存儲介質(如分區,磁盤等)比較,卻包含有與LVM相關的管理參數

具體的原理性的話,你可以自己去查,我就不復制粘貼了。兩者間的區別,我來舉個栗子: 你家是個三室兩廳,占用面積100平米。你自己住了其中一室,你lvm再大也不能大于磁盤容量也就是這個原因。

VG:卷組(volume group)LVM卷組類似于非LVM系統中的物理硬盤,尤其物理卷組成,可以在卷組上創建一個或多個LVM分區(邏輯卷),LVM卷組由一個或多個物理卷組成

新硬盤創建成PV,比如: pvcreate/dev/sdb 然后用于擴展現有的VG: vgextend vg00/dev/sdb 或者新建VG: vgcreate newvg/dev/sdb

LV:邏輯卷(logical volume)LVM的邏輯卷類似非LVM系統中的硬盤分區,在邏輯卷之上可以創建文件系統。

LVM就是將一些零碎的磁盤分區(PV)合并成一個較大的磁盤(VG),然后在根據需要對這個較大的磁盤(VG)進行劃分成不同的大小分區(LV),這些小的分區(LV)是可以動態的擴展和縮小的,這就是LVM的邏輯卷管理過程。所謂LVM的大磁盤就是將許多PV整合成的VG,那么這個大磁盤最大可達到多少容量呢?我們知道在文件系統里面數據存儲的最小單位是塊(block),不過在LVM當中數據儲存的最小單位是PE,PE的的作用同block的作用一樣,需要注意到是LVM默認使用的PE大小是4M,而LVM的VG最多能包含65534個PE,也就是說默認LVM的VG會有4×65534M/1024M=256G,所以PE的大小決定了VG的最大容量,當然我們在創建VG的時候可指定PE大小,從而來決定VG的大小。

二、LVM實現

1)前期準備幾塊硬盤或者分區來模擬PV

[[email protected] ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 50G 0 disk ├─sda1 8:1 0 2G 0 part /boot├─sda2 8:2 0 2G 0 part [SWAP]└─sda3 8:3 0 46G 0 part /sdb 8:16 0 50G 0 disk sr0 11:0 1 792M 0 rom [[email protected] ~]# fdisk /dev/sdbWelcome to fdisk (util-linux 2.23.2).Changes will remain in memory only, until you decide to write them.Be careful before using the write command.Device does not contain a recognized partition tableBuilding a new DOS disklabel with disk identifier 0x6180123f.Command (m for help): pDisk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x6180123f Device Boot Start End Blocks Id SystemCommand (m for help): nPartition type: p primary (0 primary, 0 extended, 4 free) e extendedSelect (default p): pPartition number (1-4, default 1): First sector (2048-104857599, default 2048): Using default value 2048Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): +10GPartition 1 of type Linux and of size 10 GiB is setCommand (m for help): pDisk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x6180123f Device Boot Start End Blocks Id System/dev/sdb1 2048 20973567 10485760 83 LinuxCommand (m for help): tSelected partition 1Hex code (type L to list all codes): 8eChanged type of partition 'Linux' to 'Linux LVM'Command (m for help): nPartition type: p primary (1 primary, 0 extended, 3 free) e extendedSelect (default p): pPartition number (2-4, default 2): First sector (20973568-104857599, default 20973568): Using default value 20973568Last sector, +sectors or +size{K,M,G} (20973568-104857599, default 104857599): +10GPartition 2 of type Linux and of size 10 GiB is setCommand (m for help): tPartition number (1,2, default 2): Hex code (type L to list all codes): 8eChanged type of partition 'Linux' to 'Linux LVM'Command (m for help): nPartition type: p primary (2 primary, 0 extended, 2 free) e extendedSelect (default p): pPartition number (3,4, default 3): First sector (41945088-104857599, default 41945088): Using default value 41945088Last sector, +sectors or +size{K,M,G} (41945088-104857599, default 104857599): +10GPartition 3 of type Linux and of size 10 GiB is setCommand (m for help): tPartition number (1-3, default 3): Hex code (type L to list all codes): 8e Changed type of partition 'Linux' to 'Linux LVM'Command (m for help): pDisk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x6180123f Device Boot Start End Blocks Id System/dev/sdb1 2048 20973567 10485760 8e Linux LVM/dev/sdb2 20973568 41945087 10485760 8e Linux LVM/dev/sdb3 41945088 62916607 10485760 8e Linux LVMCommand (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.[[email protected] ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 50G 0 disk ├─sda1 8:1 0 2G 0 part /boot├─sda2 8:2 0 2G 0 part [SWAP]└─sda3 8:3 0 46G 0 part /sdb 8:16 0 50G 0 disk ├─sdb1 8:17 0 10G 0 part ├─sdb2 8:18 0 10G 0 part └─sdb3 8:19 0 10G 0 part sr0 11:0 1 792M 0 rom [[email protected] ~]#

說明:這里是用的分區來模擬硬盤當作PV,這里需要注意一點,就是我們分區完保存后,可能存在不同不到問題,就是我們分區完用lsblk看不到分區,可用 partprobe來同步分區信息。centos6 使用partx  -a /dev/sdb來增加分區同步到內存,如果是刪除某個分區,就需要執行partx -d -nr # /dev/sdb  此命令表示從/dev/sdb的分區信息中刪除sdb#分區信息,并同步到內存中。這里還需要注意一點的是我們分區的類型要選8e 表示Linux LVM

2)裝lvm2這個包

[[email protected] ~]# lvs-bash: lvs: command not found[[email protected] ~]# yum info lvm2 Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comAvailable PackagesName : lvm2Arch : x86_64Epoch : 7Version : 2.02.185Release : 2.el7_7.2Size : 1.3 MRepo : updates/7/x86_64Summary : Userland logical volume management toolsURL : http://sources.redhat.com/lvm2License : GPLv2Description : LVM2 includes all of the support for handling read/write operations on : physical volumes (hard disks, RAID-Systems, magneto optical, etc., : multiple devices (MD), see mdadm(8) or even loop devices, see : losetup(8)), creating volume groups (kind of virtual disks) from one : or more physical volumes and creating one or more logical volumes : (kind of logical partitions) in volume groups.[[email protected] ~]# yum install lvm2 -yLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comResolving Dependencies--> Running transaction check---> Package lvm2.x86_64 7:2.02.185-2.el7_7.2 will be installed--> Processing Dependency: lvm2-libs = 7:2.02.185-2.el7_7.2 for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64--> Processing Dependency: device-mapper-persistent-data >= 0.7.0-0.1.rc6 for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64--> Processing Dependency: libdevmapper.so.1.02(DM_1_02_141)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64--> Running transaction check---> Package device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2 will be installed---> Package device-mapper-libs.x86_64 7:1.02.140-8.el7 will be updated--> Processing Dependency: device-mapper-libs = 7:1.02.140-8.el7 for package: 7:device-mapper-1.02.140-8.el7.x86_64---> Package device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2 will be an update---> Package device-mapper-persistent-data.x86_64 0:0.8.5-1.el7 will be installed---> Package lvm2-libs.x86_64 7:2.02.185-2.el7_7.2 will be installed--> Processing Dependency: device-mapper-event = 7:1.02.158-2.el7_7.2 for package: 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64--> Running transaction check---> Package device-mapper.x86_64 7:1.02.140-8.el7 will be updated---> Package device-mapper.x86_64 7:1.02.158-2.el7_7.2 will be an update---> Package device-mapper-event.x86_64 7:1.02.158-2.el7_7.2 will be installed--> Finished Dependency ResolutionDependencies Resolved============================================================================================================================ Package Arch Version Repository Size============================================================================================================================Installing: lvm2 x86_64 7:2.02.185-2.el7_7.2 updates 1.3 MInstalling for dependencies: device-mapper-event x86_64 7:1.02.158-2.el7_7.2 updates 190 k device-mapper-event-libs x86_64 7:1.02.158-2.el7_7.2 updates 189 k device-mapper-persistent-data x86_64 0.8.5-1.el7 base 423 k lvm2-libs x86_64 7:2.02.185-2.el7_7.2 updates 1.1 MUpdating for dependencies: device-mapper x86_64 7:1.02.158-2.el7_7.2 updates 294 k device-mapper-libs x86_64 7:1.02.158-2.el7_7.2 updates 322 kTransaction Summary============================================================================================================================Install 1 Package (+4 Dependent packages)Upgrade ( 2 Dependent packages)Total download size: 3.8 MDownloading packages:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.(1/7): device-mapper-event-1.02.158-2.el7_7.2.x86_64.rpm | 190 kB 00:00:00 (2/7): device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64.rpm | 189 kB 00:00:00 (3/7): device-mapper-libs-1.02.158-2.el7_7.2.x86_64.rpm | 322 kB 00:00:00 (4/7): lvm2-2.02.185-2.el7_7.2.x86_64.rpm | 1.3 MB 00:00:00 (5/7): device-mapper-1.02.158-2.el7_7.2.x86_64.rpm | 294 kB 00:00:00 (6/7): lvm2-libs-2.02.185-2.el7_7.2.x86_64.rpm | 1.1 MB 00:00:00 (7/7): device-mapper-persistent-data-0.8.5-1.el7.x86_64.rpm | 423 kB 00:00:00 ----------------------------------------------------------------------------------------------------------------------------Total 4.3 MB/s | 3.8 MB 00:00:00 Running transaction checkRunning transaction testTransaction test succeededRunning transaction Updating : 7:device-mapper-1.02.158-2.el7_7.2.x86_64 1/9 Updating : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64 2/9 Installing : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64 3/9 Installing : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64 4/9 Installing : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64 5/9 Installing : device-mapper-persistent-data-0.8.5-1.el7.x86_64 6/9 Installing : 7:lvm2-2.02.185-2.el7_7.2.x86_64 7/9 Created symlink from /etc/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket to /usr/lib/systemd/system/lvm2-lvmpolld.socket. Cleanup : 7:device-mapper-1.02.140-8.el7.x86_64 8/9 Cleanup : 7:device-mapper-libs-1.02.140-8.el7.x86_64 9/9 Verifying : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64 1/9 Verifying : 7:device-mapper-1.02.158-2.el7_7.2.x86_64 2/9 Verifying : device-mapper-persistent-data-0.8.5-1.el7.x86_64 3/9 Verifying : 7:lvm2-2.02.185-2.el7_7.2.x86_64 4/9 Verifying : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64 5/9 Verifying : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64 6/9 Verifying : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64 7/9 Verifying : 7:device-mapper-1.02.140-8.el7.x86_64 8/9 Verifying : 7:device-mapper-libs-1.02.140-8.el7.x86_64 9/9Installed: lvm2.x86_64 7:2.02.185-2.el7_7.2 Dependency Installed: device-mapper-event.x86_64 7:1.02.158-2.el7_7.2 device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2 device-mapper-persistent-data.x86_64 0:0.8.5-1.el7 lvm2-libs.x86_64 7:2.02.185-2.el7_7.2 Dependency Updated: device-mapper.x86_64 7:1.02.158-2.el7_7.2 device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2 Complete![[email protected] ~]#

說明:最小化安裝系統默認系統上沒有安裝這個包的,所以我們需要把這個包裝上才可創建LVM

3)創建PV

[[email protected] ~]# pvcreate /dev/sdb{1,2,3} Physical volume "/dev/sdb1" successfully created. Physical volume "/dev/sdb2" successfully created. Physical volume "/dev/sdb3" successfully created.[[email protected] ~]# pvscan PV /dev/sdb1 lvm2 [10.00 GiB] PV /dev/sdb3 lvm2 [10.00 GiB] PV /dev/sdb2 lvm2 [10.00 GiB] Total: 3 [30.00 GiB] / in use: 0 [0 ] / in no VG: 3 [30.00 GiB][[email protected] ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- 10.00g 10.00g /dev/sdb2 lvm2 --- 10.00g 10.00g /dev/sdb3 lvm2 --- 10.00g 10.00g[[email protected] ~]# pvdisplay "/dev/sdb1" is a new physical volume of "10.00 GiB" --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 10.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID MsszES-YPdm-YGQl-7rgg-B6gX-Q4xu-T8m1gz "/dev/sdb3" is a new physical volume of "10.00 GiB" --- NEW Physical volume --- PV Name /dev/sdb3 VG Name PV Size 10.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID BMMx8p-zu9O-ns61-G9DU-iKMR-NmZO-crCjlR "/dev/sdb2" is a new physical volume of "10.00 GiB" --- NEW Physical volume --- PV Name /dev/sdb2 VG Name PV Size 10.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID LPynpW-twlu-fxwg-OlCT-jA2A-R5UI-fvqWLj [[email protected] ~]#

說明:pvcreate 命令表示創建PV 后面跟硬盤或分區對應的設備文件,pvscan 命令作用是搜索系統里面任何具有PV屬性的磁碟,PV屬性就是通過pvcreate創建過的磁碟,pvs是查看pv簡要情況,pvdisplay 查看pv的詳細信息。當然我們要移除某塊盤,讓其不具備PV屬性,可以用pvremove + 磁盤的設備文件路徑

[[email protected] ~]# pvremove /dev/sdb3 Labels on physical volume "/dev/sdb3" successfully wiped.[[email protected] ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- 10.00g 10.00g /dev/sdb2 lvm2 --- 10.00g 10.00g[[email protected] ~]#

說明:移除pv的前提是它沒有在任何VG里面才可做移除,否則移除不了

4)創建VG

[[email protected] ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- 10.00g 10.00g /dev/sdb2 lvm2 --- 10.00g 10.00g[[email protected] ~]# pvcreate /dev/sdb3 Physical volume "/dev/sdb3" successfully created.[[email protected] ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- 10.00g 10.00g /dev/sdb2 lvm2 --- 10.00g 10.00g /dev/sdb3 lvm2 --- 10.00g 10.00g[[email protected] ~]# vgcreate test -s 8M /dev/sdb{1,2,3} Volume group "test" successfully created[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 3 0 0 wz--n- <29.98g <29.98g[[email protected] ~]# vgscan Reading volume groups from cache. Found volume group "test" using metadata type lvm2[[email protected] ~]# vgdisplay --- Volume group --- VG Name test System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 3 Act PV 3 VG Size <29.98 GiB PE Size 8.00 MiB Total PE 3837 Alloc PE / Size 0 / 0 Free PE / Size 3837 / <29.98 GiB VG UUID 31vxAP-L5jb-8Yxm-25m2-LdD0-ee8R-sdTjum [[email protected] ~]# vgreduce test /dev/sdb3 Removed "/dev/sdb3" from volume group "test"[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 2 0 0 wz--n- 19.98g 19.98g[[email protected] ~]# vgcreate test2 /dev/sdb3 Volume group "test2" successfully created[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 2 0 0 wz--n- 19.98g 19.98g test2 1 0 0 wz--n- <10.00g <10.00g[[email protected] ~]# vgdisplay test2 --- Volume group --- VG Name test2 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size <10.00 GiB PE Size 4.00 MiB Total PE 2559 Alloc PE / Size 0 / 0 Free PE / Size 2559 / <10.00 GiB VG UUID rc94SP-JAlk-63Rw-n5xz-qB0d-grnT-ItrMvT [[email protected] ~]# vgremove test2 Volume group "test2" successfully removed[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 2 0 0 wz--n- 19.98g 19.98g[[email protected] ~]#

說明:同樣的vgcreate 表示創建VG 其用法格式是vgcreate  VGNAME [option] 儲存設備路徑 其中-s表示指定PE的大小,VGNAME表示VG的名稱,需要說明的是,指定名稱不能和系統現有的VG名稱相同;vgs查看系統上所有VG的簡要信息,vgscan搜尋系統上面是否有VG,vgdisplay查看所有VG的詳細信息,當然此例中只有一個,我們也可在后面指定查看某個VG的詳細信息,只需要指定其VG名稱即可;有關vg的命令有很多其中vgreduce的作用是在VG內移除PV,vgremove的作用是刪除一個VG,這兩個命令都需要在其后指定要操作的VG名稱

5)創建LV

[[email protected] ~]# lvs[[email protected] ~]# lvcreate -L 2G -n aaa test Logical volume "aaa" created.[[email protected] ~]# lvcreate -L 3G -n bbb test Logical volume "bbb" created.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert aaa test -wi-a----- 2.00g bbb test -wi-a----- 3.00g [[email protected] ~]# lvscan ACTIVE '/dev/test/aaa' [2.00 GiB] inherit ACTIVE '/dev/test/bbb' [3.00 GiB] inherit[[email protected] ~]# lvdisplay --- Logical volume --- LV Path /dev/test/aaa LV Name aaa VG Name test LV UUID R9weh0-D85B-rMcW-oYSM-dAQb-gIQh-RXxITP LV Write Access read/write LV Creation host, time test-centos7-node1, 2020-01-06 09:05:23 -0500 LV Status available # open 0 LV Size 2.00 GiB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 --- Logical volume --- LV Path /dev/test/bbb LV Name bbb VG Name test LV UUID LYwvZj-ogpf-nwtF-mja6-xwwl-A24W-BslJOu LV Write Access read/write LV Creation host, time test-centos7-node1, 2020-01-06 09:05:34 -0500 LV Status available # open 0 LV Size 3.00 GiB Current LE 384 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:1 [[email protected] ~]# lvresize -L +4G /dev/test/aaa Size of logical volume test/aaa changed from 2.00 GiB (256 extents) to 6.00 GiB (768 extents). Logical volume test/aaa successfully resized.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert aaa test -wi-a----- 6.00g bbb test -wi-a----- 3.00g [[email protected] ~]# lvresize -L -1G /dev/test/bbb WARNING: Reducing active logical volume to 2.00 GiB. THIS MAY DESTROY YOUR DATA (filesystem etc.)Do you really want to reduce test/bbb? [y/n]: y Size of logical volume test/bbb changed from 3.00 GiB (384 extents) to 2.00 GiB (256 extents). Logical volume test/bbb successfully resized.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert aaa test -wi-a----- 6.00g bbb test -wi-a----- 2.00g [[email protected] ~]# lvreduce -L 3G /dev/test/aaa WARNING: Reducing active logical volume to 3.00 GiB. THIS MAY DESTROY YOUR DATA (filesystem etc.)Do you really want to reduce test/aaa? [y/n]: y Size of logical volume test/aaa changed from 6.00 GiB (768 extents) to 3.00 GiB (384 extents). Logical volume test/aaa successfully resized.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert aaa test -wi-a----- 3.00g bbb test -wi-a----- 2.00g [[email protected] ~]# lvreduce -L -1G /dev/test/aaa WARNING: Reducing active logical volume to 2.00 GiB. THIS MAY DESTROY YOUR DATA (filesystem etc.)Do you really want to reduce test/aaa? [y/n]: y Size of logical volume test/aaa changed from 3.00 GiB (384 extents) to 2.00 GiB (256 extents). Logical volume test/aaa successfully resized.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert aaa test -wi-a----- 2.00g bbb test -wi-a----- 2.00g [[email protected] ~]# lvremove /dev/test/bbbDo you really want to remove active logical volume test/bbb? [y/n]: y Logical volume "bbb" successfully removed[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert aaa test -wi-a----- 2.00g [[email protected] ~]#

說明:lvcreate 命令作用是創建LV 其中-L表示指定LV的大小,-n表示lv的名稱 最后跟VG的名稱,表示從那個VG上創建LV;lvs 命令作用是查看系統所有的lv簡要信息 ;lvdisplay 查看LV的詳細信息,后面可以跟VG的名稱表示查看指定VG上的所有LV的詳細信息;lvreduce 命令作用是縮減指定LV里的空間,如果指定的大小是負數如-3M 表示縮減3M  如果指定的是 3M 則表示縮減至3M ,這個需要注意,還有這個命令指定大小不能以類似+4M來指定;lvresize此命令的作用是調整LV的容量大小,這個命令指定調整大小+表示增加多少,-表示減少多少,若沒有+/-表示調整到指定大小,lvresize和lvreduce這兩個命令后面都是跟的lv對應設備的路徑(其實不是真的設備路徑,是設備的軟連接路徑),不能指定其名稱;lvremove命令作用是刪除指定的LV,若指定的是vg名,表示刪除該VG上的所有LV,若需要刪除某個LV 需要指定其對應設備路徑。

到此lvm就已經實現,后續就可以直接格式化,然后掛載使用了

[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 2 0 0 wz--n- 19.98g 19.98g[[email protected] ~]# lvcreate -l 100%FREE -n xxx testWARNING: xfs signature detected on /dev/test/xxx at offset 0. Wipe it? [y/n]: y Wiping xfs signature on /dev/test/xxx. Logical volume "xxx" created.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert xxx test -wi-a----- 19.98g [[email protected] ~]# mkfs.xfs -f /dev/test/xxx meta-data=/dev/test/xxx isize=512 agcount=4, agsize=1309696 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0, sparse=0data = bsize=4096 blocks=5238784, imaxpct=25 = sunit=0 swidth=0 blksnaming =version 2 bsize=4096 ascii-ci=0 ftype=1log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0[[email protected] ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 50G 0 disk ├─sda1 8:1 0 2G 0 part /boot├─sda2 8:2 0 2G 0 part [SWAP]└─sda3 8:3 0 46G 0 part /sdb 8:16 0 50G 0 disk ├─sdb1 8:17 0 10G 0 part │ └─test-xxx 253:0 0 20G 0 lvm ├─sdb2 8:18 0 10G 0 part │ └─test-xxx 253:0 0 20G 0 lvm └─sdb3 8:19 0 10G 0 part sr0 11:0 1 792M 0 rom [[email protected] ~]# mount /dev/test/xxx /mnt[[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx 20G 33M 20G 1% /mnt[[email protected] ~]#

三、擴容LV

1)創建PV,并將其加入到VG中

[[email protected] ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 test lvm2 a-- 9.99g 0 /dev/sdb2 test lvm2 a-- 9.99g 0 [[email protected] ~]# vgdisplay --- Volume group --- VG Name test System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 28 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 19.98 GiB PE Size 8.00 MiB Total PE 2558 Alloc PE / Size 2558 / 19.98 GiB Free PE / Size 0 / 0 VG UUID 31vxAP-L5jb-8Yxm-25m2-LdD0-ee8R-sdTjum [[email protected] ~]#

說明:從上面的信息可以看到VG的大小是19.98G 也就是兩塊PV的大小。現在我們新創建一個pv,然后加到vg里

[[email protected] ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 test lvm2 a-- 9.99g 0 /dev/sdb2 test lvm2 a-- 9.99g 0 [[email protected] ~]# pvcreate /dev/sdb3 Physical volume "/dev/sdb3" successfully created.[[email protected] ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 test lvm2 a-- 9.99g 0 /dev/sdb2 test lvm2 a-- 9.99g 0 /dev/sdb3 lvm2 --- 10.00g 10.00g[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 2 1 0 wz--n- 19.98g 0 [[email protected] ~]# vgextend test /dev/sdb3 Volume group "test" successfully extended[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 3 1 0 wz--n- <29.98g 9.99g[[email protected] ~]# vgdisplay --- Volume group --- VG Name test System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 31 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 3 Act PV 3 VG Size <29.98 GiB PE Size 8.00 MiB Total PE 3837 Alloc PE / Size 2558 / 19.98 GiB Free PE / Size 1279 / 9.99 GiB VG UUID 31vxAP-L5jb-8Yxm-25m2-LdD0-ee8R-sdTjum [[email protected] ~]#

說明:vgextend命令作用是將指定pv加入到指定VG中,VG指定其名稱即可,pv需指定其設備路徑

2)將新加的VG的PE加入到xxx LV里

[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 3 1 0 wz--n- <29.98g 9.99g[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert xxx test -wi-ao---- 19.98g [[email protected] ~]# lvdisplay --- Logical volume --- LV Path /dev/test/xxx LV Name xxx VG Name test LV UUID ihOo41-gh1L-eSHK-iLXY-UGfF-J6uI-UmVWhF LV Write Access read/write LV Creation host, time test-centos7-node1, 2020-01-06 10:00:08 -0500 LV Status available # open 1 LV Size 19.98 GiB Current LE 2558 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 [[email protected] ~]# lvextend -l +100%FREE /dev/test/xxx Size of logical volume test/xxx changed from 19.98 GiB (2558 extents) to <29.98 GiB (3837 extents). Logical volume test/xxx successfully resized.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert xxx test -wi-ao---- <29.98g [[email protected] ~]# lvdisplay --- Logical volume --- LV Path /dev/test/xxx LV Name xxx VG Name test LV UUID ihOo41-gh1L-eSHK-iLXY-UGfF-J6uI-UmVWhF LV Write Access read/write LV Creation host, time test-centos7-node1, 2020-01-06 10:00:08 -0500 LV Status available # open 1 LV Size <29.98 GiB Current LE 3837 Segments 3 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 [[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree test 3 1 0 wz--n- <29.98g 0 [[email protected] ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 50G 0 disk ├─sda1 8:1 0 2G 0 part /boot├─sda2 8:2 0 2G 0 part [SWAP]└─sda3 8:3 0 46G 0 part /sdb 8:16 0 50G 0 disk ├─sdb1 8:17 0 10G 0 part │ └─test-xxx 253:0 0 30G 0 lvm /mnt├─sdb2 8:18 0 10G 0 part │ └─test-xxx 253:0 0 30G 0 lvm /mnt└─sdb3 8:19 0 10G 0 part └─test-xxx 253:0 0 30G 0 lvm /mntsr0 11:0 1 792M 0 rom [[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx 20G 33M 20G 1% /mnt[[email protected] ~]#

說明:可看到lvs里的空間已經加上去,lvextend命令作用是將指定VG里的空間添加到指定的lv中,上面的例子是把VG里的所有空閑空間添加到/dev/test/xxx里,當然還有一種情況在VG還有空余的空間,我們可以用lvresize 來調整lv的大小;從上面的信息可以看到我們把新的空間加入到VG和Lv中后,df 看掛載點空間卻沒有增加,接下來我們通過resize2fs將文件系統同步到增大的空間。

[[email protected] ~]# resize2fs /dev/test/xxx resize2fs 1.42.9 (28-Dec-2013)resize2fs: Bad magic number in super-block while trying to open /dev/test/xxxCouldn't find valid filesystem superblock.[[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx 20G 33M 20G 1% /mnt[[email protected] ~]#

說明:看來用此命令不行,因為resize2fs這個命令針對ext系列的文件系統,xfs需要用 xfs_growfs來調整

[[email protected] ~]# xfs_growfs /dev/test/xxx meta-data=/dev/mapper/test-xxx isize=512 agcount=4, agsize=1309696 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0 spinodes=0data = bsize=4096 blocks=5238784, imaxpct=25 = sunit=0 swidth=0 blksnaming =version 2 bsize=4096 ascii-ci=0 ftype=1log =internal bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0data blocks changed from 5238784 to 7858176[[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx 30G 33M 30G 1% /mnt[[email protected] ~]#

四、縮減LV(xfs文件系統)

1)卸載已經掛好的LV

[[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx 30G 33M 30G 1% /mnt[[email protected] ~]# umount /mnt[[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0[[email protected] ~]#

2)強制進行磁盤檢測

[[email protected] ~]# xfs_repair -n /dev/test/xxx Phase 1 - find and verify superblock...Phase 2 - using internal log - zero log... - scan filesystem freespace and inode maps... - found root inode chunkPhase 3 - for each AG... - scan (but don't clear) agi unlinked lists... - process known inodes and perform inode discovery... - agno = 0 - agno = 1 - agno = 2 - agno = 3 - process newly discovered inodes...Phase 4 - check for duplicate blocks... - setting up duplicate extent list... - check for inodes claiming duplicate blocks... - agno = 0 - agno = 1 - agno = 2 - agno = 3No modify flag set, skipping phase 5Phase 6 - check inode connectivity... - traversing filesystem ... - traversal finished ... - moving disconnected inodes to lost+found ...Phase 7 - verify link counts...No modify flag set, skipping filesystem flush and exiting.[[email protected] ~]#

說明:ext系列文件系統可e2fsck命令檢查

3)調整lv大小

[[email protected] ~]# lvreduce -L -10G /dev/test/xxx WARNING: Reducing active logical volume to <19.98 GiB. THIS MAY DESTROY YOUR DATA (filesystem etc.)Do you really want to reduce test/xxx? [y/n]: y Size of logical volume test/xxx changed from <29.98 GiB (3837 extents) to <19.98 GiB (2557 extents). Logical volume test/xxx successfully resized.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert xxx test -wi-a----- <19.98g [[email protected] ~]# lvdisplay --- Logical volume --- LV Path /dev/test/xxx LV Name xxx VG Name test LV UUID uhZZaz-Odd9-ibwY-2Z1Z-ZmNY-eZF7-0lXERT LV Write Access read/write LV Creation host, time test-centos7-node1, 2020-01-06 10:32:42 -0500 LV Status available # open 0 LV Size <19.98 GiB Current LE 2557 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0 [[email protected] ~]#

4)掛載

[[email protected] ~]# mount /dev/test/xxx /mntmount: /dev/mapper/test-xxx: can't read superblock[[email protected] ~]#

說明:做到這里發現一個問題,xfs文件系統是不支持邏輯卷縮減的,為什么呢?xfs的文件系統調整命令是xfs_growfs 這個命令只支持增大的操作。我們在調整lv大小的時候實際上是把文件系統給破壞了,要想縮減空間,就必須重新格式化后在掛載,這樣一來如果原有的盤里有數據就丟了。所以xfs上做LV的縮減沒有意義

[[email protected] ~]# mkfs.xfs /dev/test/xxx -fmeta-data=/dev/test/xxx isize=512 agcount=4, agsize=1309184 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0, sparse=0data = bsize=4096 blocks=5236736, imaxpct=25 = sunit=0 swidth=0 blksnaming =version 2 bsize=4096 ascii-ci=0 ftype=1log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0[[email protected] ~]# mount /dev/test/xxx /mnt[[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx 20G 33M 20G 1% /mnt[[email protected] ~]

五、縮減LV(ext系列文件系統)

1)卸載已掛載的LV

[[email protected] ~]# df -ThFilesystem Type Size Used Avail Use% Mounted on/dev/sda3 xfs 46G 1.6G 45G 4% /devtmpfs devtmpfs 1.9G 0 1.9G 0% /devtmpfs tmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs tmpfs 1.9G 8.6M 1.9G 1% /runtmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 xfs 2.0G 135M 1.9G 7% /boottmpfs tmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx ext4 20G 45M 19G 1% /mnt[[email protected] ~]# umount /mnt[[email protected] ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on/dev/sda3 xfs 46G 1.6G 45G 4% /devtmpfs devtmpfs 1.9G 0 1.9G 0% /devtmpfs tmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs tmpfs 1.9G 8.6M 1.9G 1% /runtmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 xfs 2.0G 135M 1.9G 7% /boottmpfs tmpfs 378M 0 378M 0% /run/user/0[[email protected] ~]#

2)強制執行磁盤檢測

[[email protected] ~]# e2fsck -f /dev/test/xxx e2fsck 1.42.9 (28-Dec-2013)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary information/dev/test/xxx: 11/1310720 files (0.0% non-contiguous), 126322/5236736 blocks[[email protected] ~]#

說明:這一步我們在不執行的話,直接下一步它也會提示我們先做磁盤檢測

3)調整文件系統大小

[[email protected] ~]# resize2fs /dev/test/xxx 12Gresize2fs 1.42.9 (28-Dec-2013)Resizing the filesystem on /dev/test/xxx to 3145728 (4k) blocks.The filesystem on /dev/test/xxx is now 3145728 blocks long.[[email protected] ~]#

4)調整LV的大小

[[email protected] ~]# lvreduce -L 12G /dev/test/xxx WARNING: Reducing active logical volume to 12.00 GiB. THIS MAY DESTROY YOUR DATA (filesystem etc.)Do you really want to reduce test/xxx? [y/n]: y Size of logical volume test/xxx changed from <19.98 GiB (2557 extents) to 12.00 GiB (1536 extents). Logical volume test/xxx successfully resized.[[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert xxx test -wi-a----- 12.00g [[email protected] ~]#

說明:這里縮減到的空間需同文件系統的大小一致或者縮減后的空間比文件系統調整的空間要大才行,這樣才不能損壞文件系統,切記不能比文件系統調整的空間還小,小了,在縮減空間的時候就破壞了文件系統,會導致后續的掛載無法進行。

5)掛載

[[email protected] ~]# mount /dev/test/xxx /mnt[[email protected] ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 46G 1.6G 45G 4% /devtmpfs 1.9G 0 1.9G 0% /devtmpfs 1.9G 0 1.9G 0% /dev/shmtmpfs 1.9G 8.6M 1.9G 1% /runtmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup/dev/sda1 2.0G 135M 1.9G 7% /boottmpfs 378M 0 378M 0% /run/user/0/dev/mapper/test-xxx 12G 41M 12G 1% /mnt[[email protected] ~]#

我和你一樣的要求 用dd實現了。先建好lvm再重啟進單用戶模式用dd移動數據,移動前后多執行幾次sync 一定要小心。然后重啟改grub參數即可記得把新的根掛載到臨時目錄下修改etc/fstab 還有grub.conf內容來自www.13333515.buzz請勿采集。


  • 本文相關:
  • linux文件目錄管理命令整理總結
  • linux賬號文件控制管理步驟詳解
  • 淺析linux常用文件管理命令
  • linux文件及用戶管理的實例練習
  • linux php-cgi.exe占用cpu 100%的一次排障之旅
  • linux windows下設置定時執行任務的方法
  • centos 7下mongodb的安裝配置詳解
  • linux centos7斷網下安裝應用程序詳解
  • linux中alarm函數的實例講解
  • 詳解centos的svn服務器搭建與自動部署全過程
  • cloudera manager 設置開機自啟的方法
  • apache限制ip并發數和流量控制的方法
  • centos下ssh無密碼登錄的配置文件
  • linux查找特定程序whereis實例詳解
  • linux下根目錄為一般磁盤分區,現在滿了,想將其轉換為lvm方式管理,具體操作思想?
  • linux 高手,通俗的說,lvm卷組和硬盤驅動器有什么區別?
  • 如何使用LVM將新磁盤添加到現有的Linux系統中
  • 關于linux的LVM分區,求解
  • linux 關于 lvm 磁盤使用的問題?
  • linux 如何增加LVM的/home的容量
  • linux lvm調整磁盤空間,lvdisplay顯示已經調整了,但是df -h看到磁盤空間還是沒有變化,這是為什么
  • linux系統lvm擴容和添加磁盤擴容的區別
  • linux lvm新添加硬盤怎么掛載
  • 如何使用LVM卷管理Linux系統中的磁盤
  • 網站首頁網頁制作腳本下載服務器操作系統網站運營平面設計媒體動畫電腦基礎硬件教程網絡安全星外虛擬主機華眾虛擬主機linuxwin服務器ftp服務器dns服務器tomcat nginxzabbix云和虛擬化服務器其它首頁服務器linuxlinux文件目錄管理命令整理總結linux賬號文件控制管理步驟詳解淺析linux常用文件管理命令linux文件及用戶管理的實例練習linux php-cgi.exe占用cpu 100%的一次排障之旅linux windows下設置定時執行任務的方法centos 7下mongodb的安裝配置詳解linux centos7斷網下安裝應用程序詳解linux中alarm函數的實例講解詳解centos的svn服務器搭建與自動部署全過程cloudera manager 設置開機自啟的方法apache限制ip并發數和流量控制的方法centos下ssh無密碼登錄的配置文件linux查找特定程序whereis實例詳解apache開啟.htaccess及.htaccesslinux下實現免密碼登錄(超詳細)service temporarily unavailablapache rewrite url重定向功能的linux下用cron定時執行任務的方法apache性能測試工具ab使用詳解centos 6.4安裝配置lamp服務器(acentos+nginx+php+mysql詳細配置apache you don""t have permissflume環境部署和配置詳解及案例大linux服務器被黑以后的詳細處理步驟ubuntu系統修改時區和時間的方法linux內核設備驅動之內核中鏈表的使用筆記linux 下讀xml 的類詳解及實現代碼17個linux tar命令實用示例linux之普通用戶與root用戶之間切換方法關于linux下core dump【總結】linux lsof命令使用詳解linux nfs 學習筆記linux sshd_config配置手冊中文版
    免責聲明 - 關于我們 - 聯系我們 - 廣告聯系 - 友情鏈接 - 幫助中心 - 頻道導航
    Copyright © 2017 www.13333515.buzz All Rights Reserved
    3排列五开奖结果