- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Reduce /usr file system (vxfs)
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
Forums
Discussions
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
05-31-2001 09:33 AM
05-31-2001 09:33 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 09:45 AM
05-31-2001 09:45 AM
Re: Reduce /usr file system (vxfs)
If you have Online JFS licensed, then you may be able to do this while the filesytem is mounted. Generally you are advised to degragment the filesystem first. It is more likely that the subsequent attempt to shrink the filesystem will succeed if you do this. If files reside and are inuse in the region destined for reduction, the reduction will fail. The latest (3.3) version of JFS does much better at this than earlier version, I understand.
Assuming online JFS:
# fsadm -d -D -e -E /
# fsadm -b
# lvreduce -L
If you do not have the online JFS component, then you must backup the filesystem's data; unmount the filesystem; lvreduce;, recreate; and reload the contents.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 09:46 AM
05-31-2001 09:46 AM
Re: Reduce /usr file system (vxfs)
first the most important thing.... make a backup!!!
You will find all the commands needed in /sbin.
These commands are not linked to any libraries and work in single user mode and without /usr mounted.
So it depends if you have advanced JFS installed or not. But if so check the manpage for fsadm_vxfs.
If not you need to get to single user mode and do a lvreduce on that lvol.
But really make sure that you have the data on a tape to fall back. Reducing always bears some risk.
Good luck,
Steffi Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 09:49 AM
05-31-2001 09:49 AM
Re: Reduce /usr file system (vxfs)
1. defrag your file system
fsadm -F vxfs -d -e -s /var
2. Reduce the file system
Example: you want to go from 1G to 500Mb
Calculate size in bytes 500*1024=510000 ( I didn't use a calculater but you get the idea :) 0
fsadm -F vxfs -b 510000 /var
If this works then you can go to the next step
3. Reduce the lvol
bdf - get new size of fs and divide by 1024 to get Mb of filesystem
Use the newsize + 4m so if the new sise is 512M use 516M so you don't destroy any data in your file system.
lvreduce -L
example
lvreduce -L 516 /dev/vgXX/lvol#
Hope this helps.
Peggy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 09:53 AM
05-31-2001 09:53 AM
Re: Reduce /usr file system (vxfs)
I do not have JFS.
In addition, to clarify my question, if I will be using the mount, cpio, etc... commands to do the restore, once I do the lvreduce on /usr, will I still be able to use those commands ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 09:59 AM
05-31-2001 09:59 AM
Re: Reduce /usr file system (vxfs)
#rcp -p /usr/bin/newfs /tmp
#tar cvf /usr/*
Boot in single user mode
#mount /tmp
#cd /tmp
#lvreduce -L xxx /dev/vg00/lvolx
#newfs -F vxfs /dev/vg00/rlvolx
#mount /dev/vg00/lvolx /usr
#cd /usr
#tar xv
#reboot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 10:05 AM
05-31-2001 10:05 AM
Re: Reduce /usr file system (vxfs)
OK. 'vxfs' is also know as "JFS", but JFS has a base and an online component. If you don't have the online component (no "online" noted in: 'swlist -l bundle|grep -i jfs' output) then you will need to drop to single-user mode and use the commands in /sbin.
I suggest that booting to single-user mode is easist; then doing your LVM maintenance is the easiest, cleanest way to start. You could also do your backups there (with /usr mounted) to be sure of a quiet system.
As always, make very, very sure you have a good backup.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 10:23 AM
05-31-2001 10:23 AM
Re: Reduce /usr file system (vxfs)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2001 10:27 AM