- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Difference between lvextend and lvsplit
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
Discussions
Discussions
Forums
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
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-25-2005 03:30 PM
тАО05-25-2005 03:30 PM
Difference between lvextend and lvsplit
Here's our situation, we have root disks mirrored(c0t12d0,c1t12d0), I would like to split it for migration usages, as following is my idea thinking. I know I can choose to boot from make_tape_recovery tape, but it's time consuming.
Case_A,
"lvextend -m 0 /dev/vg00/lvolX /dev/dsk/c1t12d0" to remove mirror-copy of each root volume
2. start migration tasks, if migration fail, boot by /dev/dsk/c1t12d0, and use 'lvextend -m 1 /dev/vg00/lvolX /dev/dsk/c1t12d0' to do the mirror-copy
Case_B,
use "lvsplit" and "lvmrege" to do the same thing, if fails, sync from the /dev/vg00/lvolXb
Case_C,
use -lq to bypass lvm quorm check when boot from c0t12d0, start migration tasks, if fail,
reboot from c1t12d0 without -lq, then resync the disks, if success, reboot from c0t12d0 and resync the disks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2005 04:37 PM
тАО05-25-2005 04:37 PM
Re: Difference between lvextend and lvsplit
lvextend is not the command to reduce the mirror. you have to use
lvreduce -m 0 /dev/vg00/lvolx /dev/dsk/c1t12d0 for each logical volumes to reduce the mirror.
Regards,
--Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2005 05:52 PM
тАО05-25-2005 05:52 PM
Re: Difference between lvextend and lvsplit
To mirror:
lvextend -m 1
lvsplit is used to break the mirrors.
I've never used lvmerge to put mirrors back together.
The risk is that the mirrors have changed in some way making the merged logical volume a heap of magnetic garbage.
Hope this clarifies.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2005 06:14 PM
тАО05-25-2005 06:14 PM
Re: Difference between lvextend and lvsplit
Use 'lvsplit' instead of 'lvreduce -m 0' (and not lvextend -m 0) to break mirror; and 'lvextend -m 1' to mirror.
Regards,
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2005 09:12 PM
тАО05-25-2005 09:12 PM
Re: Difference between lvextend and lvsplit
case A:
1) If you remove the copy mirror in your 2nd disk, you will not be able to boot from it because 2nd disk will have no PE of /dev/vg00/lvol3 (for example). In other words, you try to boot from a disk whose LVM header says that 2nd disk contains no PE of /dev/vg00/lvol3 (after removing disk mirror all PEs reside in 1st disk and, though PEs contains original data, they are seen as FREE PE).
2) you suggested to run 'lvextend -m 1 /dev/vg00/lvolX /dev/dsk/c1t12d0'... after booting from c1t12d0... This will copy data from c0t12d0 (containing bad data) onto c1t12d0 (containing safe system)
case C:
Booting using -lq in order to bypass LVM quorum check will NOT split any mirror. This is useful only for disk failures. If both disks are fine and mirror haven't been brokern, data from upgrade will be written to both disks.
case B: the most interesting (I had to use)
1) /dev/vg00/lvol3 must be splitted in last 'lvsplit' command because it holds /etc/lvmtab file.
2) After splitting you MUST fsck /dev/vg00/lvol3b (and all other lvols containing FileSys), mount it on any trivial dir (for example /m1), and CHANGE the logical volume names in this /m1/etc/fstab file (You must change lvol4 by lvol4b, lvol5 by lvol5b, and so on). If you plan to boot using OLD logical volumes (containing the pre-upgrade data) you must mount the /dev/vg00/lvolXb logical volumes, not the /dev/vg00/lvolX ones (containing bad data).
3) In LVM headers of boot disks, lvol1 and lvol3 are set as BOOT and ROOT devices. In case of upgrade failure and reboot from safe disk, I think these setting should be changed to lvol1b and lvol3b (I guess). Read lvlnboot man pages.
Please, read doc X1401978. It is a good guide for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2005 12:42 AM
тАО05-26-2005 12:42 AM
Re: Difference between lvextend and lvsplit
Other people have posted parts of the answer; hopefully, this'll be all of it.
lvextend is used to extend lvs, not reduce them. To reduce mirrors, you want lvreduce -m 0 ${lv}
ISP> hpux -lq won't affect the mirrors either; that's not what you want.
In order to protect your operating system while upgrading your boot disk, do the following:
1. Use lvsplit to create new logical volumes of all vg00 based LVs. Note the new LV names.
2. Mount the split lv for the root filesystem. After creating a backup copy, update the split /mnt/etc/fstab to reflect all the split lvs instead of the originals.
3. Execute setboot to verify that the system sees the alternate boot disk as a valid boot path.
4. Upgrade; make damned sure you upgrade the correct disk.
5. If you need to eliminate the upgrade, boot from the alternate disk and execute
lvmerge -A n ${upgraded_lvs} ${split_lvs}
then restore the backed up copy of /etc/fstab
Then reboot to start using the old OS again.
It is complex, but it's not rocket science. Make sure you undestand what you're doing at each step. You can email me directly, if you want more direct help.
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2005 08:57 PM
тАО05-26-2005 08:57 PM
Re: Difference between lvextend and lvsplit
ALL our HPUX-Minds given diff solutions for your requirement. what i feel is that most of those are very complex.
i am giving very simple and safe solution.
1,Check your all LV's are got properly mirrored and not spaning accross the disk's
#lvdisplay -v /dev/vg00/l* |grep stale
2,shutdown and boot the system using alternate disk for confirming second disk is able to boot properly.
Main Menu> Bo Alt
ISL>hpux -lq
3,Hard shutdown the system.
4,Physically plug out any one of the disk.
Ex: alternate disk.
5, boot the system using Pri disk.
Main Menu> Bo Pri
ISL>hpux -lq
6,complete your activity (upgradation )and test for 3 to 4 days.
7,When ever you decided to re-sync simply plug the disk and run below command.
#ioscan -fnC disk
#vgchnage -a y vg00
#vgsync /dev/vg00
it will take little time and your system is ready.
In case of your upgrdation is fails or satuvation come for boot with old disk.
shutdown the HPUX and plug the alt disk and boot with alt. disk. Now your system will got rollback.
This i did severla time and i can assure it will work.
if have any dobut, you can contact me directly ..
regards,
Sivaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2005 02:43 AM
тАО05-27-2005 02:43 AM
Re: Difference between lvextend and lvsplit
I use split and merge all of time. The secret for merge is to make sure you merge them back into the correct order.
I have never tried Option B but it should work.
I am going to give you a Case_D
what I use
1. you have a tape backup (make_tape_recovery)
2. boot disk are swapable.
3 lvreduce vg00 logical volumes and vgreduce c1t12d0.
4. dd if=/dev/rdsk/c0t12d0 of=/dev/rdsk/c1t12d0 bs=64k
5. you can now reboot and do your upgrade.
6.0 it your migration fails
a. swap disks c1t12d0 with c0t12d0
b. boot up and you have your orginal up.
7. After your migration is done
do the normal mkboot, vgextend, lvextend, etc,etc to the c1t12d0 to make it boot mirror of the upgrade c0t12d0.
(At step five you might want to swap disk
and boot off the copy and use it for the migration, that way you know
that your copy is good.)
Rory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2005 02:49 AM
тАО05-27-2005 02:49 AM
Re: Difference between lvextend and lvsplit
Maybe you could explain, first, exactly what your migrating or hoping to do.
It's a bit skewed...are you doing and upgrade on your server, or are you migrating from one server to another...
Cause I'm hearing alot of folks saying what they 'think' you mean....but I'm not sure I heard it from you, what you mean.
Thanks,
Rita