一、LVM簡介
LVM(Logical Volume Manager,邏輯卷管理器)是Linux系統(tǒng)用于對硬盤分區(qū)進行管理的一種機制,其創(chuàng)建初衷是為了解決硬盤設備在創(chuàng)建分區(qū)后不易修改分區(qū)大小的缺陷。盡管對傳統(tǒng)的硬盤分區(qū)進行強制擴容或縮容從理論上來講是可行的,但是卻可能造成數(shù)據(jù)的丟失。而LVM技術是在硬盤分區(qū)和文件系統(tǒng)之間添加了一個邏輯層,它提供了一個抽象的卷組,可以把多塊硬盤進行卷組合并。這樣一來,用戶不必關心物理硬盤設備的底層架構和布局,就可以實現(xiàn)對硬盤分區(qū)的動態(tài)調(diào)整
二、實驗環(huán)境
操作平臺:VMware Workstation 17 Pro
虛機操作系統(tǒng):RokcyLinux 8.9
三、參考實例
3.1 創(chuàng)建物理卷(PV)
LVM支持使用整塊磁盤創(chuàng)建PV,或用分區(qū)創(chuàng)建PV
例如使用/dev/sdb磁盤創(chuàng)建PV
[root@localhost ~]# parted /dev/sdb print # 查看磁盤信息 Error: /dev/sdb: unrecognised disk label Model: VMware, VMware Virtual S (scsi) Disk /dev/sdb: 10.7GB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: [root@localhost ~]# pvcreate /dev/sdb # 創(chuàng)建 Physical volume "/dev/sdb" successfully created.
以下三條命令均可查看pv狀態(tài)
[root@localhost ~]# pvscan PV /dev/sda2 VG rl lvm2 [<49.00 GiB / 0 free] PV /dev/sdb lvm2 [10.00 GiB] Total: 2 [<59.00 GiB] / in use: 1 [<49.00 GiB] / in no VG: 1 [10.00 GiB] [root@localhost ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 rl lvm2 a-- <49.00g 0 /dev/sdb lvm2 --- 10.00g 10.00g [root@localhost ~]# pvdisplay /dev/sdb "/dev/sdb" is a new physical volume of "10.00 GiB" --- NEW Physical volume --- PV Name /dev/sdb VG Name PV Size 10.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID J24xM9-b5SN-NlA0-q8cv-jQw3-eBRW-aLdNKk
使用磁盤分區(qū)創(chuàng)建PV
[root@localhost ~]# fdisk /dev/sdc # 首先對磁盤進行分區(qū) Welcome to fdisk (util-linux 2.32.1). 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 table. Created a new DOS disklabel with disk identifier 0xa6c9a99a. Command (m for help): n # 創(chuàng)建新分區(qū) Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p # 創(chuàng)建主分區(qū) Partition number (1-4, default 1): # 分區(qū)編號,默認為第一個分區(qū) First sector (2048-20971519, default 2048): # 分區(qū)的起始扇區(qū),默認即可,直接回車 Last sector, +sectors or +size{K,M,G,T,P} (2048-20971519, default 20971519): +5G # 分區(qū)大小5G Created a new partition 1 of type 'Linux' and of size 5 GiB. Command (m for help): t # 更改分區(qū)類型 Selected partition 1 Hex code (type L to list all codes): 8e # 選擇邏輯卷類型,對應編號為8e Changed type of partition 'Linux' to 'Linux LVM'. Command (m for help): p # 打印分區(qū)信息 Disk /dev/sdc: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xa6c9a99a Device Boot Start End Sectors Size Id Type /dev/sdc1 2048 10487807 10485760 5G 8e Linux LVM Command (m for help): w # 保存分區(qū)表 The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
[root@localhost ~]# pvcreate /dev/sdc1 # 創(chuàng)建 Physical volume "/dev/sdc1" successfully created. [root@localhost ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 rl lvm2 a-- <49.00g 0 /dev/sdb lvm2 --- 10.00g 10.00g /dev/sdc1 lvm2 --- 5.00g 5.00g [root@localhost ~]# pvdisplay /dev/sdc1 "/dev/sdc1" is a new physical volume of "5.00 GiB" --- NEW Physical volume --- PV Name /dev/sdc1 VG Name PV Size 5.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID K3MapS-m1yx-1E5p-pSjw-OTLB-OdMI-hPNCMe
3.2 創(chuàng)建卷組(VG)
例如:使用物理卷“/dev/sdb”創(chuàng)建一個名為“vgtest”的卷組
[root@localhost ~]# vgcreate vgtest /dev/sdb Volume group "vgtest" successfully created
以下命令均可查看VG的狀態(tài)
[root@localhost ~]# vgscan Found volume group "vgtest" using metadata type lvm2 Found volume group "rl" using metadata type lvm2 [root@localhost ~]# vgs VG #PV #LV #SN Attr VSize VFree rl 1 2 0 wz--n- <49.00g 0 vgtest 1 0 0 wz--n- <10.00g <10.00g [root@localhost ~]# vgdisplay vgtest --- Volume group --- VG Name vgtest 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 # 默認的PE大小為4MiB Total PE 2559 Alloc PE / Size 0 / 0 Free PE / Size 2559 / <10.00 GiB VG UUID yb2LkE-6N02-Pv6w-6Wb6-sVII-1E1c-9VrNrj
也可以在創(chuàng)建卷組時指定PE的大小,使用“-s”參數(shù)指定,單位是“M”
[root@localhost ~]# vgcreate -s 2M vgtest1 /dev/sdc1 Volume group "vgtest1" successfully created [root@localhost ~]# pvdisplay /dev/sdc1 --- Physical volume --- PV Name /dev/sdc1 VG Name vgtest1 PV Size 5.00 GiB / not usable 2.00 MiB Allocatable yes PE Size 2.00 MiB # PE大小為2 Total PE 2559 Free PE 2559 Allocated PE 0 PV UUID K3MapS-m1yx-1E5p-pSjw-OTLB-OdMI-hPNCMe
可以使用多個PV來創(chuàng)建卷組,這樣創(chuàng)建出來的VG容量就是多個PV的總和
[root@localhost ~]# pvcreate /dev/sdd Physical volume "/dev/sdd" successfully created. [root@localhost ~]# pvcreate /dev/sde Physical volume "/dev/sde" successfully created. [root@localhost ~]# [root@localhost ~]# vgcreate vgtest2 /dev/sdd /dev/sde Volume group "vgtest2" successfully created [root@localhost ~]# vgdisplay vgtest2 --- Volume group --- VG Name vgtest2 System ID Format lvm2 Metadata Areas 2 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 2 Act PV 2 VG Size 19.99 GiB PE Size 4.00 MiB Total PE 5118 Alloc PE / Size 0 / 0 Free PE / Size 5118 / 19.99 GiB VG UUID jI8V7c-A4Pa-W2GU-cGc4-kglH-IYii-TNfFRp
3.3 創(chuàng)建邏輯卷(LV)
使用卷組“vgtest”來創(chuàng)建邏輯卷,名為“l(fā)vtest”,將“vgtest”的所有空間分配給“l(fā)vtest”
[root@localhost ~]# lvcreate -l 100%FREE vgtest -n lvtest Logical volume "lvtest" created.
以下命令均可查看邏輯卷狀態(tài)
[root@localhost ~]# lvscan ACTIVE '/dev/vgtest/lvtest' [<10.00 GiB] inherit ACTIVE '/dev/rl/swap' [3.91 GiB] inherit ACTIVE '/dev/rl/root' [45.08 GiB] inherit [root@localhost ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root rl -wi-ao---- 45.08g swap rl -wi-ao---- 3.91g lvtest vgtest -wi-a----- <10.00g [root@localhost ~]# lvdisplay vgtest/lvtest --- Logical volume --- LV Path /dev/vgtest/lvtest LV Name lvtest VG Name vgtest LV UUID hJX97w-kJtH-izv3-5N2U-rlVf-OZfe-8OMedE LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-12-30 2257 +0800 LV Status available # open 0 LV Size <10.00 GiB Current LE 2559 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:2
可以在創(chuàng)建邏輯卷時指定其容量
[root@localhost ~]# lvcreate -L 3G vgtest1 -n lvtest1 # 指定LV容量為3G Logical volume "lvtest1" created. [root@localhost ~]# lvdisplay vgtest1/lvtest1 --- Logical volume --- LV Path /dev/vgtest1/lvtest1 LV Name lvtest1 VG Name vgtest1 LV UUID ltVLNf-oyj0-25Ct-MVmx-VyeC-6y03-9LZdFV LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-12-30 2213 +0800 LV Status available # open 0 LV Size 3.00 GiB # LV容量為3GiB Current LE 1536 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:3
也可以在創(chuàng)建邏輯卷時指定為其分配的PE個數(shù),例如,我想為創(chuàng)建的LV分配容量800M的容量,默認PE大小為4M,則為200個PE
[root@localhost ~]# vgdisplay vgtest2 --- Volume group --- VG Name vgtest2 System ID Format lvm2 Metadata Areas 2 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 2 Act PV 2 VG Size 19.99 GiB PE Size 4.00 MiB # PE大小為4MiB Total PE 5118 Alloc PE / Size 0 / 0 Free PE / Size 5118 / 19.99 GiB [root@localhost ~]# lvcreate -l 200 vgtest2 -n lvtest2 Logical volume "lvtest2" created. [root@localhost ~]# lvdisplay vgtest2/lvtest2 --- Logical volume --- LV Path /dev/vgtest2/lvtest2 LV Name lvtest2 VG Name vgtest2 LV UUID rdYOR3-ETaO-Lc33-L0Si-ke3a-J3dV-qRTuGs LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-12-30 2207 +0800 LV Status available # open 0 LV Size 800.00 MiB # LV容量為800MiB Current LE 200 # 分配到的PE個數(shù)為200 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:4
3.4 邏輯卷擴容
例如,如果我想對邏輯卷“l(fā)vtest2”進行擴容,增加200M容量
[root@localhost ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root rl -wi-ao---- 45.08g swap rl -wi-ao---- 3.91g lvtest vgtest -wi-a----- <10.00g lvtest1 vgtest1 -wi-a----- 3.00g lvtest2 vgtest2 -wi-a----- 800.00m # 查看到lvtest2使用的是vgtest2這個卷組 [root@localhost ~]# vgs VG #PV #LV #SN Attr VSize VFree rl 1 2 0 wz--n- <49.00g 0 vgtest 1 1 0 wz--n- <10.00g 0 vgtest1 1 1 0 wz--n- <5.00g <2.00g vgtest2 2 1 0 wz--n- 19.99g 19.21g # 查看到vgtest2還有19.21G的空閑容量 [root@localhost ~]# lvextend -L +200M vgtest2/lvtest2 Size of logical volume vgtest2/lvtest2 changed from 800.00 MiB (200 extents) to 1000.00 MiB (250 extents). Logical volume vgtest2/lvtest2 successfully resized. [root@localhost ~]# lvdisplay vgtest2/lvtest2 --- Logical volume --- LV Path /dev/vgtest2/lvtest2 LV Name lvtest2 VG Name vgtest2 LV UUID rdYOR3-ETaO-Lc33-L0Si-ke3a-J3dV-qRTuGs LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-12-30 2207 +0800 LV Status available # open 0 LV Size 1000.00 MiB # 容量增長為1000MiB Current LE 250 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:4
也可以指定增加的PE個數(shù)來對邏輯卷進行擴容
[root@localhost ~]# lvextend -l +25 vgtest2/lvtest2 Size of logical volume vgtest2/lvtest2 changed from 1000.00 MiB (250 extents) to 1.07 GiB (275 extents). Logical volume vgtest2/lvtest2 successfully resized. [root@localhost ~]# lvdisplay vgtest2/lvtest2 --- Logical volume --- LV Path /dev/vgtest2/lvtest2 LV Name lvtest2 VG Name vgtest2 LV UUID rdYOR3-ETaO-Lc33-L0Si-ke3a-J3dV-qRTuGs LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-12-30 2207 +0800 LV Status available # open 0 LV Size 1.07 GiB # 容量增長為1.07 Current LE 275 # 增加了25個PE Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:4
或者將VG的空閑容量全部分配給LV
[root@localhost ~]# lvextend -l +100%FREE vgtest2/lvtest2 Size of logical volume vgtest2/lvtest2 changed from 1.07 GiB (275 extents) to 19.99 GiB (5118 extents). Logical volume vgtest2/lvtest2 successfully resized. [root@localhost ~]# lvdisplay vgtest2/lvtest2 --- Logical volume --- LV Path /dev/vgtest2/lvtest2 LV Name lvtest2 VG Name vgtest2 LV UUID rdYOR3-ETaO-Lc33-L0Si-ke3a-J3dV-qRTuGs LV Write Access read/write LV Creation host, time localhost.localdomain, 2023-12-30 2207 +0800 LV Status available # open 0 LV Size 19.99 GiB # 容量增長為19.99 Current LE 5118 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:4
將邏輯卷“l(fā)vtest2”掛載
[root@localhost ~]# mkfs.xfs /dev/vgtest2/lvtest2 # 創(chuàng)建xfs文件系統(tǒng) meta-data=/dev/vgtest2/lvtest2 isize=512 agcount=4, agsize=1310208 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=0 inobtcount=0 data = bsize=4096 blocks=5240832, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 [root@localhost ~]# mkdir /data [root@localhost ~]# mount /dev/vgtest2/lvtest2 /data # 掛載邏輯卷 [root@localhost ~]# df -Th /data Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/vgtest2-lvtest2 xfs 20G 175M 20G 1% /data
如果想要永久掛載,需要在“/etc/fstab”文件中增加一行配置
[root@localhost ~]# blkid /dev/vgtest2/lvtest2 # 查看邏輯卷的UUID,通過UUID的方式掛載 /dev/vgtest2/lvtest2: UUID="544fae3b-7d08-4090-a6a7-aa5bcc4d9be0" BLOCK_SIZE="512" TYPE="xfs" [root@localhost ~]# vim /etc/fstab # # /etc/fstab # Created by anaconda on Wed Nov 29 1550 2023 # # Accessible filesystems, by reference, are maintained under '/dev/disk/'. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. # # After editing this file, run 'systemctl daemon-reload' to update systemd # units generated from this file. # /dev/mapper/rl-root / xfs defaults 0 0 UUID=9d58ddae-ddae-4a83-8841-4b9863b55ab5 /boot xfs defaults 0 0 /dev/mapper/rl-swap none swap defaults 0 0 UUID="544fae3b-7d08-4090-a6a7-aa5bcc4d9be0" /data xfs defaults 0 0 # 添加這一行 [root@localhost ~]# mount -a # 讀取“/etc/fstab”配置文件,掛載文件中定義的設備
現(xiàn)在,假設服務器目錄“/data”所涉及的業(yè)務量日益增加,而邏輯卷“l(fā)vtest2”的空間不足以支撐,需要對它再次進行擴容,我們可以這樣做:
因為邏輯卷“l(fā)vtest2”關聯(lián)的卷組是“vgtest2”,而“vgtest2”的所有容量已分配給了“l(fā)vtest2”,我們需要先對“vgtest2”進行擴容
新增一些scsi磁盤,如果希望在不重啟的情況下讓系統(tǒng)識別到新增的硬盤,可以這樣做
[root@localhost ~]# ls /sys/class/scsi_host/ host0 host1 host2 [root@localhost ~]# echo "- - -" > /sys/class/scsi_host/host0/scan # 有多少個目錄就對應執(zhí)行多個目錄的命令 [root@localhost ~]# echo "- - -" > /sys/class/scsi_host/host1/scan [root@localhost ~]# echo "- - -" > /sys/class/scsi_host/host2/scan [root@localhost ~]# ls /sys/class/scsi_device/ 1:0:0:0 2:0:0:0 2:0:1:0 2:0:10:0 2:0:2:0 2:0:3:0 2:0:4:0 2:0:5:0 2:0:6:0 2:0:8:0 2:0:9:0 [root@localhost ~]# echo 1 > /sys/class/scsi_device/1:0:0:0/device/rescan # 有多少個目錄就對應執(zhí)行多個目錄的命令 [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:0:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:1:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:10:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:2:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:3:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:4:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:5:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:6:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:8:0/device/rescan [root@localhost ~]# echo 1 > /sys/class/scsi_device/2:0:9:0/device/rescan [root@localhost ~]# lsblk # 重新掃描后,就可以看到新增的塊設備了 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 50G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 49G 0 part ├─rl-root 253:0 0 45.1G 0 lvm / └─rl-swap 253:1 0 3.9G 0 lvm [SWAP] sdb 8:16 0 10G 0 disk └─vgtest-lvtest 253:2 0 10G 0 lvm sdc 8:32 0 10G 0 disk └─sdc1 8:33 0 5G 0 part └─vgtest1-lvtest1 253:3 0 3G 0 lvm sdd 8:48 0 10G 0 disk └─vgtest2-lvtest2 253:4 0 20G 0 lvm /data sde 8:64 0 10G 0 disk └─vgtest2-lvtest2 253:4 0 20G 0 lvm /data sdf 8:80 0 10G 0 disk sdg 8:96 0 10G 0 disk sdh 8:112 0 10G 0 disk sdi 8:128 0 10G 0 disk sdj 8:144 0 10G 0 disk sr0 11:0 1 1024M 0 rom
首先,我們使用“/dev/sdf”這塊磁盤創(chuàng)建PV,用于“vgtest2”的擴容
[root@localhost ~]# pvcreate /dev/sdf Physical volume "/dev/sdf" successfully created. [root@localhost ~]# vgextend vgtest2 /dev/sdf Volume group "vgtest2" successfully extended [root@localhost ~]# vgs vgtest2 VG #PV #LV #SN Attr VSize VFree vgtest2 3 1 0 wz--n- <29.99g <10.00g # 現(xiàn)在vgtest2的容量增長為30
然后,對邏輯卷“l(fā)vtest2”擴容,將空閑容量全部分配給它
[root@localhost ~]# lvextend -l +100%FREE vgtest2/lvtest2 Size of logical volume vgtest2/lvtest2 changed from 19.99 GiB (5118 extents) to <29.99 GiB (7677 extents). Logical volume vgtest2/lvtest2 successfully resized.
雖然邏輯卷“l(fā)vtest2”的容量已擴容至30G,但是掛載的目錄仍顯示可用容量為20G
[root@localhost ~]# lvs vgtest2/lvtest2 LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert lvtest2 vgtest2 -wi-ao---- <29.99g [root@localhost ~]# df -Th /data Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/vgtest2-lvtest2 xfs 20G 175M 20G 1% /data
需要對文件系統(tǒng)進行擴容,ext類型的文件系統(tǒng)的擴容命令是“resize2fs”,xfs類型的文件系統(tǒng)擴容命令是xfs_growfs
[root@localhost ~]# xfs_growfs /dev/vgtest2/lvtest2 meta-data=/dev/mapper/vgtest2-lvtest2 isize=512 agcount=4, agsize=1310208 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=0 inobtcount=0 data = bsize=4096 blocks=5240832, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 5240832 to 7861248 [root@localhost ~]# df -Th /data Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/vgtest2-lvtest2 xfs 30G 247M 30G 1% /data # 容量擴容至30G了
或者,我們可以在擴容邏輯卷的同時,一并把文件系統(tǒng)擴容,只需要在lvextend命令后面加上一個“-r”參數(shù)
對“l(fā)vtest2”再次進行擴容
[root@localhost ~]# pvcreate /dev/sdg # 創(chuàng)建PV Physical volume "/dev/sdg" successfully created. [root@localhost ~]# vgextend vgtest2 /dev/sdg # 擴容VG Volume group "vgtest2" successfully extended [root@localhost ~]# lvextend -L +5G -r vgtest2/lvtest2 # 擴容LV,增加5G容量,同時擴容文件系統(tǒng) Size of logical volume vgtest2/lvtest2 changed from <29.99 GiB (7677 extents) to <34.99 GiB (8957 extents). Logical volume vgtest2/lvtest2 successfully resized. meta-data=/dev/mapper/vgtest2-lvtest2 isize=512 agcount=6, agsize=1310208 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=0 inobtcount=0 data = bsize=4096 blocks=7861248, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 7861248 to 9171968 [root@localhost ~]# df -Th /data Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/vgtest2-lvtest2 xfs 35G 283M 35G 1% /data # 容量擴容至35
審核編輯:湯梓紅
-
硬盤
+關注
關注
3文章
1310瀏覽量
57314 -
Linux
+關注
關注
87文章
11304瀏覽量
209518 -
操作系統(tǒng)
+關注
關注
37文章
6825瀏覽量
123333 -
LVM
+關注
關注
0文章
10瀏覽量
6437
原文標題:一文精通LVM邏輯卷管理
文章出處:【微信號:magedu-Linux,微信公眾號:馬哥Linux運維】歡迎添加關注!文章轉(zhuǎn)載請注明出處。
發(fā)布評論請先 登錄
相關推薦
評論