- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to reduce size of 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
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-26-2001 08:22 AM
10-26-2001 08:22 AM
/dev/vg00/lvol6 1048576 419971 589554 42% /opt
/dev/vg00/lvol8 1048576 528035 488122 52% /var
Here are the commands I am going to follow
- init 1 => go to single user mode
- umount /opt => unmount filesystem
- umount /var => unmount filesystem
- lvreduce -L 750 /dev/vg00/lvol6
- lvreduce -L 750 /dev/vg00/lvol8
- mount /dev/vg00/lvol6 /opt
- mount /dev/vg00/lvol8 /var
These file system have mirror copy. Do I need to break the mirror before reducing their size?
Normally extendfs command should be run after increasing the size of logical volume. Is there any command need to run after lvrduce?
Please let me know if I am missing anything.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 08:25 AM
10-26-2001 08:25 AM
SolutionVI) How to reduce the size of a logical volume without online JFS (advanced JFS)
Note: the following example is using the volume group vg01 and the
logical volume lvhome
1) Backup all user data
2) Umount the filesystem
umount /home
3) Reduce the size
lvreduce -L 60 /dev/vg01/lvhome
Note: the new total size will be 60M.
4) Re-create the filesystem
newfs -F vxfs /dev/vg01/rlvhome
Note: to create an hfs filesystem change vxfs by
hfs in the previous command.
5) Mount the Logical Volume:
mount /dev/vg01/lvhome /home
6) Restore the user data
Enjoy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 08:33 AM
10-26-2001 08:33 AM
Re: How to reduce size of filesystem?
You shouldn't need to break the mirror though.
You just need to umount the filesytem, lvreduce it and then recreate the filesystem and restore the data from backup.
You mentioned /usr and /var, so you will have to do this in single-user mode as well.
Basically without on-line JFS it is a pain in the === to reduce the size of a filesystem.
/soupbox
That's why its good to not overestimate the sizes of your filesystems too much when they are first set up. /soupbox
But yes, I've been there too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 08:35 AM
10-26-2001 08:35 AM
Re: How to reduce size of filesystem?
Reducing an LV carries the
risk of losing data on the
lv, since the data is not
spread contiguously. Considering this, i would suggest you to take a backup
of the filesystems; also
make a ignite tape (make_tape_recovery), before you do this.
-R
You don't need to break
the mirror to lvreduce
and there is nothing like
"'extendfs"" (reducefs)
for the reduction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 08:36 AM
10-26-2001 08:36 AM
Re: How to reduce size of filesystem?
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 08:44 AM
10-26-2001 08:44 AM
Re: How to reduce size of filesystem?
First, I wouldn't reduce these filesystems, unless you absolutely need space in vg00 to expand another filesystem.
In the absence of Online JFS you will have to *reload* your data after recreating the filesystem with ('newfs' or 'mkfs').
If you have Online JFS, shrinking a filesystem is still problematic. It often fails due to blocks which occupy space that will be returned. Defragmenting the filesystem aheaad of trying to shrink it sometimes solves the problem.
If you still feel that you must regain disk space, I'd make an Ignite recovery tape of vg00, and reinstall your system with it. In this way, you can safely resize your filesystems. Once done, you only would need to 'vgimport' your non-vg00 volume groups.
Regards!
...JRF...