Particionamento no Linux com parted

2

Estou tentando criar uma nova partição no Linux com parted. Eu começo parted como abaixo.

# parted -a optimal /dev/sda

Abaixo está a tabela de partições atual.

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  211MB   210MB   primary   ext4            boot
 2      211MB   10.7GB  10.5GB  primary   ext4
 3      10.7GB  15.9GB  5243MB  primary   linux-swap(v1)
 4      15.9GB  150GB   134GB   extended                  lba

Estou recebendo o aviso abaixo ao criar a partição.

(parted) mkpart extended 10957 149504
Warning: You requested a partition from 11.0GB to 150GB.
The closest location we can manage is 15.9GB to 150GB.
Is this still acceptable to you?
Yes/No? yes
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
(parted) mkpart logical ext4 10957 149504
Warning: You requested a partition from 11.0GB to 150GB.
The closest location we can manage is 15.9GB to 150GB.
Is this still acceptable to you?
Yes/No? yes
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel?

Por que o parted não está usando o alinhamento ideal. Ajuda é muito apreciada.

    
por Indika K 21.06.2012 / 13:39

1 resposta

1

Tente desta maneira:

[root@localhost ~]# fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
First cylinder (2905-10011, default 2905): 
Using default value 2905
Last cylinder, +cylinders or +size{K,M,G} (2905-10011, default 10011): +20M

Command (m for help): t
Partition number (1-6): 6
Hex code (type L to list codes): 83

Command (m for help): p

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001501c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26        2637    20971520   83  Linux
/dev/sda3            2637        2898     2097152   82  Linux swap / Solaris
/dev/sda4            2898       10011    57138861+   5  Extended
/dev/sda5            2898        2904       51852+  83  Linux
/dev/sda6            2905        2908       32098+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Onde:

  • sda é seu disco rígido

  • n significa adicionar uma nova partição

  • t significa alterar o ID do sistema de uma partição

  • p significa imprimir a tabela de partições

  • w significa escrever tabela no disco e sair

por 21.06.2012 / 14:22