这个问题困扰了我一段时间。LVM、lvdisplay、vgdisplay、pvdisplay、lsblk 都显示磁盘已分配 3.64 TB,但文件系统报告只有 1.5 TB。
我不明白我需要在哪里调整大小,或者是否有可能?
光伏显示器
--- Physical volume ---
PV Name /dev/mapper/dm_crypt-2
VG Name vg1
PV Size <3.64 TiB / not usable 0
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 953857
Free PE 0
Allocated PE 953857
PV UUID SAyraf-pldk-qlV2-N0op-BIGR-6HDV-TwG3O2
显示
--- Volume group ---
VG Name vg1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <3.64 TiB
PE Size 4.00 MiB
Total PE 953857
Alloc PE / Size 953857 / <3.64 TiB
Free PE / Size 0 / 0
VG UUID LCH86H-YzSJ-jCs4-tZKb-5mwz-Cedc-8FNro8
lv显示器
--- Logical volume ---
LV Path /dev/vg1/lvol0
LV Name lvol0
VG Name vg1
LV UUID 6ofnPd-JNfD-wXhV-3Jny-kNAh-qu1d-TPDPJ0
LV Write Access read/write
LV Creation host, time arch, 2021-12-22 15:56:41 +0100
LV Status available
# open 0
LV Size <3.64 TiB
Current LE 953857
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdb 8:32 0 3.6T 0 disk
└─sdb2 8:34 0 3.6T 0 part
└─dm_crypt-2 254:3 0 3.6T 0 crypt
└─vg1-lvol0 254:4 0 3.6T 0 lvm /mnt/bigdata
DF-H
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg1-lvol0 1.5T 1020G 363G 74% /mnt/bigdata
我如何调整此分区的大小以使用全部 3.64 TB?
答案1
问题是所有内容都已正确调整大小除了文件系统本身。
在这种情况下,您可以使用调整其大小sudo resize2fs /dev/mapper/vg1-lvol0
。这是在安装磁盘时完成的,无法确认是否已安装解决了问题。