- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: decrease /usr and increase /var
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
08-30-2004 06:28 AM
08-30-2004 06:28 AM
decrease /usr and increase /var
/dev/vg00/lvol7 1024000 452984 571016 44% /var
/dev/vg00/lvol6 2764800 1376856 1377144 50% /usr
I need to decrease /usr and give the space to /var.
Is it OK to lvreduce /usr and lvextend /var in single usr mode?
Thanks,
Jane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2004 06:33 AM
08-30-2004 06:33 AM
Re: decrease /usr and increase /var
That's definitely the easy way to do it since you need to unmount them.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2004 06:36 AM
08-30-2004 06:36 AM
Re: decrease /usr and increase /var
OK, I will give it a try. I have online JFS installed, can I lvreduce in mutiuser mode?
Thanks,
Jane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2004 06:36 AM
08-30-2004 06:36 AM
Re: decrease /usr and increase /var
Reducing the LV is only very rarely succesful especially with the layout versions prior to 4.
Keep a good backup of /usr before reducing the lv.
You could use online JFS to defrag the file system before reducing but again I assume you dont have Online JFS since you have mentioned you need to bring down the system to reduce the LV.
Before lvreduce, you need to execute fsadm to reduce the filesystem size.
After lvextend, you can execute either fsadm or extendfs to increase the filesystem size.
-- Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2004 06:39 AM
08-30-2004 06:39 AM
Re: decrease /usr and increase /var
Even with OnlineJFS, lvreduce is kinda destructive
1) Backup /usr
2) fsadm -F vxfs -D -E -d -e /usr
This will defrag the filesystem and thus incrases the chances of being able to reduce the filesystem size.
3) fsadm -F vxfs -b
4) lvreduce -L XXX /dev/vg00/lvolX
5) lvextend -L YYY /dev/vg00/lvolY
6) fsadm -F vxfs -b
7) bdf and confirm
-- Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2004 06:44 AM
08-30-2004 06:44 AM
Re: decrease /usr and increase /var
Thanks for the details and warnings.
I need to increase /var to put other system's image there ( this machine is my ignite server).
I have found the way to put the images on other files system (/homes). So I won't risk to do it. The good lesson I learned is that to calculate the size while installing the OS or leave some unallocated space in vg00.
regards,
Jane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2004 07:07 AM
08-30-2004 07:07 AM
Re: decrease /usr and increase /var
If you have onlineJFS, you can use this procedure to reduce the size,
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062938991
The itrc doc id is A4360299.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2004 07:10 AM
08-30-2004 07:10 AM
Re: decrease /usr and increase /var
Sorry, I didn't realize you Online JFS. In that case, you don't need to worry about single user. I think Sundar's done a pretty good job of elaborating the steps involved so I won't bother repeating. Good luck!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2005 08:33 PM
08-30-2005 08:33 PM
Re: decrease /usr and increase /var
Thnx guys!
What i did:
# fsadm -F vxfs -b 6000m /opt
vxfs fsadm: /dev/vg00/rlvol6 is currently 7028736 sectors - size will be reduced
vxfs fsadm: allocations found in shrink range, moving data
# lvreduce -L 6000 /dev/vg00/lvol6
When a logical volume is reduced useful data might get lost;
do you really want the command to proceed (y/n) : y
Logical volume "/dev/vg00/lvol6" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Then with SAM increase /usr volume ;)
Brgds,
Sergej