# parted resize

## syn0ptik

hello,

When I do resize, parted 3.1 sais so command not found.

```
(parted) help                                                             

  align-check TYPE N                        check partition N for TYPE(min|opt) alignment

  help [COMMAND]                           print general help, or help on COMMAND

  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)

  mkpart PART-TYPE [FS-TYPE] START END     make a partition

  name NUMBER NAME                         name partition NUMBER as NAME

  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular

        partition

  quit                                     exit program

  rescue START END                         rescue a lost partition near START and END

  rm NUMBER                                delete partition NUMBER

  select DEVICE                            choose the device to edit

  disk_set FLAG STATE                      change the FLAG on selected device

  disk_toggle [FLAG]                       toggle the state of FLAG on selected device

  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER

  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER

  unit UNIT                                set the default unit to UNIT

  version                                  display the version number and copyright information of GNU Parted

(parted)                           
```

how should I make resize a partition and make free zone partition size?

My partition xfs and ext4 fielsystems formated.Last edited by syn0ptik on Mon Jun 01, 2015 6:32 am; edited 1 time in total

----------

## eccerr0r

Odd... did not sure what happened here with parted 3.1...

http://www.gnu.org/software/parted/manual/parted.html#Command-explanations

----------

## syn0ptik

hello,

I still need this, but I can't found resize or resizepart in 3.1 version.

in the early version I did:

 *Quote:*   

> # parted  /dev/VG/gitlab
> 
> GNU Parted 2.1
> 
> Using /dev/dm-33
> ...

 

----------

## frostschutz

You could just grow a partition manually, by creating a partition with the same start sector.

```

(parted) unit s                                                           

(parted) print free                                                       

Model: Loopback device (loopback)

Disk /dev/loop0: 16777216s

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Disk Flags: 

Number  Start     End        Size       File system  Name     Flags

        34s       55295s     55262s     Free Space

 1      55296s    2957311s   2902016s                primary

        2957312s  16777182s  13819871s  Free Space

(parted) rm 1                                                             

(parted) mkpart primary 55296s 16777182s                                  

```

And then follow it up with resize2fs or whatever.

When shrinking a partition, you resize2fs first and then create the smaller partition.

----------

## s4e8

resize, mkfs and all fs related functionality removed since parted 3.0. The resizepart command added on parted 3.2

----------

