- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to reduce a file system size?
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
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
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-16-2006 12:16 AM
05-16-2006 12:16 AM
/dev/vg05/pmor_dat02 18432000 7368763 10379335 42% /PMOR/db/ORPMORP/data/dat02
I need to make it of 8Gb, i need to reduce this file systems size.
which command i should use?
i have online JFS.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 12:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 12:24 AM
05-16-2006 12:24 AM
Re: how to reduce a file system size?
bdf /PMOR/db/ORPMORP/data/dat02
(no grep needed) In fact, you can use bdf to find out what mountpoint is over a specific file or directory:
bdf /etc/fstab
First, make a complete backup of the data. Then make a second backup if this data is really important. Then make sure you have the latest version of Online JFS (ver 3.3). Then use fsadm to change the size of the lvol. Note that reducing an lvol+filesystem is mostly disastrous (corruption) which is the reason for the backups. It can work with Online JFS but it very much depends on the OS revision, filesystem patches and the version of Online JFS.
Since you may have to do this anyways, it's probably safer to backup the data, unmount the filesystem, lvreduce the lvol, newfs the smaller volume, mount it and restore the data.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 12:25 AM
05-16-2006 12:25 AM
Re: how to reduce a file system size?
Later versions of Online JFS afford you the best chance of success downsizing a filesystem. You don't offer what version you have. However, you use:
# fsadm -b
On JFS version 3.1 this would often fail. Defragmenting the filesystem sometimes helped:
# fsadm -d -e -D -E /mountpoint
After a reduction of the filesystem, resize the logical volume that contains it with:
# lvreduce -L
If you cannot use 'fsadm' to reduce the size of filesystem, then: back it up' use 'newfs' to resize an empty filesytem; use 'lvreduce' to downsize the logical volume containing it, and restore the filesystem's data.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 12:32 AM
05-16-2006 12:32 AM
Re: how to reduce a file system size?
I think that, cause fragmentation, probably the reduction of the filesystem will corrupt the data.
-Stop application that write to filesystem
-Backup the data
-umount /PMOR/db/ORPMORP/data/dat02
-lvreduce -L 8192 /dev/vg05/pmor_dat02
-newfs -Fvxfs -o largefiles /dev/vg05/rpmor_dat02
-mount /dev/vg05/pmor_dat02 /PMOR/db/ORPMORP/data/dat02
-Restore data
-Restart application
Enrico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 01:49 AM
05-16-2006 01:49 AM
Re: how to reduce a file system size?
Data corruption is a very real possibility if you have fragmentation - which is usually the case.
The size for this directory does not appear to be all that unusual, at 42% used from a total of 18.4GB - is this going to be static data that does not grow? If you reduce the size down to 8GB and this is dynamic data directory, you will then have the problem of not enough space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 02:02 AM
05-16-2006 02:02 AM
Re: how to reduce a file system size?
cd /old_fs
find . -xdev -depth -print|cpio -pmd /new_fs
cd /etc
cp -p fstab fstab.safe
vi fstab
Swap old_fs with new_fs
Reboot the box.
You will then have a new filesystem with the correct name and size. Once you are happy it is working, delete the old filesystem to release space.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 06:00 PM
05-16-2006 06:00 PM
Re: how to reduce a file system size?
go with the spare 8 gig approach
and transfer everything to this new FS
Use Tar or cpio,
I pref tar
tar cf - template | (cd /dir/wherever ; tar xvf -)'
Keep cooking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 07:01 PM
05-16-2006 07:01 PM
Re: how to reduce a file system size?
1. # fsadm -F vxfs -b
2. # lvreduce -L
please tell me is this the correct serial to run the commands?
or should i run like this:
1. # lvreduce -L
2. # fsadm -F vxfs -b
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 07:31 PM
05-16-2006 07:31 PM
Re: how to reduce a file system size?
First you should take a full backup of lvol.
Then You have to run following commands.
1. Defrag file system..
# fsadm -d -e -D -E /PMOR
2. Resize the file system
# fsadm -b
3. Resize the lvol
# lvreduce -L 8192 /dev/vg05/pmor_dat02
Hope this will help you
Thanks
Shameer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 07:33 PM
05-16-2006 07:33 PM
Re: how to reduce a file system size?
First you should take a full backup of lvol.
Then You have to run following commands.
1. Defrag file system..
# fsadm -d -e -D -E /PMOR
2. Resize the file system
# fsadm -b
3. Resize the lvol
# lvreduce -L 8192 /dev/vg05/pmor_dat02
Hope this will help you
Thanks
Shameer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 07:53 PM
05-16-2006 07:53 PM
Re: how to reduce a file system size?
fsadm -b
or
fsadm -b
Enrico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2006 12:02 AM
05-17-2006 12:02 AM
Re: how to reduce a file system size?
# lvreduce -L 8192 /dev/vg05/pmor_dat02