Welcome to fdisk (util-linux 2.37.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea. It's recommended to umount all file systems, and swapoff all swap partitions on this disk.
Command (m for help): m
Help:
GPT M enter protective/hybrid MBR
Generic d delete a partition F list free unpartitioned space l list known partition types n add a new partition p print the partition table t change a partition type v verify the partition table i print information about a partition
Misc m print this menu x extra functionality (experts only)
Script I load disk layout from sfdisk script file O dump disk layout to sfdisk script file
Save & Exit w write table to disk and exit q quit without saving changes
Create a new label g create a new empty GPT partition table G create a new empty SGI (IRIX) partition table o create a new empty DOS partition table s create a new empty Sun partition table
Command (m for help): p Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors Disk model: VMware Virtual S Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 14A69C2D-E6FB-4626-A7E6-10A16A052F8D
Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 1054719 1050624 513M EFI System /dev/sda3 1054720 104855551 103800832 49.5G Linux filesystem
Command (m for help): d Partition number (1-3, default 3): 3
Partition 3 has been deleted.
Command (m for help): p Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors Disk model: VMware Virtual S Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 14A69C2D-E6FB-4626-A7E6-10A16A052F8D
Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 1054719 1050624 513M EFI System
Command (m for help): n Partition number (3-128, default 3): First sector (1054720-209715166, default 1054720): 1054720 Last sector, +/-sectors or +/-size{K,M,G,T,P} (1054720-209715166, default 209715166):
Created a new partition 3 of type 'Linux filesystem' and of size 99.5 GiB. Partition #3 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 The partition table has been altered. Syncing disks.
root@lunar-virtual-machine:~/workspace# resize2fs /dev/sda resize2fs 1.46.5 (30-Dec-2021) resize2fs: Device or resource busy while trying to open /dev/sda Couldn't find valid filesystem superblock. root@lunar-virtual-machine:~/workspace# resize2fs /dev/sda3 resize2fs 1.46.5 (30-Dec-2021) Filesystem at /dev/sda3 is mounted on /; on-line resizing required old_desc_blocks = 7, new_desc_blocks = 13 The filesystem on /dev/sda3 is now 26082555 (4k) blocks long.