ubuntu 根分区逻辑卷扩容

Ubuntu虚拟机磁盘扩容操作指南

1、虚拟机关机通过管理界面给磁盘扩容。

root@curtis:/home/curtis/git_code# pvdisplay
  --- Physical volume ---
  PV Name               /dev/vda3
  VG Name               ubuntu-vg
  PV Size               <239.00 GiB / not usable 0
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              61183
  Free PE               0
  Allocated PE          61183
  PV UUID               WoCzb3-a3jy-yV23-gOau-UeiA-K62x-petsV2

2、虚拟机启动之后查看磁盘容量,并且使用gparted更新分区表。

root@curtis:~# lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                        11:0    1 1024M  0 rom
vda                       252:0    0  512G  0 disk
├─vda1                    252:1    0    1M  0 part
├─vda2                    252:2    0    1G  0 part /boot
└─vda3                    252:3    0  239G  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0  239G  0 lvm  /

root@curtis:~# parted /dev/vda
GNU Parted 3.2
Using /dev/vda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Warning: Not all of the space available to /dev/vda appears to be used, you can fix the GPT to use all of the space (an extra 570425344 blocks) or continue with
the current setting?
Fix/Ignore? Fix
Model: Virtio Block Device 
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值