Operating System - HP-UX
1833838 Members
2518 Online
110063 Solutions
New Discussion

Disk deframentation tools

 
SOLVED
Go to solution
Patrick Chim
Trusted Contributor

Disk deframentation tools

Hi all,

Does HP-UX 11.0 has any disk deframentation tools because I have to create a 2G contiguous swap space even though I have 2.8G free space in the vg00 as it prompt I don't have any contiguous space !

Regards,
Patrick
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: Disk deframentation tools

Hi Patrick:

While there are defragmentation utilities, in the form of 'fsadm' with Online JFS, this is for directories and file blocks within logical volume extents.

While the 'pvmove' utility operates on disk extents, beyond being able to move extents within a volume group you cannot move extents to a destination physical volume that is the same as a source physical volume.

Thus, if you do not have spare, contiguous physical extents into which you can extend your primary swap space, you are left only with one good option:

Create a secondary device swap on a separate physical disk from your primary. For the best performance, assign the same swap priority to it as you primary, and make its size equal to that of the primary. In this fashion you will interleave I/O and maximize performance.

It is very rare that primary swap can be extended, but it is unnecessary if you configure secondary swap as indicated above.

Regards!

...JRF...
Animesh Chakraborty
Honored Contributor

Re: Disk deframentation tools

Hi,
You can defragment if you have online JFS.
In your case it is always advisable to configure secondary swap space as Suggested by JRF.


1. To Report on Directory Fragmentation

# /usr/sbin/fsadm -D /[filesystem-name]

2. To Defragment Directory

Note: "-s" option shows the summary of the activity
"-v" option shows the result in verbose mode

# /usr/sbin/fsadm -F vxfs -d -s /[filesytem-name]

3. To Report on Extent Fragmentation

# /usr/sbin/fsadm -E /[filesystem-name]

4. To Defragment Extents

Note: "-s" option shows the summary of the activity
"-v" option shows the result in verbose mode

# /usr/sbin/fsadm -F vxfs -e -s /[filesytem-name]


Regards
Animesh

Did you take a backup?
Bill Hassell
Honored Contributor

Re: Disk deframentation tools

First, defragmentation is a filesystem concept and had zero effect on the size of a logical volume. Defrag is unnecessary for hfs filesystems and part of fsadm, but seldom needed.

swap space can be scattered across multiple disks if desired...there is no significant advantage to one large swap area. In fact, using swap is always detrimental to system performance and in only needed when there is not enough RAM to run everything at the same time.

When using multiple swap spaces, the priority determines the allocation policy. If all prioprities are the same value, swapping (actually paging) is spread across all the disks in round robin fashion.


Bill Hassell, sysadmin
Soren Morton
Advisor

Re: Disk deframentation tools

Make sure that you really have enough free space:

Example:
vgdisplay /dev/vg00 shows a Free PE of 100

This may be 100 Free PE with 20 PE on one disk , 10 on another and 70 on another.

You have to do a lvdisplay -v /dev/vg00/ | more. Look at what disk the lvol is on.

Now do a vgdisplay -v /dev/vg00 and look for the # of free extents on that disk.
No Egos, No Politics, No Games