Operating System - HP-UX
1753768 Members
5180 Online
108799 Solutions
New Discussion юеВ

degragmentation on disk or ram

 
SOLVED
Go to solution
Shivkumar
Super Advisor

degragmentation on disk or ram

dear sirs,

is defragmentation happens on hpux disks or ram ?

thanks,
shiv
12 REPLIES 12
Devender Khatana
Honored Contributor
Solution

Re: degragmentation on disk or ram

Hi,

Yes you can defragment files on a Vxfs file system. To achive this you should use

#fsadm -F vxfs -D /home (For directory fragmentation report)

#fsadm -F vxfs -d -D -s /home (Reorganization)

man fsadm_vxfs for details.

I do not think it is possible for RAM.

HTH,
Devender
Impossible itself mentions "I m possible"
Arunvijai_4
Honored Contributor

Re: degragmentation on disk or ram

Hi Shiv,

Yes, It happens on HP-UX if you installed OnlineJFS. Check man page of "fsadm" for more information.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Yogeeraj_1
Honored Contributor

Re: degragmentation on disk or ram

hi,

defragmenation on RAM is not really possible.

Defragmentation on disks can happen. Most of the time you will have to manage your disk space at your application level efficiently (e.g. LMT in oracle).

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

Re: degragmentation on disk or ram

Hi Shiv,

Deframentation of RAM is not rellay needed in HP-UX since it is based on Unix. Where as windows third party tools are available to do so.

"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor

Re: degragmentation on disk or ram

Geoff Wild
Honored Contributor

Re: degragmentation on disk or ram

I run a script from cron once a week:

#defrag filesystems
0 22 * * 4 /usr/local/bin/fsadm.defrag >/dev/null 2>&1


# cat /usr/local/bin/fsadm.defrag

#!/bin/sh
# defrag all mounted file systems
LOG=/tmp/fsadm.defrag.log
if [ -f $LOG ]
then
mv $LOG $LOG.old
fi
cat /dev/null > $LOG

for i in `mount -l | grep -v stand |awk '{print $1}'`
do
echo "defraging " $i >> $LOG
fsadm -F vxfs -d -D -e -E $i >> $LOG
done


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Shivkumar
Super Advisor

Re: degragmentation on disk or ram

Is there a way to decide whether a file system needs defragmentation ?

regards,
shiv
John Payne_2
Honored Contributor

Re: degragmentation on disk or ram

Shiv,

I run a script once a month that checks for it, and generates the report, but then does not defrag. (We only have OnlineJFS for our DB machines...)

#!/bin/ksh
# Filesystem fragmentation checker
# written by jjp 22 May 2003
# To defrag a fragmented filesystem, do a 'fsadm -D -d -E -e /filesystem'
# This will run a report on the fragmentation before and after the run
rm /home/ucs/jjp/fragmentreport
touch /home/ucs/jjp/fragmentreport
for i in `bdf -l |grep -v Filesystem |awk '{print $6}'`
do
if [ $i != "/stand" ]; then
uname -n
print $i
fsadm -F vxfs -D -E $i
fi
done


The report lets you know what kind of fragmentation you have. (You have to extrapolate from the report.) I run the script each month, then have one of my student employees pore over the reports to see what's starting to become fragmented. I have a little paper I can dig up for you that explains what to look for if you can't figure it out ffrom the man page. (man fsadm)

Hope it helps

John
Spoon!!!!
Zigor Buruaga
Esteemed Contributor

Re: degragmentation on disk or ram

Hi,

Maybe this link can help, see the reply from Mr. Ferguson:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=102143&admit=-682735245+1138472183916+28353475

Regards,
Zigor