Good afternoon! I am attempting to shrink an ext4 partition and I have found many tutorials online to achieve this, however, when implementing the actual changes, resize2fs is telling me wrong information! Here is the scenario:
# parted -s /dev/sdb unit GB print
Model: Hitachi HTS725050A7E630 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 0.00GB 0.64GB 0.64GB primary ext2 boot
2 0.64GB 500GB 499GB primary ext4
Now I am trying to first reduce the filesystem by 30GB:
# resize2fs /dev/sdb2 469G
resize2fs 1.42.13 (17-May-2015)
The containing partition (or device) is only 121940394 (4k) blocks.
You requested a new size of 122945536 blocks.
The partition is not mounted and as you can see from the output, I am actually taking 30GB off the total size (499 - 30 = 469). How is this possible when I am applying a unit (GB in this case)? Am I missing something?