Issue with lightsail server that is stuck at 100% storage capacity (getting permission issues in ssh to clear space)

0

Hi, I am having an issue with one of my lightsail instances being stuck at 100% usage. It would seem this is down to some plesk dumps in var/lib/psa but I am unable to delete these files as I am getting a permissions denied. I have tried creating a new key but I am still getting the same issue. I can log on and see the files in ssh but can not delete or access any of them. I can not log into my Plesk ui due to the capacity issue.

Many thanks for any help on this.

asked 2 months ago44 views
1 Answer
0

Since your disk is full, many basic operations, like logging into the Plesk UI or deleting files, can fail due toa lack of space or permissions issues.

Here’s how to fix it:

  1. Gain Root Access Even if you're logged in via SSH, ensure you are root:

    sudo -i
  2. Check Disk Usage Confirm your disk is full:

    df -h

    Check which directories are using the most space:

    du -sh /var/lib/psa/*
  3. Free Some Space Temporarily You need a little free space to delete larger files. Clear logs first:

    rm -rf /var/log/*gz
    rm -rf /var/log/*.1
    journalctl --vacuum-size=100M
  4. Remove the Plesk Dump Files Try removing the dumps:

    rm -rf /var/lib/psa/dumps/*

    If you're still seeing “Permission denied,” proceed to the next step.

  5. Check for Read-Only Filesystem If the system is under stress, the root filesystem might have switched to read-only:

    mount | grep 'on / '
    dmesg | tail

    If that’s the case, reboot the instance:

    reboot
  6. Check for Immutable Files Sometimes files are set to be immutable:

    lsattr /var/lib/psa/dumps/

    If you see an i in the attribute list, run:

    chattr -i /var/lib/psa/dumps/*
    rm -rf /var/lib/psa/dumps/*
  7. Prevent Future Problems

    • Schedule a cron job to delete old backups
    • Configure Plesk to store backups off-instance (e.g., to S3 or FTP)
    • Use Lightsail's snapshot feature instead of relying on local dumps

If you still can't delete the files after trying all this, it may help to stop Plesk services temporarily to release any locks.

profile picture
answered 17 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions