I have /usr
on a separate partition. At the moment, this is how the server is set up:
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 4.9G 329M 4.6G 7% /
devtmpfs 366M 0 366M 0% /dev
tmpfs 372M 0 372M 0% /dev/shm
tmpfs 372M 5.0M 367M 2% /run
tmpfs 372M 0 372M 0% /sys/fs/cgroup
/dev/sda5 997M 871M 127M 88% /usr
/dev/sda1 9.8G 33M 9.8G 1% /home
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 9.8G 0 part /home
├─sda2 8:2 0 4.9G 0 part /
├─sda3 8:3 0 1.5G 0 part [SWAP]
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 1000M 0 part /usr
sr0 11:0 1 1024M 0 rom
while running a yum update
a few minutes back, I encountered the following error:
installing package swig-2.0.10-4.el7.x86_64 needs 397MB on the /usr filesystem
installing package diffstat-1.57-4.el7.x86_64 needs 397MB on the /usr filesystem
installing package rcs-5.9.0-5.el7.x86_64 needs 398MB on the /usr filesystem
installing package byacc-1.9.20130304-3.el7.x86_64 needs 398MB on the /usr filesystem
installing package ctags-5.8-13.el7.x86_64 needs 399MB on the /usr filesystem
installing package indent-2.2.11-13.el7.x86_64 needs 399MB on the /usr filesystem
Error Summary
-------------
Disk Requirements:
At least 399MB more space needed on the /usr filesystem.
At the moment, I'm thinking of reducing the size of /home
and allot that to /usr
(which is under /dev/sda5
). Since this isn't LVM-based, how would I go about reducing the size of /home
(by say 1G) and allot it to /usr
without deleting either partition?