Does anyone have any advise on trying to clean up a full filesystem? I can't rm any files because of the follow:
not removed: No space left on device
Any help would be very much appreciated.
Does anyone have any advise on trying to clean up a full filesystem? I can't rm any files because of the follow:
not removed: No space left on device
Any help would be very much appreciated.
We dont know what filesystem, what was the file... What version of Solaris?
Usually, if the file system is really full you need to pay attention, since removing a file may complicate the problem and it may be better to truncate a file first.
See also this thread: File system is full ..even though file is deleted | Unix Linux Forums | Red Hat
Sorry, I should of included the version:
SunOS 5.11 11.1 sun4v sparc SUNW,T5240
Here is the output fo df -k
Filesystem 1024-blocks Used Available Capacity Mounted on
rpool/ROOT/solaris 89802213 50722173 0 100% /
/devices 0 0 0 0% /devices
/dev 0 0 0 0% /dev
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 4967128 2496 4964632 1% /system/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
fd 0 0 0 0% /dev/fd
rpool/ROOT/solaris/var
89802213 114331 0 100% /var
swap 5784384 819752 4964632 15% /tmp
rpool/VARSHARE 89802213 31619 0 100% /var/share
rpool/export 89802213 32 0 100% /export
rpool/export/home 89802213 34 0 100% /export/home
rpool/export/home/craigsky
89802213 97351 0 100% /export/home/craigsky
rpool/export/home/don
89802213 34 0 100% /export/home/don
rpool 89802213 73 0 100% /rpool
I'm hatin' life right about now.
You may be able to truncate a file with : > filename
since you have a working shell... This doesn't use any executables beyond the shell that's already running.
Of course, be very careful what you do that to!
Is there anyway to do with a wildcard?
The command works, it puts the size to "0", which is a start.
What does
:>
do, I wasn't aware of this command.
This assumes you are using sh, bash or ksh.
: is a builtin command that does nothing.
> is used to send the output of a command to a file
So : > filename
runs the : command and sends the output to the specified file.
But you may have a runaway process that is trying use an infinite amount of space. If this is the case, the space disappear almost as fast as you free it. If that happens you need to track down the process and kill it.
Many Thanks, Guys! Although it took some time, I was able to get the filesystem down to the point where rm
started working again.
Looks like I'm good now.
Updating cronab now to find old files and rm
Do that very, very, very carefully, a lot of horror stories have started that way.
Beware that you are using ZFS and removing or truncating files, especially the old ones, isn't guaranteed to free space if the file system has snapshots. This might be the case here given the fact the pool size is about 92 GB while the space used by the file systems is reported to be about 52 GB.
I would then suggest you to look first for old/unwanted snapshots, if any.
Will do! Thanks again guys