I use parted in a script. For that reason I need parted to always use the same unit. Otherwise I am not able to do reasonable calculations.
In this example parted mixes KB and GB:
pcsyn-038 user # parted -l
Model: ATA ST9250315AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 21,5GB 21,5GB primary ext4
3 21,5GB 248GB 226GB primary ext4
2 248GB 250GB 2147MB primary linux-swap(v1)
This does not have any effect on the output:
parted /dev/sda unit MB
According to parted(1), unit can be one of:
e.g: