- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lvextend & lvreduce questions.
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
12-27-2002 09:27 AM
12-27-2002 09:27 AM
I'm new to the HP-UX world & would appreciate some help in validating my plan to reduce a lv & extend a lv.
Running: B.11.00
I need to reduce lvol202 (demo side of our production system) & extend lvol201 (production side). Both lv are 8 GB & I plan to reduce lvol202 by 250MB (2.5GB) & extend lvol201 by 250MB
/dev/vg02/lvol202 8888320 4772378 3988202 54% /demo2
/dev/vg02/lvol201 8888320 7882494 974682 89% /z
I plan to run:
unmount /demo
unmount /z
lvreduce -L 250 /dev/vg02/lv202
lvextend -L 250 /dev/vg02/lv201
shutdown -r 0
Question?
Do I need to extend/create file system somewhere in this process?
Would it be easier to use SAM? I don't see an option to reduce, but I can always remove & recreate lvol202?
Yes... I have full backups.
Best Regards,
James
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2002 09:37 AM
12-27-2002 09:37 AM
Re: lvextend & lvreduce questions.
Doing the lvreduce may or may not corrupt your data, depending on whether it is a Journaled File System and how much free space is available.
If I were you, I would just remove and recreate lvol202. (and restore from backup) Either manually or with SAM.
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2002 09:43 AM
12-27-2002 09:43 AM
SolutionYou're close to getting it done. Though it is recommended to recreate a logical volume in it sentirety rather than reduce it, it is still possible to accomplish what you want to do this way.
1) If you can umount your file systems, you won't need to reboot at all.
2) your commands should show :
lvreduce -L 8500 /dev/vg02/lv202
and
lvextend -L 9130 /dev/vg02/lv201
the -L option is always the TOTAL amount of space after the change. So, since you want to reduce by 250 Megs from 8.88 Gigs, you'll get about 8.5 Gigs left. Same goes with the amount you want to add.
3) Rather than reboot, you can then just :
extendfs /dev/vg02/lv201
and then mount your file system again.
Again, it is recommended to recreate the logical volume that you want to decrease rather than lvreduce it. So it would give something like this :
umount /dev/vg02/lv202
umount /dev/vg02/lv201
lvremove /dev/vg02/lv202
lvextend -L 9130 /dev/vg02/lv201
extendfs /dev/vg02/lv201
mount /dev/vg02/lv201 /z
lvcreate -n lv202 -L 8500 vg02
newfs -F vxfs /dev/vg02/lv202
Restore your file system /dev/vg02/lv202
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2002 09:47 AM
12-27-2002 09:47 AM
Re: lvextend & lvreduce questions.
you can use fsadm command to extend file system without unmounting file system.
Or else you have to unmount file system.
Before doing anything please take filesystem backup.
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2002 06:40 AM
12-28-2002 06:40 AM
Re: lvextend & lvreduce questions.
even if you don't have online JFS, you don't have to do a shutdown after reducing or extending Filesystems.
Claus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2002 12:58 PM
12-29-2002 12:58 PM
Re: lvextend & lvreduce questions.
I'm also assuming you have a fbackup handy in case you hit data on the volume you are reducing.
It would be easier to use SAM but sometimes it makes mistakes.
Here is the Steve guide on how to use SAM.
Use, it then view the commands it used. Save them as a script and look them over. Get rid of the display commands and then you see how to do it on the command line next time.
Why? Because you have no SAM in single user mode or lm mode. Thats when you need the command line knowledge.
Steve
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com