- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Add 2 new hard disks to existing mirror
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-28-2004 02:35 AM
12-28-2004 02:35 AM
I need some advise from experts here.
My system HP-UX (11.11) has 3 volume group, one of the volume group vg02, have 2 lvols reached 88% each and this vg02 consists of 2 PV (Hard disks 36GB each) and it is mirror between these 2 hard disks. Recently I have bought 2 new harddisks (also 36GB each). So my question is, how can I add this 2 new hard disks to vg02 and mirror them. So after adding these 2 new hard disks, the source disks (2 disks-one old and 1 new) will become 36GB +36GB and the mirror disks (2 disks-one old and 1 new) will also become 36GB +36GB.
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 02:38 AM
12-28-2004 02:38 AM
Re: Add 2 new hard disks to existing mirror
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 02:47 AM
12-28-2004 02:47 AM
Re: Add 2 new hard disks to existing mirror
Pete has summed it up rather nicely & it is really that easy.
But I would like to point out that mirroring is at the LV level - not the PV nor VG level.
This means that you could have multiple LVs in a VG and mirror some of them, you don't have to mirror all of them.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 03:15 AM
12-28-2004 03:15 AM
Re: Add 2 new hard disks to existing mirror
Like it is said,
Do "vgextend" for each of these new disk to include them into the vg and then do a lvextend/fsadm or lvextend/extendfs to extend the lv and the mirrors on the new disk.
While doing an lvextend, add both the pvs over there and the primary and the mirror would be placed on different disks,
lvextend -L new_size_in_MB /dev/vg_name/lv_name /dev/dsk/ist_disk /dev/dsk/2nd_disk
If you have used PVG while creating the vg and chose the option -s g while creating the lv, it makes sure that the primary and the mirror copies are always on different disks. Do "man lvcreate" to know more about this option. May help in future.
This link may help understand the concept of PVG,
http://docs.hp.com/en/B2355-90682/lvmpvg.4.html
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 12:43 PM
12-28-2004 12:43 PM
Re: Add 2 new hard disks to existing mirror
Thanks for your response to the question. The current 2 disks in vg02 are /dev/dsk/c5t8d0 and /dev/dsk/c7t8d0 and both are mirror to each other. Lets say after I install or add the 2 new hard disks (/dev/dsk/c5t10d0 and /dev/dsk/c7t10d0). I shall isssue the following commands:
extend the volume group of vg01:
vgextend /dev/vg02 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
extend the lvols (/dev/vg02/lvol1 and /dev/vg02/lvol2):
lvextend -L Disk_Size /dev/vg02/lvol1 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
Is the above commands can perform correct and able to perform what I want, do I need to issue lvextend -m 1 /dev/vg02/lvol1 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0 in order to mirror the 2 new disks??
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 12:59 PM
12-28-2004 12:59 PM
Re: Add 2 new hard disks to existing mirror
For the lvextend part, the commands are:
lvextend -L Disk_Size /dev/vg02/lvol1 /dev/dsk/c5t8d0 /dev/dsk/c5t10d0
lvextend -L Disk_Size /dev/vg02/lvol2 /dev/dsk/c5t8d0 /dev/dsk/c5t10d0
Next is to mirror ??:
lvextend -m 1 /dev/vg02/lvol1 /dev/dsk/c7t8d0 /dev/dsk/c7t10d0
lvextend -m 1 /dev/vg02/lvol1 /dev/dsk/c7t8d0 /dev/dsk/c7t10d0
Are the commands correct??
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 02:54 PM
12-28-2004 02:54 PM
Re: Add 2 new hard disks to existing mirror
No, the command you show us is not correct. 1. first extend all the new disks to the exiting VG:
vgextend /dev/vg02 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
2. Then mirror:
lvextend -m 1 /dev/vg02/lvol1 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
lvextend -m 1 /dev/vg02/lvol2 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
3. Then extend the LV.
lvextend -L size_in_MB_want_to_extend /dev/vg02/lvol1
lvextend -L size_in_MB_want_to_extend /dev/vg02/lvol2
Hope this helps
Regard,
HoangChiCong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 07:29 PM
12-28-2004 07:29 PM
Re: Add 2 new hard disks to existing mirror
I think the right would be as follows:
Assuming you have lvol1 and lvol2 created on /dev/dsk/c5t8d0 and are mirrored on /dev/dsk/c7t8d0.
Now.
0. vgextend with two PV's say PV1 and PV2
1. Umount the filesystems.
2. lvreduce -m 0 ( to break the mirroring)
3. lvextend -L
4. extendfs filesystem
5. lvextend -m 1 ( Use c7t10d0 here )
e.g you extended lvol1 on /dev/dsk/c5t10d0 and want to mirror it on /dev/dsk/c7t10d0 then:
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c7t10d0
Go through the command syntax properly.
Hope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 07:32 PM
12-28-2004 07:32 PM
Re: Add 2 new hard disks to existing mirror
one typo..
please read
"# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c7t10d0"
as
"# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c7t10d0"
regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 07:41 PM
12-28-2004 07:41 PM
Re: Add 2 new hard disks to existing mirror
After u break the mirror for /dev/dsk/c5t8d0 and /dev/dsk/c7t8d0. For your example, U mirror only the new disks (/dev/dsk/c7t10d0) but what about the old disk /dev/dsk/c7t8d0??
or is it you miss out??
For example:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c7t8d0 /dev/dsk/c7t10d0
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 08:33 PM
12-28-2004 08:33 PM
Re: Add 2 new hard disks to existing mirror
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 08:40 PM
12-28-2004 08:40 PM
Re: Add 2 new hard disks to existing mirror
Now here it is:
If both the lv's lvol1 and lvol2 are 36 GB each then you can use One disk each per lv for mirror and if they are of different sizes then you need to create one single PVG of two newly added disk and use PVG name instead to keep your mirrors of two lv's.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 11:40 PM
12-28-2004 11:40 PM
Re: Add 2 new hard disks to existing mirror
You said:
"U mirror only the new disks (/dev/dsk/c7t10d0) but what about the old disk /dev/dsk/c7t8d0??
or is it you miss out??"
Well when you break the mirror you have lv only on one disk i.e. c5t8d0 and since you have no mirror now c7t8d0 is free.
Now you add one disk (say c5t10d0) to data disk (c5t8d0) i.e. you extend your lv on that disk only. Call this as data set.
Then you get your free old disk (c7t8d0) and the new one c7t10d0 and form one PVG on which your mirrors of lvol1 and lvol2 will reside. This will be your mirror set.
So while mirroring you only have to mention the disk or PVG on which you are mirroring.
# lvextend -m 1 lvpath pv_path_or_PVGname
This will take care of lv which are greater than 36 gb also. Becasue after making PVG you will see consolidated storage of 72gb.
Hope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 12:27 AM
12-29-2004 12:27 AM
Re: Add 2 new hard disks to existing mirror
Regarding your sentence below:
"So while mirroring you only have to mention the disk or PVG on which you are mirroring.
# lvextend -m 1 lvpath pv_path_or_PVGname"
Is it correct for me to issue the following commands:
a)
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c7t8d0 /dev/dsk/c7t10d0
or
b)
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c7t8d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c7t10d0
Please advise
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 01:18 AM
12-29-2004 01:18 AM
Solution1. Create file lvmpvg in etc directory.
# vi /etc/lvmpvg
Press insert (i key) and cut paste the
information below in that file.
VG /dev/vg02
PVG PVG0
/dev/dsk/c7t8d0
/dev/dsk/c7t10d0
Press
Your file will be saved
Now your lvextend command:
# lvextend -m 1 /dev/vg02/lvol1 PVG0
# lvextend -m 1 /dev/vg02/lvol2 PVG0
That's all.
Regards,
p.s. Read Sanjay's post carefully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 01:39 AM
12-29-2004 01:39 AM
Re: Add 2 new hard disks to existing mirror
this is how you do this,
Say you already have lvol1 & lvol2 in /dev/vg02 and the disks you are currently using are /dev/dsk/c5t8d0 & /dev/dsk/c7t8d0 and the lvs are currently mirrored. Now you want to add /dev/dsk/c5t10d0 & /dev/dsk/c7t10d0 and extend the lvs and their mirrors on these new disks.
You do not have to break the mirror, do lvextend and extend the lv on the new disks,
Do pvcreate first, use -f if necessary.
pvcreate /dev/rdsk/c5t10d0
pvcreate /dev/rdsk/c7t10d0
Next add them into the vg,
vgextend /dev/vg02 /dev/dsk/c5t10d0
vgextend /dev/vg02 /dev/dsk/c7t10d0
Now extend the lvs and their mirros on these new disks,
lvextend -L new_size_in_mb /dev/vg02/lvol1 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
lvextend -L new_size_in_mb /dev/vg02/lvol2 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
If you have onlineJFS you can use fsadm to extend the filesystem without unmounting the filesystem,
fsadm -F vxfs -b new_size_in_block /mount_point
If you don't have onlineJFS, you'll have to unmount the filesystem and then use extendfs to extend the filesystem.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 01:51 AM
12-29-2004 01:51 AM
Re: Add 2 new hard disks to existing mirror
Tkx for your reply.
Sanjay as you mention:
Now extend the lvs and their mirros on these new disks,
lvextend -L new_size_in_mb /dev/vg02/lvol1 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
lvextend -L new_size_in_mb /dev/vg02/lvol2 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
Seem like you miss out -m 1:
lvextend -L new_size_in_mb -m 1 /dev/vg02/lvol1 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
lvextend -L new_size_in_mb -m 1 /dev/vg02/lvol2 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
Or without -m will also create the mirror.
I doubt without -m 1 will create a mirror.
Correct me if I am wrong.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 02:01 AM
12-29-2004 02:01 AM
Re: Add 2 new hard disks to existing mirror
no i did not miss out on -m 1, since the mirror already exist.
when you extend an lv that is already mirrored you don't have to specify -m 1 again.
just do lvextend -L new_size lv_name pv1_name pv2_name
You have to specify a -m 1 option when the lv is not mirrored and you want to create a new mirror, which i was assuming is not the case with you in this situation.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 02:25 AM
12-29-2004 02:25 AM
Re: Add 2 new hard disks to existing mirror
U mean by using lvextend -L new_size_in_mb /dev/vg02/lvol1 /dev/dsk/c5t10d0 /dev/dsk/c7t10d0
LVM will know and assisg /dev/dsk/c5t10d0 to data disk and /dev/dsk/c7t10d0 and automatically mirror them??
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 02:42 AM
12-29-2004 02:42 AM
Re: Add 2 new hard disks to existing mirror
Yes, that is currect. lvm would use the 1st pv for the primary copy and the 2nd pv as the mirror copy when two pvs are specified in the lvextend command for a mirrored lv.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 10:26 AM
12-29-2004 10:26 AM
Re: Add 2 new hard disks to existing mirror
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 11:52 AM
12-29-2004 11:52 AM
Re: Add 2 new hard disks to existing mirror
Tkx for your information.
Thanks & Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2006 04:49 PM
05-03-2006 04:49 PM