P
P
pixik2015-10-27 09:29:28
linux
pixik, 2015-10-27 09:29:28

How to reliably increase the size of root in linux?

Good time, comrades!
Today, at work, the axis congratulated me with a good morning and said that there was almost no space left in the "/". I would not ask stupid questions if the computer was at home and the collapse of the system did not entail recovery time. On it I want to consult, how the most reliable way to increase "/"?
I know it's googled and the topic is very popular, but again, working time is very expensive.
There is room to expand.

$ fdisk -l /dev/sda

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0009139b

Device     Boot      Start        End   Sectors   Size Id Type
/dev/sda1  *          2048     206847    204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2           206848  204802047 204595200  97.6G  7 HPFS/NTFS/exFAT
/dev/sda3        204802048 1024002047 819200000 390.6G  7 HPFS/NTFS/exFAT
/dev/sda4       1024002048 1953523711 929521664 443.2G  5 Extended
/dev/sda5       1024004096 1025028095   1024000   500M 83 Linux
/dev/sda6       1025030144 1040234495  15204352   7.3G 82 Linux swap / Solaris
/dev/sda7       1040236544 1145094143 104857600    50G 83 Linux
/dev/sda8       1145096192 1953523711 808427520 385.5G 83 Linux

There is an unnecessary Windows on the sda[1-3] partitions. It can be demolished and it's great to increase the size of the disk.
Thanks everyone! Happy code!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Max, 2015-10-27
@MaxDukov

if it's quick, without rebooting and clogged with logs - create a new partition and mount /var/log/ in place

N
nikolayvaganov, 2015-10-27
@nikolayvaganov

Using fdisk, you kill partitions, then create a new partition and mount it to a directory where many files are stored. I'm making money in ext in no way to change the size.

S
Slava Kryvel, 2015-10-27
@kryvel

and if you kill NTFS partitions and free up space, then create a Linux partition there (83) equal to the "/" partition and dd if=/dev/sda7 of=/dev/sda1 ?
All this can be done on a live system, then just change the UUID in fstab and grub.cfg and reboot.

A
abcd0x00, 2015-10-28
@abcd0x00

I have music, video, games, virtual machines placed on separate logical partitions that are mounted in / mnt at boot, and symbolic links to directories already lead there.
So you can free up space without rebooting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question