Extend a partition hot on Linux with fdisk
fr:Étendre une partition à chaud sur Linux avec fdisk
en:Extend a partition hot on Linux with fdisk
es:Extender una partición caliente en Linux con fdisk
pt:Estender uma partição quente no Linux com fdisk
it:Estendere una partizione calda su Linux con fdisk
nl:Een warm op Linux met fdisk partitie uitbreiden
de:Erweitern einer Partition mit Fdisk unter Linux heißen
zh:扩展分区在 Linux 上用 fdisk 热
ar:توسيع قسم ساخنة على لينكس مع fdisk
ja:熱い Linux の fdisk を使ってパーティションを拡張します。
pl:Rozszerzyć partycji gorąco na Linux z fdisk
ru:Расширение раздела горячей на Linux с помощью fdisk
ro:Extinderea unei partiții fierbinte pe Linux cu fdisk
he:להרחיב מחיצת חם על לינוקס עם fdisk
This article has been created by an automatic translation software. You can view the article source here.
/!\ ATTENTION: Il est conseillé de faire des backups de vos données avant toutes modifications /!\
/!\ ATTENTION: Il est conseillé de faire des backups de vos données avant toutes modifications /!\
Introduction
In this article you will see how to extend a partition hot on Linux with fdisk.
Context
In our case, we will have a partition mounted on /var, named /dev/xvdb1 who does 10GB
We would like to extend this partition to the maximum (xvdb made 20GB)
Place
Disassembly of the partition
In order to make any changes on a partition, he must take it apart.
The command to unmount our partition is:
umount /dev/xvdb1
Please close the process on this score as well as open files with their programs or related it users:
Process:
fuser -kmiuv /dev/xvdb1
Open files:
lsof | grep /var
Partitioning
Type the command:
fdisk
Choose the disk on which is the partition to extend:
fdisk /dev/xvdb
/!\ Étape très importante /!\
Tapez
p
Afin de noter le cylindre de début de la partition, ici 2048.
Enter this option to delete the partition in the partition table, this does not erase the data on the disc:
d
Then enter the number of the partition to delete.
Then enter this option to create a new partition:
n
Enter the number that you noted above for the First sector and the default number for the Last sector (If you want to extend it to the maximum)
If everything went well spent so far, we will save the new table of partitions with this option:
w
Restart:
reboot
It remains more to extend the filesystem with the command:
resize2fs /dev/xvdb1
Enable comment auto-refresher