command
df -lh
fdisk /dev/sda
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
GPT PMBR size mismatch (251658239 != 838860799) will be corrected by w(rite).
GPT PMBR size mismatch (251658239 != 838860799) will be corrected by w(rite).
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition number (2-128, default 2): 1
Value out of range.
Partition number (2-128, default 2): 2
First sector (4096-838860766, default 4096):
Last sector, +sectors or +size{K,M,G,T,P} (4096-838860766, default 838860766):
Created a new partition 2 of type 'Linux filesystem' and of size 400 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: y
The signature will be removed by a write command.
Command (m for help): w
GPT PMBR size mismatch (251658239 != 838860799) will be corrected by w(rite).
The partition table has been altered.
Syncing disks.
reboot
resize2fs -f /dev/sda1
df -h