Изменение размера диска в Linux без потери данных
Материал из База знаний
Изменение размера диска в Linux без потери данных
Схожая статья: Увеличение диска в CentOS на ESXi
Primary разделы:
Run parted on your device:
parted /dev/sdX
Change display unit to sectors: unit s Print current partition table and note the start sector for your partition: p Delete your partition (won't delete the data or filesystem): rm <number> Recreate the partition with the starting sector from above: mkpart primary <start> <end> Exit parted: quit
Check the filesystem:
sudo e2fsck -f /dev/sdXX
Resize filesystem:
sudo resize2fs /dev/sdXX
Extendet разделы:
Run parted on your device:
parted /dev/sdX
Change display unit to sectors: unit s Print current partition table and note the start sector for your partition: p Resize extendet partition: resize <number> <start> <end> Print current partition table and note the start sector for your partition: p Delete your partition (won't delete the data or filesystem): rm <number> Recreate the partition with the starting sector from above: mkpart logicat <start> <end> Exit parted: quit
Check the filesystem:
sudo e2fsck -f /dev/sdXX
Resize filesystem:
sudo resize2fs /dev/sdXX