1753934 Members
9351 Online
108810 Solutions
New Discussion юеВ

root full

 

root full

SIR,

My root of size 2gb is full and the space taken by the data is in /var/adm/sw/save/* which are some patch names. can i delete the directories or they are important .

pls let me know as the performance is degraded

thanks in advance
Mangesh Khatav
7 REPLIES 7
Yogeeraj_1
Honored Contributor

Re: root full

hi Mangesh,

You may wish to clean out all the save patches, but then you will not be able to remove the current patches in case of issues. So, my advice will be to take a backup of your /var/adm/sw directory before you touch anything.

Proper way to remove patches is to use "cleanup" utility. Cleanup will allow you to remove patches that were superceded atleast "n" times that you specify.

E.g. cleanup -c 2 will remove (commit) the patches there were superceded atleast 2 times. It is less harmful.

You can also preview it with -p option to see how much disk space you can gain. clean -c 1 will be the last option.


hope this helps!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
lawrenzo
Trusted Contributor

Re: root full

Hello,

a couple of things to consider here;

root filesystem doesn't need to be large

is /var/adm/sw/save/* part of the root file system?

if it is then you will experience problems as /var is used to write log files, system dumps etc. It should not be part of the root file system.

do this;
# cd /
# find . -xdev |xargs ls -ld |sort -rnk 5 |more

This will list all files on the root filesystem only, it will put the file using most disk usage first then list in a decending order.

try this and post back what you find, what is your output from bdf? as mentioned previously other file system should be seperate from root ie.

/usr
/var/
/opt
/home
/stand
/tmp

HTH
hello
Ranjith_5
Honored Contributor

Re: root full


Hi,

Run the following script and find out the large file in your system. You can then delete them one by one.

#########################################################################

#This script finds recenty created large files
#
#Syam
#26/01/2005
#
#
rm -f find.out

echo
echo "Enter directory to search"
read DIRNAME

if [ ! -d $DIRNAME ]
then
echo "Error: directory $DIRNAME does not exist"
exit 1
fi

echo
echo "How large a file do you want to look for ? (in Kbytes)"
read SIZE

echo
echo "How many days since the file was created ?"
read DAYS

echo
echo "Searching..."

find $DIRNAME -type f -size +$SIZE -mtime -$DAYS -exec ls -ls {} \; | sort -n -r | tee find.out

echo
echo "Done"
echo
echo "Note: output in find.out"
echo


#######################################################################


regards,
Syam
Thierry Poels_1
Honored Contributor

Re: root full

hi,

root of 2GB full & space taken by /var/adm/sw/save?

Ain't /var a separate filesystem?

find / -xdev -size +5000000c -exec ll {} \;

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
rmueller58
Valued Contributor

Re: root full

Mangesh,

check file size on your /var/adm/wtmp
this file will grow for ever if not trimmed periodically.

also clean up your logs, either clearing them or trimming them.
clean up mail in the /var/mail directory..

check for dead print jobs
#lpstat -u

I had problems a while again when an NFS mount failed and a backup script was loading to a mount point off root that didn't exist, check your mount points.

This should at least get some space back for you.

Rex M - Omaha
MarkSyder
Honored Contributor

Re: root full

I've never known /var to be part of the root filesystem - it's usually separate.

It's more likely to be /dev that's causing you the problem. The common fault is to mistype a tape device name: e.g.

cat largefile > /dev/rmt0m

This will create a file called /dev/rmt0m which will be a copy of largefile.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
B. Hulst
Trusted Contributor

Re: root full

Hi,

The following works as a temporary fix, until you create bigger partitions or take another filesystem cq. partition layout:


You could make the directory /var/adm/sw into another partition with more space and then softlink it.

#cd /var/adm
#move sw /opt/
# ln -s /opt/sw /var/adm/sw

As a temp solution. :)

Regards,
Bob