Created
June 14, 2018 19:57
-
-
Save csamsel/a6bd13b0963bcdf2eaf34eea27632a4a to your computer and use it in GitHub Desktop.
resize ext4 root partition in ubuntu under ESXi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# parted /dev/sda | |
GNU Parted 3.2 | |
Using /dev/sda | |
Welcome to GNU Parted! Type 'help' to view a list of commands. | |
(parted) rm 3 | |
(parted) p | |
Model: VMware Virtual disk (scsi) | |
Disk /dev/sda: 32.2GB | |
Sector size (logical/physical): 512B/512B | |
Partition Table: gpt | |
Disk Flags: | |
Number Start End Size File system Name Flags | |
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp | |
2 538MB 12.9GB 12.3GB ext4 | |
(parted) resizepart | |
Partition number? 2 | |
Warning: Partition /dev/sda2 is being used. Are you sure you want to continue? | |
Yes/No? yes | |
End? [12.9GB]? 28GB | |
(parted) p | |
Model: VMware Virtual disk (scsi) | |
Disk /dev/sda: 32.2GB | |
Sector size (logical/physical): 512B/512B | |
Partition Table: gpt | |
Disk Flags: | |
Number Start End Size File system Name Flags | |
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp | |
2 538MB 28.0GB 27.5GB ext4 | |
(parted) quit | |
Information: You may need to update /etc/fstab. | |
root@unifi:~# resize2fs /dev/sda2 | |
resize2fs 1.44.1 (24-Mar-2018) | |
Filesystem at /dev/sda2 is mounted on /; on-line resizing required | |
old_desc_blocks = 1, new_desc_blocks = 2 | |
The filesystem on /dev/sda2 is now 6704609 (4k) blocks long. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got error: