Operating System - HP-UX
1756066 Members
4713 Online
108840 Solutions
New Discussion юеВ

Is it possible to defragment a FS without Online JFS?

 
SOLVED
Go to solution
Eric Antunes
Honored Contributor

Is it possible to defragment a FS without Online JFS?

Hi,

Here's /disc2 fragmentation report:

fsadm -F vxfs -D /disc2

Directory Fragmentation Report
Dirs Total Immed Immeds Dirs to Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 41369 21005 22581 31 38 578


Is there an alternate way to defragment it than Online JFS? Will some moves do the job??

Eric
Each and every day is a good day to learn.
6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: Is it possible to defragment a FS without Online JFS?

Shalom,

Yes.

1) Back up the fs to tape or another fs.
2) Erase everything.
3) Restore it all back.

As to whether its worth it, that is a value judgment.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
T G Manikandan
Honored Contributor

Re: Is it possible to defragment a FS without Online JFS?

Without Online JFS , you need to recreate the vol volume, the answer is 'NO'.
Eric Antunes
Honored Contributor

Re: Is it possible to defragment a FS without Online JFS?

Hi SEP,

I'll follow your suggestion for some directories I can delete and see if it gets better.

Thank you,

Eric
Each and every day is a good day to learn.
Steven E. Protter
Exalted Contributor

Re: Is it possible to defragment a FS without Online JFS?

Follow up: If you go to to tape and then back to an empty file system your files will come back defregmented.

Note if you go to a file system as temporary storage you could get fragmentation due to condition of the file system.

I'm not sure the benefit of my approach is large, but the output of your command:

fsadm -F vxfs -D /disc2

Is different after this procedure.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
pa8700
Regular Advisor

Re: Is it possible to defragment a FS without Online JFS?

you may use fsadm -F vxfs -E /disks to find the fragmentation level then use fsadm -F vxfs -D /disc2
.Then again use fsadm -F vxfs -E /disks and see there will be difference.

Yes its worthy
James R. Ferguson
Acclaimed Contributor

Re: Is it possible to defragment a FS without Online JFS?

Hi Eric:

If you are going to backup the whole filesystem; then 'newfs' it; and finally restore it, restoring from another filesystem or from a tape isn't going to make for any more or less fragmentation!

In fact, given the choice, I'd certainly use a disk filesystem. The speed with which you can load it and re-read it will far out-strip the tape handling.

Regards!

...JRF...