Изменение размера диска в Linux без потери данных — различия между версиями
Материал из База знаний
Admin (обсуждение | вклад) (Новая страница: «category:Linux '''Изменение размера диска в Linux без потери данных''' '''Primary разделы:''' Run parted on you…») |
Admin (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
[[category:Linux]] | [[category:Linux]] | ||
'''Изменение размера диска в Linux без потери данных''' | '''Изменение размера диска в Linux без потери данных''' | ||
+ | |||
+ | Схожая статья: [[Увеличение_диска_в_CentOS_на_ESXi|Увеличение диска в CentOS на ESXi]] | ||
'''Primary разделы:''' | '''Primary разделы:''' |
Текущая версия на 11:55, 12 мая 2016
Изменение размера диска в 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