Environment
Novell Open Enterprise Server 1 (OES 1)
Novell Open Enterprise Server 2 (OES 2)
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 9
Novell Open Enterprise Server 2 (OES 2)
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 9
Situation
The server hangs, applications may not start or hang, or network connections are lost.
#==[ Command ]======================================#
# /bin/df -h vvvv
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 13G 13G 0.0G 100% /
/dev/sales/south 500G 482G 18G 96% /ssales
/dev/sales/north 300G 246G 54G 82% /nsales
/dev/disk/by-name/38928374928732983000-part1
10.5G 10.2G 0.2G 98% /local
udev 1.5G 176K 1.5G 1% /dev
/dev/sda5 35G 9.2G 25G 27% /shared
/dev/sr0 545M 545M 0 100% /media/GRTMUPD_EN
^^^^
You observe some file systems are out of disk space.
#==[ Command ]======================================#
# /bin/df -h vvvv
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 13G 13G 0.0G 100% /
/dev/sales/south 500G 482G 18G 96% /ssales
/dev/sales/north 300G 246G 54G 82% /nsales
/dev/disk/by-name/38928374928732983000-part1
10.5G 10.2G 0.2G 98% /local
udev 1.5G 176K 1.5G 1% /dev
/dev/sda5 35G 9.2G 25G 27% /shared
/dev/sr0 545M 545M 0 100% /media/GRTMUPD_EN
^^^^
You observe some file systems are out of disk space.
Resolution
It is never good to run out of disk space. It is particularly bad when you run out of space on /, /tmp or /home.
If you run out of space on a data volume, a volume other than the system disk, just delete files until you free up enough space to continue. You might consider installing more disk space with Linux Volume Management and move your data volumes under LVM control. This will allow you to add disk space easily as the need arises.
Running out of space on /tmp or /home may cause applications to hang, core dump or not start at all. This is because /tmp and /home are popular places to write temporary files and data needed for normal operation. Delete files until you free up enough disk space to continue running normally. Consider switching to LVM in case you need to add disk space in the future.
Running out of space on root "/" can cause serious service interruption. If the server is hung or nonoperational, you need to boot into rescue mode from CD1 of the installation media, mount the root partition manually, free up some disk space and reboot.
Configure the server to automatically clean up old files in temporary directories, such as /tmp and /var/tmp. It is not intended for static files to remain in these directories. You can enable cron to clean them up automatically. For example, if you wanted to delete all files in /tmp and /var/tmp that have not been accessed for 30 days, make the following changes to /etc/sysconfig/cron.
Change from this:
MAX_DAYS_IN_TMP="0"
MAX_DAYS_IN_LONG_TMP="0"
LONG_TMP_DIRS_TO_CLEAR=""
to this:
MAX_DAYS_IN_TMP="30"
MAX_DAYS_IN_LONG_TMP="30"
LONG_TMP_DIRS_TO_CLEAR="/var/tmp"
Save and exit. The /tmp and /var/tmp directories will now be checked daily for old files that have not been accessed. If you have additional directories that you want monitored, you can add them to the LONG_TMP_DIRS_TO_CLEAR list.
If you run out of space on a data volume, a volume other than the system disk, just delete files until you free up enough space to continue. You might consider installing more disk space with Linux Volume Management and move your data volumes under LVM control. This will allow you to add disk space easily as the need arises.
Running out of space on /tmp or /home may cause applications to hang, core dump or not start at all. This is because /tmp and /home are popular places to write temporary files and data needed for normal operation. Delete files until you free up enough disk space to continue running normally. Consider switching to LVM in case you need to add disk space in the future.
Running out of space on root "/" can cause serious service interruption. If the server is hung or nonoperational, you need to boot into rescue mode from CD1 of the installation media, mount the root partition manually, free up some disk space and reboot.
Configure the server to automatically clean up old files in temporary directories, such as /tmp and /var/tmp. It is not intended for static files to remain in these directories. You can enable cron to clean them up automatically. For example, if you wanted to delete all files in /tmp and /var/tmp that have not been accessed for 30 days, make the following changes to /etc/sysconfig/cron.
Change from this:
MAX_DAYS_IN_TMP="0"
MAX_DAYS_IN_LONG_TMP="0"
LONG_TMP_DIRS_TO_CLEAR=""
to this:
MAX_DAYS_IN_TMP="30"
MAX_DAYS_IN_LONG_TMP="30"
LONG_TMP_DIRS_TO_CLEAR="/var/tmp"
Save and exit. The /tmp and /var/tmp directories will now be checked daily for old files that have not been accessed. If you have additional directories that you want monitored, you can add them to the LONG_TMP_DIRS_TO_CLEAR list.
Additional Information
Useful commands to resolve low disk-space issues:
Use the "find" command:
Example: To identify large files that may no longer be needed on / (root ) use: "find / -type f -size +1G" (as root user) to identify files 1G or larger. Delete them if possible. If not sure...back them up somewhere else first. Continue with cleanup by modifying the last parameter to identify smaller files that can be removed. i.e.: "find / -type f -size +500M"
Use the "find" command:
Example: To identify large files that may no longer be needed on / (root ) use: "find / -type f -size +1G" (as root user) to identify files 1G or larger. Delete them if possible. If not sure...back them up somewhere else first. Continue with cleanup by modifying the last parameter to identify smaller files that can be removed. i.e.: "find / -type f -size +500M"