parted command query

General support questions
Post Reply
knzzz
Posts: 145
Joined: 2017/02/25 12:41:42

parted command query

Post by knzzz » 2020/05/20 13:47:55

Hi All,

When i tried to created disc partion using parted command out of 300 GB i got only 278GB so if i need to use entire 300GB means , what
step i need to follow.

how i did
1.parted /dev/sda
(parted) mklabel gpt

(parted)mkpart primary 0 300GB
i ignored the warning the resulting partition is not properly aligned

(parted) print

(parted) quit

Regards
kanna

User avatar
TrevorH
Forum Moderator
Posts: 28594
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: parted command query

Post by TrevorH » 2020/05/20 13:50:13

278GB = 278 * 1024 * 1024 * 1024 = 298500227072 which is pretty nearly 300.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 2807
Joined: 2007/12/11 08:17:33
Location: Finland

Re: parted command query

Post by jlehtone » 2020/05/20 14:11:07

Parted seems to default to 10-based numbers, but can use 2-based units too:

Code: Select all

(parted) print
(parted) unit GiB
(parted) print
(parted) unit GB
(parted) print

Post Reply

Return to “CentOS 7 - General Support”