Page 1 of 1

Can't Delete /home/admin/tmp

Posted: Wed Nov 29, 2017 12:43 pm
by xwid
Hello Team,

I try to delete files from /home/admin/tmp
When I command in putty

Code: Select all

find /home/*/tmp -type f -name 'sess_*' -ctime +5 -delete
Timeout cannot delete

Please help, Any solution

Thanks...

Re: Can't Delete /home/admin/tmp

Posted: Wed Nov 29, 2017 1:31 pm
by mehargags
Is it a KVM-VPS or Dedicated server ?

To check what is holding a lock

Code: Select all

lsof +f -- /home/admin/tmp
then kill the process and try

# Check iNodes if full

Code: Select all

df -i
# Clear Caches (DOESNT WORK on OPENVZ)

Code: Select all

sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches
If possible: shutdown your server for 10 minutes, then reboot it. This shall clear all cache and kernel flags and release any locks

Re: Can't Delete /home/admin/tmp

Posted: Wed Nov 29, 2017 1:53 pm
by xwid
Hi, Thanks

Its a Dedicated Server and number of files (over 10,000,000) from 1 year
Dedicated Server: :~# lsof +f -- /home/admin/tmp/
lsof: not a file system: /home/admin/tmp/
lsof 4.86
latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s]
[-F [f]] [-g [s]] [-i ] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Use the ``-h'' option to get more help information.

Dedicatedserver:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/md4 488099840 45854266 442245574 10% /
udev 4110633 452 4110181 1% /dev
tmpfs 4112910 781 4112129 1% /run
tmpfs 4112910 1 4112909 1% /dev/shm
tmpfs 4112910 5 4112905 1% /run/lock
tmpfs 4112910 13 4112897 1% /sys/fs/cgroup
/dev/md2 128016 328 127688 1% /boot

Re: Can't Delete /home/admin/tmp

Posted: Wed Nov 29, 2017 6:12 pm
by mehargags
Your iNodes are full. This is a sever problem.

clear your caches as I told and power off, then reboot as I said.