• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved inode Full100%

DragonMaster

Basic Pleskian
[/] is only the parallels directory and there is not much space, what should I do?


inode Full100%Over


# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sva1 1993216 0 100% /
tmpfs 262144 1 262143 1% /dev/shm



# du -sh /*

68M /root
216M /lib
60K /dev
0 /sys
33M /sbin
8.0K /tmp
0 /.autorelabel
0 /.autofsck
0 /proc
4.0K /mnt
4.0K /selinux
10M /lib64
3.7G /usr
5G /var
15G /
 
you cannot increase the number of inodes on an existing volume, so there are three options

1) delete some files/directories

2a) backup your data
2b) delete disk/volume
2c) create new and bigger (automatically provides more inodes) disk or format partition with appropriate options to support more inodes
2d) restore data

3) create new disk and "split up" your data, i.e. use it as /var/qmail for example and move over data from this directory on your existing / disk


But first I suggest you use a tool like ncdu to see where your data/inodes are used up (run "ncdu -x /" and then press "c" to show inodes instead of space used)
This will give you a good base of informtion, to determine the best course to pursue
 
If it's about session files: Unfortunately there are quite a large number of shop, cms and forum software that create sessions and never remove them. These are many times manually generated files, not managed by PHP itself, so indeed it can happen that these rather small files use up inodes. PHP cleans up after itself, but some software has their own session management and just never removes old files.

What you can try to not to disturb ongoing processes is to remove only "old" session files, e.g. files older than three days or so, with a command like

# find /var/lib/php/session/* -mtime +3 -exec rm {} \;

However, if there are a huge number of files, the command might fail (too many files to handle). In that case, you'll need an iteration script that does the remove one by one.
 
"only 7 days" does not work. You can delete "older than" or "younger than". The "+3" in the example above says "older than 3 days". A "+7" would mean "older than 7 days". If you are unsure about it, I suggest to to run
# man find
for a detailed manual on the command.
 
The (default) PHP session lifetime (session.gc_maxlifetime) is 1440 minutes.
So you can safely remove all files from within /var/lib/php/session that are older than one day, as older ones are invalid and no longer used by PHP anyway.
 
How can I delete 7 days worth of files with the rm command?

# find -newermt "YYYY-MM-DD HH:ii:ss" ! -newermt "YYYY-MM-DD HH:ii:ss" -exec rm {} \;
with the first "YY..." quote = minimum time stamp (start time) and the second "YY..." quote = maximum time stamp (end time).

Example:
If you wish to remove the files with a timestamp between Nov 8th, 6.30 am, and Nov 15th, 7.10 pm, the command would be
# find -newermt "2022-11-08 06:30:00" ! -newermt "2022-11-15 19:10:00" -exec rm {} \;

Use with caution. First try the find command alone without the "-exec rm {} \;", to make sure you get the right result in files, e.g. try a list first like
# find -newermt "2022-11-08 06:30:00" ! -newermt "2022-11-15 19:10:00" -ls
Then, after you are sure that the command delivers the right files, add the removal routine.

However, like @ChristophRo I wonder why you don't simply remove all old session files. They won't be needed for anything. Why delete only a bracket?
 
Back
Top