Operating System - HP-UX
1832337 Members
2409 Online
110041 Solutions
New Discussion

Is it possible to defragment logical volumes...?

 
SOLVED
Go to solution
Eric Antunes
Honored Contributor

Is it possible to defragment logical volumes...?

...without OnlineJFS (just JFS)?

Or at least analyse the defragmentation of each logical volume??

Thanks,

Eric
Each and every day is a good day to learn.
10 REPLIES 10
Slawomir Gora
Honored Contributor

Re: Is it possible to defragment logical volumes...?

Hi,

I have no OnlineJFS installed and command
fsadm -E /home works fine.
Robert-Jan Goossens_1
Honored Contributor

Re: Is it possible to defragment logical volumes...?

Hi Eric,

/root# fsadm -F vxfs -E /app/oracle/dbappl

Regards,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: Is it possible to defragment logical volumes...?

Eric,

I do this monthly via a crontab entry that runs this little script:


#!/bin/ksh
for i in `bdf -l |grep -v Filesystem |awk '{ print $6 }'`
do
if [ $i != "/stand" ]; then
echo "Re-Org'ing " $i
fsadm -F vxfs -d -D -e -E $i
fi
done


Pete

Pete
Eric Antunes
Honored Contributor

Re: Is it possible to defragment logical volumes...?

Thanks for all the replies. I've got this after having executed fsadm:

hp440# fsadm -F vxfs -E /disc1
Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
610 7799 2 2923818
blocks used for indirects: 46
% Free blocks in extents smaller than 64 blks: 13.42
% Free blocks in extents smaller than 8 blks: 3.99
% blks allocated to extents 64 blks or larger: 99.95
Free Extents By Size
1: 12 2: 57 4: 43 8: 30
16: 3 32: 13 64: 9 128: 0
256: 1 512: 1 1024: 1 2048: 0
4096: 1 8192: 0 16384: 0 32768: 11


Has /disc1 been defragmented?

Thanks,

Eric
Each and every day is a good day to learn.
Pete Randall
Outstanding Contributor
Solution

Re: Is it possible to defragment logical volumes...?

Eric,

The -E option only reports on extent fragmentation. You need to run with the -e option. Refer to the fsadm_vxfs man page.


Pete

Pete
Robert-Jan Goossens_1
Honored Contributor

Re: Is it possible to defragment logical volumes...?

Hi Eric,

You will need OnlineJFS for the -e option.

fsadm -F vxfs -e /app/oracle/dbappl
fsadm: the -e option requires "HP OnLineJFS (Advanced Vxfs)"

---
For a Base JFS, to de-fragment, you need to perform the same steps you would
for an HFS: backup the file system and then restore it.
---

Best regards,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: Is it possible to defragment logical volumes...?

Eric,

You should also note from the fragmentation report that 99.95 percent of the blocks are already allocated to extents 64 blks or larger. That says you're not very fragmented anyway!


Pete

Pete
Eric Antunes
Honored Contributor

Re: Is it possible to defragment logical volumes...?

Pete, that's was going to be my next question but, indeed, it seems that I don't have a fragmentation problem.

Here is the Production server report:

Data and control files logical volume:

hp360# fsadm -F vxfs -E /disc1
Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
1110 4009 1 3232013
blocks used for indirects: 30
% Free blocks in extents smaller than 64 blks: 7.16
% Free blocks in extents smaller than 8 blks: 4.38
% blks allocated to extents 64 blks or larger: 99.92
Free Extents By Size
1: 1 2: 100 4: 177 8: 46
16: 3 32: 5 64: 1 128: 0
256: 1 512: 1 1024: 0 2048: 1
4096: 0 8192: 0 16384: 1 32768: 2

APPS, RDBMS and logs logical volume:

hp360# fsadm -F vxfs -E /disc2
Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
248307 16 1 893314
blocks used for indirects: 23
% Free blocks in extents smaller than 64 blks: 27.11
% Free blocks in extents smaller than 8 blks: 6.68
% blks allocated to extents 64 blks or larger: 90.12
Free Extents By Size
1: 4144 2: 4989 4: 3728 8: 2265
16: 1725 32: 1346 64: 949 128: 530
256: 233 512: 123 1024: 34 2048: 5
4096: 1 8192: 2 16384: 0 32768: 0


Thanks,

Eric
Each and every day is a good day to learn.
Pete Randall
Outstanding Contributor

Re: Is it possible to defragment logical volumes...?

Eric,

There was a recent discussion on the performance benefits of defragmenting and the consensus was that, unless your disk is severely fragmented, you are unlikely to see any noticeable benefit. As I said, I defragment mine monthly simply because I can and it's one less thing to worry about!


Pete

Pete
Eric Antunes
Honored Contributor

Re: Is it possible to defragment logical volumes...?

Closing the thread.
Each and every day is a good day to learn.