RE: Command line partition manipulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Karanbir Singh wrote:
> Plant, Dean wrote:
>> Is there a way to use a non-interactive command to create the new 2nd
>> partition in the free space?
> 
> parted works well for such situations, and if python is your thing,
> pyparted is already included in the distro.
> 
Sorry, I should have worded my first email better.

I know there are command line tools like fdisk, sfdisk and parted.

I am trying to script the creation of a partition in the free space of a
disk without knowing the exact structure of the disk. Parted seems to
want to know the exact layout you want to create

>From the man page 

mkpart part-type [fs-type] start end

But the script will not know the start or the end point.

Something similar to what I am trying to achieve is described here
http://ubuntuforums.org/showthread.php?p=5435429

They seem to be creating a single partition the size of the disk without
specifying the exact sizes.

# parted /dev/${i} --script -- mkpart primary 0 -1

Similar to this, I want to create a partition without knowing the exact
start or end point but im not interested in that, I just want to use the
free space.

Hope this is clearer.

Thanks

Dean.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux