- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- LVM - help extending VG's
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
тАО10-26-2004 04:10 AM
тАО10-26-2004 04:10 AM
I've got a system with two 9gb disks as a root mirror. I've been asked to spread VG00 over four 9gb disks so we have 18gb on each half of the mirror. I'm used to changing disks etc with LVM but I've never done this before. Can someone point me in the right direction? So far I've split the mirror so I only have one disk in VG00. I have my new 9gb disk which I want to add to the VG but do I use the vgextend command? Then when I have the pair of disks as one VG, how do I get both disks to look like a mirror?
A cookbook would be handy if you could point me to one?
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 04:16 AM
тАО10-26-2004 04:16 AM
Re: LVM - help extending VG's
If they are hot swaps, run ioscan, see that they are claimed.
insf -C will get you device drivers
pvcreate -f /dev/dsk/c#t#d#
#make sure this part is right. Use real data.
then vgextend /dev/vg00 /dev/dsk/c#t#d#
At that point you can extend filesystems.
/ root must be contiguous.
swap must be contiguous.
Here are my general instructions for adding a complete mirror set. A portion of these will do the job for you:
pvcreate -B /dev/rdsk/c1t0d0 #use real disk
mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk
# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?
If you are running 64-bit OS:
# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?
vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0
# real disk. repeat for other lvols
lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk
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
тАО10-26-2004 04:21 AM
тАО10-26-2004 04:21 AM
Re: LVM - help extending VG's
you asked for it, Here it is.
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000073345589
The itrc doc id is LVMKBRC00005103.
Do remeber we mirror all the lvs in vg00 and not only lvol1-lvol3. They need to be done in the order specified and must be done first. For the other lvs there is no specific order neccessary.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 04:34 AM
тАО10-26-2004 04:34 AM
Re: LVM - help extending VG's
Once I've used the vgextend command I can see the free extents are added when I do a vgdisplay but its extending my logical volumes over the two disks I seem to be having the most problems with?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 04:48 AM
тАО10-26-2004 04:48 AM
Re: LVM - help extending VG's
In order to help you in your brainstorming may I ask you more information on the system and what you can do (e.g. make_recovery and rebuild vg00?) :
Are your disks hotswap?
Are they on separate controllers?
What is installed on vg00? Just system?
etc...
It would have been easyer if you were given 2 disks of 18 GB...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 06:13 AM
тАО10-26-2004 06:13 AM
Re: LVM - help extending VG's
I have an N-class hooked up to a SC10 for the purpose of this test, as I├в d like to try it on my test machine before going to the customer site.
I have four disks in the SC10 > c0t0d0(9gb), c0t8d0(18gb), c0t1d0(9gb) & c0t9d0(18gb)
c0t0d0 is in VG04 and has one lvol (lvol1). I want to increase the space on this lvol but have 90% disk usage. So have added a second disk.
I├в ve used c0t8d0:
pvcreate ├в f /dev/rdsk/c0t8d0
vgextend /dev/vg04 /dev/dsk/c0t8d0
lvextend ├в L 700 /dev/vg04/lvol1 /dev/dsk/c0t8d0
Now I├в ve pvcreated c0t1d0 & c0t9d0 seperately
I├в ve also vgextended the both of them separately so now all four disks are in the volume group but not mirrored.
The part I am stuck on is the next step? With two disks I would normally do an lvextend ├в m 1 /dev/vg04 /dev/dsk/├в the disk device file├в ├в but I have two disks to add here.
I├в ve tried: lvextend ├в m 1 /dev/vg04/lvol1 /dev/dsk/c0t1d0 /dev/dsk/c0t9d0 but it doesn├в t like it.
Surely the
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 06:29 AM
тАО10-26-2004 06:29 AM
SolutionYou could put 2 disks into 1 group and the other 2 in the other group.
Another possibility is to use pvmove to move the extents for lvol4,5,6,7,or 8 to another disk and mirror them to another specific disk.
eg.
lvol1-3 disk1 mirror disk2
lvol4-6 disk3 mirror disk4
lvol7 disk1 mirror disk2
lvol8 disk3 mirror disk4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 07:29 AM
тАО10-26-2004 07:29 AM
Re: LVM - help extending VG's
I've set it up on my test machine perfect, now I can go do the real thing...
Cheers to all of you for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2004 12:20 PM
тАО10-26-2004 12:20 PM
Re: LVM - help extending VG's
The easiest thing to do is to just take the commands you just listed and put them into a script.
You can make the disk device and hardware path variables so that you change everything at the beginning and that is it.
In your case something like:
# cat create_mirror
DISK=c2t6d0
PRI_HWPATH="0/0/2/1.6.0"
ALT_HWPATH="0/0/2/0.6.0"
pvcreate -B /dev/rdsk/${DISK}
mkboot /dev/rdsk/${DISK}
mkboot -a "hpux -lq" /dev/rdsk/${DISK}
vgextend /dev/vg00 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/${DISK}
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/${DISK}
lvlnboot -R
lvlnboot -v
setboot -p ${PRI_HWPATH}
setboot -a ${ALT_HWPATH}
setboot
That's all there is to it. Scripting isn't as difficult as you think it is.
Also, note the vgdisplay -v , used PE(s) before and after mirroring.