could not acquire a lock for ‘/var/run/restartsrv_sshd’: Disk quota exceeded
ERROR : could not acquire a lock for ‘/var/run/restartsrv_sshd’: Disk quota exceeded
root@server [~]# /scripts/restartsrv_sshd
warn [restartsrv_base] could not acquire a lock for ‘/var/run/restartsrv_sshd’: Disk quota exceeded
Could not create lock file “/var/run/restartsrv_sshd” at /usr/local/cpanel/Cpanel/RestartSrv/Lock.pm line 26.
FIX :
I tried to restart SSH service on my Linux server and saw the above error message. The error shows that your server disk quota exceeded.
Log into your linux server via SSH as root and type the command “df -h” and “df -i” to check the current disk and inode usage. The server might have reached either disk or inode usage limit.
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 30G 30G 20M 100% /
SERVER 2 :
df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vda1 1966080 1966080 0 100% /
In the above example “Server 1” reached 100% disk usage. Check which directory is consuming high disk space by running the command ‘du-sch *’. This command will display the size of each directory.
Example :
root@server [~]# cd /
root@server [~]# du -sch *
Delete some files to free some disk space or you can add more disk space to your server.
‘server 2’ reached 100% inode usage. Check which directory on your server is using high inode. Run the below command on your server to list the inode usage of each directory.
Command :
Try starting the service after freeing some disk space.