- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do I defrag a vxfs Filesystem?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 02:35 AM
тАО03-21-2002 02:35 AM
How do I defrag a vxfs Filesystem?
can anybody help? I need to reduce the space allocated in /home (currently set at 256MB - way too high only 5MB being used) to give back to /usr. They are both vxfs filesystems and the OnlineJFS product is installed. I have read that I will need fsadm and lvreduce, however the documentation recommends defragging the filesystem first. This is what i would like to know how to do. So can anyone tell me the command i need to defrag /home(incidentaly this is lvol8)?
thanks in advance for help will allocate points for any help/answers :)
mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 02:39 AM
тАО03-21-2002 02:39 AM
Re: How do I defrag a vxfs Filesystem?
You'll find this info in man fsadm_vxfs
fsadm -D -> report on directory fragmentation
fsamd -d -> directory defrag
fsadm -E -> report on extend fragmentation
fsadm -e -> extend defrag
You'll need onlineJFS (that went without saying :-)
Hope this helps,
Tom Geudens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 02:40 AM
тАО03-21-2002 02:40 AM
Re: How do I defrag a vxfs Filesystem?
defragmentation is also doen with fsadm, options -d and -e, but like reducing the size
of a filesystem it is not part of the core os,
but a additional product/license.
To do a defragmentation does not guaranty, that you are able to reduce the size of a
filesystem.
Heiner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 02:51 AM
тАО03-21-2002 02:51 AM
Re: How do I defrag a vxfs Filesystem?
if you can have an outage take the easy route
backup /home to another file system
remove the logical volume
create new logical volume of appropiate sixe
copy backup to new /home
new volume will be totally defragmented and the data contigous.
even JFS has been know to fail on an lvreduce so make sure you have a backup whatever route you take.
good luck
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 02:57 AM
тАО03-21-2002 02:57 AM
Re: How do I defrag a vxfs Filesystem?
The quickest solution for you would be to create a new lvol/filesystem for /home. Temporarily mount it and copy the contents of /home over. Then umount both and mount the new filesystem on /home.
Then you can edit fstab to reflect the new lvol and lvremove the old one (and give more space to /usr).
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 02:58 AM
тАО03-21-2002 02:58 AM
Re: How do I defrag a vxfs Filesystem?
the best way to do a defragmentation of your file system is to do a backup of your file system, remove the old logical volume, create a new one of same size or bigger, and restore your data into this lvol. If you use online JFS, which you must pay for, you can do a defragmentation without this procedure, remember to do a backup before proceeding.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 04:08 AM
тАО03-21-2002 04:08 AM
Re: How do I defrag a vxfs Filesystem?
Im having trouble with the fsadm -b (new size) /home.
It exits with errno 16.
anyone encountered this and know the fix?
I would like to create new lv, copy over to new lv, umount old and new, then remount new on old mount point. But i dont have any system outage time :( not till weekend anyway!
mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 04:17 AM
тАО03-21-2002 04:17 AM
Re: How do I defrag a vxfs Filesystem?
This depends very much on which version HP-UX you are using.
So let us know !
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 04:17 AM
тАО03-21-2002 04:17 AM
Re: How do I defrag a vxfs Filesystem?
The easiest way out of this is to create a new filesystem etc...
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 04:20 AM
тАО03-21-2002 04:20 AM
Re: How do I defrag a vxfs Filesystem?
For sure the best way in this is to recreate a new file system.
Suc6.
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 05:12 AM
тАО03-21-2002 05:12 AM
Re: How do I defrag a vxfs Filesystem?
That particular error is "normal" :-(.
Example :
/home 100Mb
extend it to
/home 200Mb
and then try to reduce ... I wouldn't go below 140Mb. I made a type one day and because of that lost a couple of Mb's (which is no great deal, I agree :-).
The way it works I'm afraid ...
Tom Geudens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 05:32 AM
тАО03-21-2002 05:32 AM
Re: How do I defrag a vxfs Filesystem?
i think now it would be best for me to create new and copy data into new one at weekend.
thanks for all your help :)
mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 06:17 AM
тАО03-21-2002 06:17 AM
Re: How do I defrag a vxfs Filesystem?
Though it is possible with Online JFS to reduce the size of a JFS filesystem "on the fly", often it fails because the filesystem has stored some info in the space that would be freed by shrinking its size. This is often the case when drastically reducing the size of the filesystem.
The purpose of defragging (fsadm -de) is to hopefully free that space. Defragging will sometimes free the space to be reduced but often it doesn't. I don't think you can readily determine if defragging will help without trying it.
If fsadm fails to shrink the filesystem, you basically have to rebuild it.
If fsadm succeeds, you still need to shrink the filesystem's logical volume with lvreduce.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2002 07:08 AM
тАО03-21-2002 07:08 AM
Re: How do I defrag a vxfs Filesystem?
REducing the lv is always a problem. The best thing for you to do would be to take a backup of the filesystem, remove the logicval volume and recreate the logical volume with the new size you want. And restore from the backups.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2002 12:53 AM
тАО03-22-2002 12:53 AM
Re: How do I defrag a vxfs Filesystem?
You can try this.
The best way to do is take the backup of the filesystem in a disk, resize the filesystem. This may destroy data in the original filesystem. Don't bother... you have the backup! Then remove all the files in the lvol8 filesystem and then restore from the backup.
Cheers...
Ramakrishnan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2003 01:08 AM
тАО07-11-2003 01:08 AM
Re: How do I defrag a vxfs Filesystem?
You can defragment an HFS file system by backing it up to tape, removing and recreating it, then recovering the data from the tape.
The example that follows shows an alternative method, using dcopy, and assumes you have enough disk space to create a new logical volume at least as large as /dev/vg01/lvol8. We'll operate on the /work file system, which resides on the logical volume /dev/vg01/lvol8.
Step 1. Back up the file system; for example,
tar cv /work
backs up /work to the system default tape device, /dev/rmt/0m.
Step 2. Create a new logical volume (see Adding a Logical Volume) but do not mount it to any file system.
We'll assume this new logical volume is /dev/vg01/lvol9.
Step 3. Make sure no one has files open in /work and that it is no one's current working directory, for example:
fuser -cu /work
Step 4. Unmount /work:
umount /work
Step 5. Write out the contents of /work to /dev/vg01/lvol9:
dcopy -v /dev/vg01/rlvol8 /dev/vg01/lvol9
Step 6. Mount the new logical volume to the mount point of the original file system, /work:
mount /dev/vg01/lvol9 /work
You can now reuse the original logical volume /dev/vg01/lvol8) or remove it (see Removing a Logical Volume).
2.To defragment a JFS file system using SAM
Execute sam.
Select Disks and File Systems functional area.
Select the File Systems application.
Select the desired JFS (VxFS) file system.
Select the Actions menu.
Select the VxFS Maintenance menu item.
You can choose to view reports on extent and directory fragmentation.
Select Reorganize Extents and/or Reorganize Directories to defragment your JFS file system.