Computer How To How To, Tutorial, Example, Review


Example of using parted mkpart

August 13, 2011 by Computer

Parted is a partitioning tool in linux that can be used to make partitions that are larger than 2TB in size. It is similar to fdisk, but uses gpt to extend past the 2TB limitation. First install the “parted” tool. If you are in centos this can be done using yum. Then invoke the parted command, specifying the device to partition, as noted in the mkpart example below.

[root@computer ~]# parted /dev/sdb
(parted) mkpart
Partition type?  primary/extended? primary
File system type?  [ext2]? ext3
Start? 0
End? -1

Additionally, it is also possible to perform the same task in one command, as follows:

(parted) mkpart /dev/sdb1 0 -1

Notice how in the examples above one can specify “-1″ as the end point. This is short hand for the last usable section on the disk. It is convenient to not have to perform specific calculation and conversion to utilize some disk size.

Parted is a useful tool in linux that can make partitioning large partitions easily.

No comments yet.

RSS feed for comments on this post.

Leave a comment

The field of computers is very vast and can somtimes be extremely challenging, but also very rewarding. One will often times encounter problems that they may not have the answer to. Problems don't always have solutions, but sometimes they do. And helpting to provide some of those solutions is our mission. It is our goal to provide helpful computer how to, tutorial, example, and review for the benefit of everyone.

Some funny jokes...
"Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You.ll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end."

"Once upon a time there was a DOS user who saw Unix, and saw that it was good. After typing cp on his DOS machine at home, he downloaded GNU's unix tools ported to DOS and installed them. He rm'd, cp'd, and mv'd happily for many days, and upon finding elvis, he vi'd and was happy. After a long day at work (on a Unix box) he came home, started editing a file, and couldn't figure out why he couldn't suspend vi (w/ ctrl-z) to do a compile."

Terms and Disclaimer