- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to reduce a filesystem 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
10-03-2002 09:19 PM
10-03-2002 09:19 PM
how to reduce a filesystem size
i would like to know how to reduce an existing JFS filesystem and is it a risky thing to do.
JL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 09:40 PM
10-03-2002 09:40 PM
Re: how to reduce a filesystem size
you can use lvreduce command.
see man lvreduce
WARNINGS
LVM does not store any information about which physical extents within
a logical volume contain useful data; therefore, reducing the space
allocated to a logical volume without doing a prior backup of the data
could lead to the loss of useful data. The lvreduce command on a
logical volume containing a file system of greater length than the
size being reduced to will cause data corruption.
To reduce a logical volume being used for swap, that swap area must
not be currently in use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 09:56 PM
10-03-2002 09:56 PM
Re: how to reduce a filesystem size
But the easiest way is you have the luxury of ample disk space is to create a new smaller file system, copy the files over and change the mounting so the new file system will be mounted at boot.
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 10:01 PM
10-03-2002 10:01 PM
Re: how to reduce a filesystem size
SAM doesn't give you the option to reduce the file system, you need to do it using 'lvreduce' command. Need backup of that filesystem before reducing.(don't try to reduce /usr)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 10:10 PM
10-03-2002 10:10 PM
Re: how to reduce a filesystem size
//*
backup the filesystem
*//
#fsadm -b xxxxM
If you do not have online jfs installed then
//*
Take backup
*//
Umount /dev/vg01/lvol8
lvreduce -L 40 /dev/vg01/lvol8
fsck /dev/vg01/lvol8
mount /dev/vg01/lvol8
Restore the data.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 11:34 PM
10-03-2002 11:34 PM
Re: how to reduce a filesystem size
1. you can only reduce if you have Advanced OnlineJFS (swlist | grep -i Advanced)
2. you need to make sure your filesystem always fits into your logical volume any time, else you risk FS corruption
-> use fsadm first
-> then lvreduce
3. in practice reducing the filesystem will only work if it has not yet been used extensively at a time when it was relatively full. You can use fsadm to defragment it but in those cases where I had to do this on production systems the size reduction never worked even after running a thousand defrags...
Therefore it is likely you have to backup the filesystem and simply restore it to another (smaller) logical volume.
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2002 11:58 PM
10-03-2002 11:58 PM
Re: how to reduce a filesystem size
This has been re-designed with VxFS 3.3 (using layout 4)... one of the good reasons to upgrade to 3.3 (which is the default beginning with 11.11).
Regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 01:22 AM
10-04-2002 01:22 AM
Re: how to reduce a filesystem size
Its not a risky thing to do. If the fsadm command to reduce the filesystem works then your ok, if it fails then it has NOT reduced the filesystem so again youre safe.
The best thing to do is use JFS 3.3 (for 11.0) or just normal OnlineJFS for 11i - both these 2 versions will move data out of the way when you try to reduce a filesystem - which in my experience works 99% of the time (online).
If you dont have JFS 3.3 or OnlineJFS on 11i then the chances are the fsadm to reduce the filesystem will encounter some data on that part of the filesystem and be unable to reduce it - forcing you to delete your lvol/filesystem and recreate to your new size.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 05:34 AM
10-04-2002 05:34 AM
Re: how to reduce a filesystem size
You'll need to backup the filesystem, then do an lvreduce on the filesystem to reduce the size.
Then restore the data.
If you just do an lvreduce there is a good chance that you will lose data in the filesystem.