Quantcast
Channel: Active questions tagged partition - Server Fault
Viewing all articles
Browse latest Browse all 68

Shrink partition to exactly fit the underlying filesystem size

$
0
0

Recently i shrinked an ext4 filesystem size to 500GB

df -hFilesystem      Size  Used Avail Use% Mounted on/dev/sda2       493G   64G  404G  14% /

now i want to shrink the partition size to fit exactly to the filesystem size.

I tried to used parted and the resizepart command. The problem is when parted asks for the new size. If i choose 500GB the resulting partition is smaller from 500GB and as a result the underlying filesystem cannot fit on this partition. Any hint on how to do the correct size calculations?


Viewing all articles
Browse latest Browse all 68

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>