extend hdd in linux with command


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

文章作者: xyzz
文章链接: http://www.xyzzpwn.top
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 xyzz !
 上一篇
nextcloud nextcloud
sudo yum install -y yum-utils device-mapper-persistent-data lvm2; sudo yum-config-manager --add-repo https://download.d
2019-09-26
下一篇 
repair grub repair grub
way 1failed~ sudo su mount /dev/sda5 /mnt mount --bind /dev /mnt/dev mount --bind /dev/pts /mnt/dev/pts mount --bind /p
2019-09-20
  目录