E
E
Evgeny Ivanovich2019-12-10 16:08:47
CentOS
Evgeny Ivanovich, 2019-12-10 16:08:47

Is it possible to resize root via ssh connection?

Basically, the question is in the title.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Fedoseev, 2019-12-10
@martin74ua

Turn on telepathy.
Do you mean resize the root partition?
Yes, it's possible. But details are possible, it is necessary to look in a specific case.
If you have LVM, then everything is much simpler

A
alex1478, 2019-12-10
@alex1478

With lvm, you can only increase on the fly, you cannot decrease it, you need to unmount it.
If the RAM allows you to have free ~ 1G, you can put the system with lvm and ssh in tmpfs, chroot into it, run ssh, connect through it, programmatically distort the disk, determine vg and reduce the required lv. Then a forced reboot via sysrq and everything should be ok.
Well, yes, before starting work, you need to stop all programs that write to the disk and do sunc.
There is another option with pivot_root, but I can’t help with it, I haven’t used it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question