NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 64G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 2G 0 part /boot
└─sda3 8:3 0 30G 0 part
└─ubuntu--vg-ubuntu--lv 252:0 0 30G 0 lvm /
sr0 11:0 1 1024M 0 rom
2. 調整硬碟大小
sudo fdisk /dev/sda
Command (m forhelp): p
Device Start End Sectors Size Type
/dev/sda1 204840952048 1M BIOS boot
/dev/sda2 409641983994194304 2G Linux filesystem
/dev/sda3 41984006710883062910431 30G Linux filesystem
Command (m forhelp): d
Partition number (1-3, default 3):
Partition 3 has been deleted.
Command (m forhelp): n
Partition number (3-128, default 3):
First sector (3719168-46137310, default 3719168):
Last sector, +/-sectors or +/-size{K,M,G,T,P}(3719168-46137310, default 46135295):
Created a new partition 3 of type'Linux filesystem' and of size 62 GiB.
Partition #3 contains a LVM2_member signature.
Do you want to remove the signature? [Y]es/[N]o: N
Command (m forhelp): p
Device Start End Sectors Size Type
/dev/sda1 204840952048 1M BIOS boot
/dev/sda2 409641983994194304 2G Linux filesystem
/dev/sda3 4198400124217694130019295 62G Linux filesystem
Command (m forhelp): w
The partition table has been altered.
Syncing disks.