1832956 Members
2635 Online
110048 Solutions
New Discussion

Re: Unix defragmentation

 
O'lnes
Regular Advisor

Unix defragmentation

I want to do the defragmentation in my Unix Machine, what is the simplest way? Thanks.
Andy
6 REPLIES 6
Vijeesh CTK
Trusted Contributor

Re: Unix defragmentation


hi

if ur having Online JFS installed on your machine u can do with fsadm

just check the man pages of fsadm_vxfs

fsadm -F vxfs -d -e -D -E

Other wise

1. Create a new logical volume and mountit with some name(temp1)and copy the data into it. Then unmount both (ur LV and temp1)
and mount new lv on the old mount point.

2. Backup the files onto a tape,remove the files from
the existing partition and restore it back.


CTK
Michael Tully
Honored Contributor

Re: Unix defragmentation

Hi,

You can use the 'fsadm' set of commands to do this. You will need to the 'On-Line JFS' tools in order to continue. Have a look at the man page for 'fsadm_vxfs' for additional information.

If you don't have 'On-Line JFS' then you need to either backup your filesystem, remove all the files and then restore it, or using the same backup, create an additional filesystem
and restore files into it.

HTH
~Michael~
Anyone for a Mutiny ?
S.K. Chan
Honored Contributor

Re: Unix defragmentation

The simplest way is to use HP OnlineJFS, whereby defragmentation of the Journaled File System can done dynamically (on the fly).
Without HP OnLineJFS you would have to unmount the file system, performing a backup, recreating the file system, and reloading the data back. First check if you got HP OnlineJFS ..
# swlist -l bundle | more
You would want to do this when the system is not busy.

Defragmenting Extents
=====================
# fsadm ???F vxfs ???E /
==>Reports extent fragmentation
# fsadm ???F vxfs ???e /
==>Performs extent defragmentation

Defragmenting Directories
=========================
# fsadm ???F vxfs ???D /
==>Reports directories fragmentation
# fsadm ???F vxfs ???d /
==>Perform directories defragmentation



O'lnes
Regular Advisor

Re: Unix defragmentation

where can i get the JFS , does it need to buy?
besides, if i use the another method, backup and then restore, is it risky? because the hidden file may be not backup for some backup tools. Thanks.
Andy
S.K. Chan
Honored Contributor

Re: Unix defragmentation

HP OnlineJFS is a licensed product. You can purchased it from ..
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=B3929CA
For your other question, it is not risky if done right. If you have additional disk space, you can cpio the data over to another disk before you recreate your filesystem.
Vijeesh CTK
Trusted Contributor

Re: Unix defragmentation


hi

Online JFS is priced product. You have to buy it from HP.

If ur having enough space on ur system , then make a new LV and copy all data to that new LV and mount it with the old mount point . this is faster and reliable too.

CTK