This discussion is archived
2 Replies Latest reply: Aug 30, 2012 1:25 PM by Dude! RSS

Units in parted utility

Dude! Guru
Currently Being Moderated
Using Oracle Linux 6.3 (x86_64) I see the following output:

<pre>
# parted -s /dev/sda print
1 1049kB 525MB 524MB primary ext4 boot
2 525MB 21.5GB 20.9GB primary lvm

# parted -s /dev/sda unit gb print
1 0.00GB 0.53GB 0.52GB primary ext4 boot
2 0.53GB 21.5GB 20.9GB primary lvm

# parted -s /dev/sda unit mb print
1 1.05MB 525MB 524MB primary ext4 boot
2 525MB 21475MB 20949MB primary lvm
</pre>

It looks to me as parted is using 1 GB = 1000 MB. If it was using 1024 MB, which seems more natural to me, I think output should be different:

21475MB should read 22016MB and 0.53GB should be 0.51GB.

So I'd say parted uses 1 GB = 1000 MB and rounds up or down, hopefully 0.45 = 0.5. Am I seeing this wrong?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points