aws NVME 磁盘 在线扩容

Posted flytoyou

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了aws NVME 磁盘 在线扩容相关的知识,希望对你有一定的参考价值。

[root@ip-172-31-47-102 ~]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0   60G  0 disk 
├─nvme0n1p1 259:1    0    1M  0 part 
├─nvme0n1p2 259:2    0  500M  0 part /boot
└─nvme0n1p3 259:3    0 39.5G  0 part /
[root@ip-172-31-47-102 ~]# 
[root@ip-172-31-47-102 ~]# 
[root@ip-172-31-47-102 ~]# growpart /dev/nvme0n1 3
CHANGED: partition=3 start=1028096 old: size=82857950 end=83886046 new: size=124800990 end=125829086
[root@ip-172-31-47-102 ~]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0   60G  0 disk 
├─nvme0n1p1 259:1    0    1M  0 part 
├─nvme0n1p2 259:2    0  500M  0 part /boot
└─nvme0n1p3 259:3    0 59.5G  0 part /

[root@ip-172-31-47-102 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  113M  1.8G   6% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/nvme0n1p3   40G  2.0G   38G   5% /
/dev/nvme0n1p2  497M  128M  370M  26% /boot
overlay          40G  2.0G   38G   5% /var/lib/docker/overlay2/902603559b2b34131d64ca6fd5810fc595f530afa385dd8f357bb1901871a1a9/merged
shm              64M     0   64M   0% /var/lib/docker/containers/83d937e3ba9a9b7939afbead689381666e32fb7d1e33f03a16ff8cd1b695bf30/shm
overlay          40G  2.0G   38G   5% /var/lib/docker/overlay2/5649a4838e364be57d2553838bb0a6aa76f7c853e5f319cbd36f6bf19152c715/merged
shm              64M     0   64M   0% /var/lib/docker/containers/04ac46b05f3a073e7e05f8676dc698488cf2f87722d9df7d526417812680cc08/shm
tmpfs           390M     0  390M   0% /run/user/0

[root@ip-172-31-47-102 ~]# xfs_growfs /dev/nvme0n1p3 
meta-data=/dev/nvme0n1p3         isize=512    agcount=17, agsize=623168 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=10357243, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               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 10357243 to 15600123
[root@ip-172-31-47-102 ~]# 
[root@ip-172-31-47-102 ~]# 
[root@ip-172-31-47-102 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  113M  1.8G   6% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/nvme0n1p3   60G  2.0G   58G   4% /
/dev/nvme0n1p2  497M  128M  370M  26% /boot
overlay          60G  2.0G   58G   4% /var/lib/docker/overlay2/902603559b2b34131d64ca6fd5810fc595f530afa385dd8f357bb1901871a1a9/merged
shm              64M     0   64M   0% /var/lib/docker/containers/83d937e3ba9a9b7939afbead689381666e32fb7d1e33f03a16ff8cd1b695bf30/shm
overlay          60G  2.0G   58G   4% /var/lib/docker/overlay2/5649a4838e364be57d2553838bb0a6aa76f7c853e5f319cbd36f6bf19152c715/merged
shm              64M     0   64M   0% /var/lib/docker/containers/04ac46b05f3a073e7e05f8676dc698488cf2f87722d9df7d526417812680cc08/shm
tmpfs           390M     0  390M   0% /run/user/0

以上是关于aws NVME 磁盘 在线扩容的主要内容,如果未能解决你的问题,请参考以下文章

Linux 扩容根目录

关于AWS上磁盘扩容

超大磁盘在线扩容

阿里云ECS磁盘扩容(系统盘在线扩容,不重启)

LINUX虚拟机磁盘在线扩容不重启

qcow2 磁盘在线扩容方法