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.
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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.