- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Extending & mirroring existing lvol to new dis...
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-04-2007 04:30 AM
12-04-2007 04:30 AM
- vg00 is two-disk mirrored configuration (disk1 lvols mirrored to disk2)
Now I'm adding two disks (disk3 & disk4) to that vg00 and trying to extend few lvols to new disks.
So I'd like to have mirrored pairs like:
disk1 -> disk2
disk3 -> disk4
When extending existing lvol so that it starts to allocate extents from disk3, how to be sure that those extents are mirrored to disk4? (Or is this done automatically?)
I used default setting for allocation policy when those lvols were created so those mirrors of a logical extent cannot share the same physical volume. Does that mean that lvextend just starts to mirror those extents to next disk on same vg (disk4 in this case)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 04:49 AM
12-04-2007 04:49 AM
Re: Extending & mirroring existing lvol to new disks
lvextend -m 1 /dev/vg00/lvol?? /dev/dsk/c?t?d?
it than wil mirror on the please you like it it mirror.
extentions have to be done the same:
lvextend -l 1023 /dev/vg00/lvol?? /dev/dsk/c?t?d?
greetings, Freek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 04:52 AM
12-04-2007 04:52 AM
SolutionEasiest (not safest) thing to do is to break all mirrors and rebuild them manually.
You would need to plan this out a bit to make sure no two mirrors end up on the same disk.
Doing lvextend without specifiying the disk will let LVM decide and its not always making the best decisoins.
Using sam or being non-specfic could lead to trouble.
You need to answer your question by specifying what disk the original logical volume is on and which disk the mirror is going to be on.
Lets say I have filesystem /opt which was too small and I need to extend it. It was mirrored.
It was on disk1 mirrored to disk2.
Procedure:
1) lvsplit or lvextend -m 0
2) remove or lvremove the now stale mirror copy.
3) lvextend lvol_opt disk3
4) lvextend -m 1 lvol_opt disk2 disk4
This does not precisely control the outcome.
Post mirror you need to check lvdisplay -v lvol_opt
Assume nothing lvm does is automatic or comes out in a fashion that makes sense. Take control.
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
12-04-2007 04:54 AM
12-04-2007 04:54 AM
Re: Extending & mirroring existing lvol to new disks
for example if you want to move lvolx from vg00 which is currently with disk1 and disk2
lvreduce lvolx with disk1(now only disk2)
lvextend lvolx with disk3(now disk2 and disk3)
lvreduce lvolx with disk2(now only disk3)
lvextend lvolx with disk4(now disk3 and disk)
But make sure that the disk combination comes from different controller.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 05:19 AM
12-04-2007 05:19 AM
Re: Extending & mirroring existing lvol to new disks
I will start by asking you what size disks are you using in vg00 (to be willing to extend that much there is need of extra disks...)
My concern is more like "In case of crash or in need of recovery from an ignite image, how long will it take, especially when using DAT "
Are you sure you could not move some non system lvols out of vg00 to a new group and mirror that group with your 2 new disks?
Many of us tend to keep vg00 at a strict minimum - system that is...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 09:51 AM
12-04-2007 09:51 AM
Re: Extending & mirroring existing lvol to new disks
2) while mirroring, you specify the disk (see above), but how about creating the lvol? where is it created?
- create an empty lvol
- extend it to a specific disk
- mirror it to another disk
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 10:35 PM
12-04-2007 10:35 PM
Re: Extending & mirroring existing lvol to new disks
Judging from your answers, easiest way is to create new vg and add those two new disks to it. Because the file system that needs to be extended is /opt, I could create /opt2 or similar to new vg and so on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2007 10:48 PM
12-04-2007 10:48 PM
Re: Extending & mirroring existing lvol to new disks
If you have other non standard directories on the first disks, you should consider to move them to the new vg and extend /opt on the boot disks.
Otherwise it could be better to include the new disks into vg00.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2007 12:00 AM
12-05-2007 12:00 AM
Re: Extending & mirroring existing lvol to new disks
than you see the largest product, normaly I tahn create a new lvol:
/opt/aplication
ps if you create a new vg do not forget to alsow put it in the ignite backup els you do not have a goot bootble backup of the os...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2007 03:17 AM
12-05-2007 03:17 AM
Re: Extending & mirroring existing lvol to new disks
ant:/opt $ bdf|grep opt
/dev/vg00/lvol6 3481600 2599755 827935 76% /opt
/dev/esvg01/lvol5 819200 430368 364543 54% /opt/patrol
/dev/vg00/lvol12 900000 681962 204718 77% /opt/java
/dev/esvg03/lvol10 3080192 2256585 772159 75% /opt/sas/9.1.3
ran:/tmp2/tsmcli-5.2.2 $ bdf |grep opt
/dev/esvg01/lvol7 266240 40045 212060 16% /var/opt/tipix/tipprd
/dev/esvg02/lvol7 1048576 144101 847996 15% /var/opt/pvcs
/dev/esvg02/lvol3 901120 18975 827604 2% /var/opt/app/frec
/dev/esvg01/lvol5 884736 226757 617036 27% /var/opt/app/fprd
/dev/vg00/lvol9 2527232 1782444 698278 72% /opt
/dev/esvg02/lvol5 163840 118366 42643 74% /opt/tipix/tiprec
/dev/esvg01/lvol8 172032 88267 80761 52% /opt/tipix/tipprd
/dev/esvg02/lvol6 98304 19087 74311 20% /opt/recxcmon
/dev/esvg01/lvol9 98304 19152 74248 21% /opt/prodxcmon
/dev/vg00/lvol12 307200 247244 56306 81% /opt/patrol
/dev/esvg01/lvol10 540672 75532 437684 15% /opt/ctm
/dev/esvg02/lvol4 966656 771482 183034 81% /opt/app/frec
/dev/esvg01/lvol6 770048 680769 89279 88% /opt/app/fprd
On an old system...
aco $ bdf|grep opt
/dev/r5vg02/lvol4 512000 250086 247139 50% /var/opt/oracle
/dev/r5vg02/lvol5 512000 206060 286824 42% /var/opt/app/budget
/dev/vg00/lvol6 819200 516985 283346 65% /opt
/dev/r5vg02/lvol1 307200 121834 173833 41% /opt/tux64
/dev/r5vg01/lvol12 2048000 253300 1690675 13% /opt/patrol
/dev/r5vg01/lvol1 258048 75983 171369 31% /opt/oracle
/dev/r5vg01/lvol13 3072000 1907054 1092161 64% /opt/oracle/product/8.1.7
/dev/r5vg02/lvol8 3072000 1456082 1514979 49% /opt/oracle/product/8.1.6
/dev/r5vg01/lvol8 819200 734189 79762 90% /opt/oracle/product/8.0.4
/dev/r5vg01/lvol6 307200 164500 133787 55% /opt/natstar
/dev/r5vg01/lvol5 307200 179019 120204 60% /opt/app/budget
/dev/r5vg01/lvol7 770048 44091 680697 6% /opt/ctm/ctmagent
...
And like when the soft is not used anymore I recycle the space...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2007 08:14 AM
12-05-2007 08:14 AM
Re: Extending & mirroring existing lvol to new disks
# cat /etc/lvmpvg
VG /dev/vg00
PVG PVG0
/dev/dsk/disk1
/dev/dsk/disk3
PVG PVG1
/dev/dsk/disk2
/dev/dsk/disk4
Now create all the lvols as:
# lvcreate -D y -s g -m 1 /dev/vg??
This creates extent-based mirrored stripes which is documented in the lvcreate(1M) manpage. Look under the "-D distributed" option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2007 11:43 AM
12-06-2007 11:43 AM
Re: Extending & mirroring existing lvol to new disks
Thanks for all