- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Reducing the fielsystem size online using Online J...
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
02-04-2004 05:49 AM
02-04-2004 05:49 AM
If anybody knows how to reduce the filesystem size without unmounting it using Online JFS, please give me the detailed procedure.
Thanks,
Phani
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 05:55 AM
02-04-2004 05:55 AM
Re: Reducing the fielsystem size online using Online JFS
# fsadm -b 1024M /mount/point/here
# lvreduce -L 1024 /dev/vgXX/lvolXX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 05:58 AM
02-04-2004 05:58 AM
Re: Reducing the fielsystem size online using Online JFS
lvreduce -L
Of course, a backup beforehand would be prudent...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 05:59 AM
02-04-2004 05:59 AM
Re: Reducing the fielsystem size online using Online JFS
Make sure you have a good backup of your filesystem just to be on safer side.
1. Use fsadm to shrink the size.
fsadm -b 500m /mount_point
500m is the new size. If the mount_point has 1500MB and if you want to reduce 1000MB, then you would use 500m as it is the new size.
2. Then use lvreduce to reduce the logical volume
lvreduce -L 500 /dev/vg01/rlvol1
bdf /mount_point
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 06:00 AM
02-04-2004 06:00 AM
Re: Reducing the fielsystem size online using Online JFS
would reduce /user to 128MB (131072 1024-byte sectors).
Note: you should follow this with an lvreduce if you need to resize space for another LVOL.
Man fsadm_vxfs before doing this so that you are aware of the warnings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 06:00 AM
02-04-2004 06:00 AM
Re: Reducing the fielsystem size online using Online JFS
# fsadm -F vxfs -b 1024M /mount/point
# lvreduce -L 1024 /dev/vgXX/lvolXX
instead. Just wanted to clarify that before someone else did :-)
(I know it's set on all our machines, so I rarely use it, but I
probably should... for that rare occasion when it might not be.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 06:01 AM
02-04-2004 06:01 AM
Solution1) Check free space - don't even attempt if there's not at least 33% free
2) Backup the Filesystem to tape - TWICE. This is THE most important step.
3) Run
fsadm -F vxfs -D -d -E -e /mnt_point # At least twice to reorg & defrag the FS as best as possible
4) Run
fsadm -F vxfs -b XXXXM /mnt_point # Where XXXX equals the new size in Megabytes - The "M" denotes such. This resizes the filesystem & this is where the rubber meets the road. It'll either work or fail here. If it fails you'll be glad that you did step #2
5) Run
lvreduce -L XXXX /dev/vg_name/lv_name #Again where XXXX equals the new smaller size & must match the value in the fsadm command.
I again must state that even IF there is what appears adequate free space, this command can fail - IT'S NOT BULLETPROOF - that's whay step #2 is the most important. And if you can get the downtime - it's always safer & better to do this unmounted.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 06:05 AM
02-04-2004 06:05 AM
Re: Reducing the fielsystem size online using Online JFS
To have the best chance of success, you'll first want to defragment and reorganize the file system:
fsadm -F vxfs -d -D -e -E /mountpoint
Then reduce as explained above.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 06:34 AM
02-04-2004 06:34 AM
Re: Reducing the fielsystem size online using Online JFS
Thank you very much for your quick response. I have tested it on a newly created filesystem for testing. The above said commands are successfully working.
But when i use them on a filesytem which is about 120 GB in size..i am getting the following message.
suboz040:/ > bdf /dbback/PRDDW
Filesystem kbytes used avail %used Mounted on
/dev/vg02/lvol1 119898112 39638744 79632960 33% /dbback/PRDDW
suboz040:/ > fsadm -F vxfs -b 81920m /dbback/PRDDW
fsadm: cannot shrink /dev/vg02/rlvol1 - upgraded fs - inodes are currently in use.
I perfomed online defragmentation twice..but same above problem.
Regards,
Phani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 06:51 AM
02-04-2004 06:51 AM
Re: Reducing the fielsystem size online using Online JFS
Get two good backups of the data, if you haven't already.
You may end up doing this one "offline" instead.
You have the choice of creating a new filesystem,
copying over the data, unmounting both filesystems,
and remounting the new "correctly sized" filesystem at old mountpoint,
or, if you don't have space for that... unmount the old
filesystem, blow it away, recreate with desired params, and
restore the data from the backup tapes.
It could be that, once you can shutdown everything using
the filesystem, you may be able to resize it at that point.
But I'd be prepared to do it the "long way" if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 06:53 AM
02-04-2004 06:53 AM
Re: Reducing the fielsystem size online using Online JFS
If you have JFS3.3 installed, then try upgrading the filesystem to version 4 and see. 'vxupgrade' is the command.
It is easy if it is 11i. On version 4, the used blocks will be automatically adjusted to free up the space.
I say again, better keep a backup of your filesystem.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 07:12 AM
02-04-2004 07:12 AM
Re: Reducing the fielsystem size online using Online JFS
I didn't consider that you may have an older version.
# fstyp -v /dev/vgXX/lvolXX |grep version
Will give you the version.