大网数据广告活动
服务器运维问答

Resize AWS LVM volume

· 52CE 我爱测

I have successfully increased the space on AWS EBS volume. # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 64G 0 disk ├─nvme0n1p1 259:1 0 63.9G 0 part / ├─nvme0n1p14 259:2 0 3M 0 part └─nvme0n1p15 259:3 0 124M 0 p…

问题原文

原帖链接 · b4d · CC BY-SA 4.0

I have successfully increased the space on AWS EBS volume.

# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
nvme0n1      259:0    0   64G  0 disk 
├─nvme0n1p1  259:1    0 63.9G  0 part /
├─nvme0n1p14 259:2    0    3M  0 part 
└─nvme0n1p15 259:3    0  124M  0 part /boot/efi
nvme1n1      259:4    0    2T  0 disk 
└─main-var   254:0    0  996G  0 lvm  /var

How can I add the 1T on nvme1n1 to main-var lvm?

已采纳解答

原帖链接 · exeral · CC BY-SA 4.0

Show the current situation:

lsblk
pvs
df -h

Tell LVM to extend to the full size of the physical device:

pvresize /dev/nvme1n1

Show again to see changes:

pvs

Now you see PFree has increased:

vgs

VFree should have also increased. Extend your volume so it uses that space:

lvextend -L +1T /dev/vgname/lvname

Show the new volume size:

lvs

Now you have to resize your filesystem with either resize2fs, xfs_growfs, etc utility.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-12-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。