Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File systems defragmenting using fsadm

Status
Not open for further replies.

soma1958

Programmer
Oct 10, 2002
32
0
0
AE
Have any one used the fsadm command to defragment vxfs filesystems.?
Have you faced any problem? please let me know, I am going to defragment some filesystems.

Thanks n advance
 
Urgent

I dont advice any body to use this command t reorganize file systems . I have experianced a disater on my cretical file systems after running fsadm -d -e /filesystem command.

Please dont use it.
 
In my company's production machine has this script to do that and it was recommended by HP CE to enhance the performance.

#!/bin/ksh
LOG=/tmp/defragJFS.log

echo "Please enter Directory to be defragmented : \c"
read D

if [ ! -d $D ]; then
echo "$0: Directory $D does not exist"
exit
fi
echo "Log file is: $LOG"
echo "WARNING: Old log file will be overwritten"
echo "Are you sure to defragment $D [N]: \c"
read dummy
if [ "$dummy" != "Y" -a "$dummy" != "y" ]; then
echo "User abort operation"
exit
fi
echo "Defragment start at `date`" > $LOG
#
# Report the Directory Fragmentation
/usr/sbin/fsadm -D $D | /usr/bin/tee -a $LOG 2>&1

#
# Report the Extent Fragmentation
/usr/sbin/fsadm -E $D | /usr/bin/tee -a $LOG 2>&1

# To Perform Directory and Extent Reorganization
/usr/sbin/fsadm -F vxfs -d -D -e -E $D | /usr/bin/tee -a $LOG 2>&1
/usr/sbin/fsadm -F vxfs -d -D -e -E $D | /usr/bin/tee -a $LOG 2>&1
/usr/sbin/fsadm -F vxfs -d -D -e -E $D | /usr/bin/tee -a $LOG 2>&1

echo "Defragment start at `date`" >> $LOG
 
Hi tikual

what type of os you have 10.x or 11.x?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top