mirror of
https://git.reisber.space/Reisber/Personal
synced 2026-04-11 10:23:06 +00:00
Добавить NEBULA/resize_of_image.md
Signed-off-by: Reisber <admin@reisber.space>
This commit is contained in:
25
NEBULA/resize_of_image.md
Normal file
25
NEBULA/resize_of_image.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
### После запуска ВМ( с уже изменнёным по размеру диску в небуле )
|
||||||
|
Идём на саму ВМ
|
||||||
|
В ней
|
||||||
|
```
|
||||||
|
swapoff -a
|
||||||
|
```
|
||||||
|
Удаляем все разделы кроме /
|
||||||
|
```
|
||||||
|
d #номер раздела
|
||||||
|
w
|
||||||
|
|
||||||
|
```
|
||||||
|
Потом, когда у нас остался только основной раздел
|
||||||
|
```
|
||||||
|
apt install cloud-guest-utils -y
|
||||||
|
growpart /dev/sda №
|
||||||
|
resize2fs /dev/sda №
|
||||||
|
```
|
||||||
|
И вернём SWAP
|
||||||
|
```
|
||||||
|
fallocate -l 1G /swapfile
|
||||||
|
chmod 600 /swapfile
|
||||||
|
mkswap /swapfile
|
||||||
|
swapon /swapfile
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user