Oracle Linux – How to Change /var Partition to a New Disk
Applies To:
Linux OS – Version Oracle Linux 7.0 to Oracle Linux 9.0 [Release OL7 to OL9]
Linux x86_64 on Oracle Public Cloud
Goal:
Move /var partition to a new disk to avoid running out of space due big logs from 3rd=party software.
Symptoms:
[root@<HOSTNAME> ~]# df -hP | grep root /dev/mapper/ocivolume-root 36G 35G 1.2G 97% /
There was a 3rd-party software with more than 18GiB of logs inside /var
(not shown here).
Solution:
Before following these steps make sure there is a full and working backup in case anything goes wrong.
- Create a new Block Volume of at least 50GiB.
- Attach this Block Volume to the instance selecting "Paravirtualized". DO NOT select ISCSI as this won't work.
Tagged:
0