You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: Sudo Fail With Error "sudo:unable to write log file:/var/log/sudo.log: No space left on device"

edited May 30, 2024 8:14AM in Linux

APPLIES TO:

Linux OS

Oracle Cloud Infrastructure

SYMPTOMS:

Oracle Linux instance with no space left in the root filesystem “/” showing up sudo errors:

$ sudo su - 
sudo: unable to write log file: /var/log/sudo.log: No space left on device 
sudo: error initializing I/O plugin sudoers_io  
$ df -h 
Filesystem                                    Size  Used Avail Use% Mounted on 
/dev/mapper/ocivolume-root                     36G   36G   20k  100% / 

CAUSE:

The sudo command can fail to execute because the filesystem where the sudo binary resides has runs out of free inodes or space.

SOLUTION:

1) Boot the Instance into maintenance mode following document:

2) Check Inode usage with command below to see which partitions are low on inodes( check Iuse% column)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!