Operating System - HP-UX
1837970 Members
2858 Online
110124 Solutions
New Discussion

mirrors with different layouts ?

 
SOLVED
Go to solution
Carsten Hennig
Occasional Advisor

mirrors with different layouts ?

Hi all,

sorry, I am new to HP-UX, so maybe two easy questions.

First question: I have some striped volumes in use. I would like to migrate the data to new storage devices. I don't want to have the data striped on the new devices as these are h/w stripes already. I thought of mirroring the existing volumes to the new pv's. But, is it possible to create the copy not striped ?

Second question: The PE size is 4 MB in all of my vg's. This was sufficient for the 8GB pieces I got from my old EMC box. Now, with the new boxes, I could create devices much larger than 8GB, but it seems that they do not fit into the vg. Is it possible to change PE size or the maximum number of PEs per PV ?

Thanks,
Carsten
11 REPLIES 11
Naveej.K.A
Honored Contributor

Re: mirrors with different layouts ?

hi Carsten,

1. When you want to migrate the data, you can easily create a new VG, create new lvols, mount them and then copy the data. When you are done with, you can ask the database to use the files/data from the new storage device. modify the /etc/fstab accordingly

2. You need to recreate the Volume group for you to incorporate disks which are larger than largest disk in the VG unless you have created the Volume group with the -e option.

with best wishes
Naveej
practice makes a man perfect!!!
Bharat Katkar
Honored Contributor

Re: mirrors with different layouts ?

Hi,
Naveej clarified it correclty. Well to add something:
1. You only have to backup your VG which is stripped. Then create same VG structure on your New storage which you say is already stripped at H/w level. Then simply restore your backup, it will work. Then you can create more lv's into the same VG and simply mirror them using lvextend -m command. see man lvextend.

2. Here again you need to backup existing VG (PE 4 MB), recreate it with -e option (PE 8MB) and restore the data back. Simple one.

Hope that addresses your issues.
Regards.
You need to know a lot to actually know how little you know
Carsten Hennig
Occasional Advisor

Re: mirrors with different layouts ?

Thanks for your answers. That means in either case I have no chance to change the config online ? There are some highly productive machines with more than 2 TB of storage attached, this will take ages to backup and restore, right ?

Carsten
Naveej.K.A
Honored Contributor

Re: mirrors with different layouts ?

hi carsten,

when you said migrating the data, i beleive you got an existing storage and you are moving to a new storage device. If you can connect both of them online. you could do this step by step. hope you have different file systems to store your 2TB data. create one by one and then shift to the new device one by one. the copy shouldn't take much time, if they are single big files.

with best wishes
naveej
practice makes a man perfect!!!
Carsten Hennig
Occasional Advisor

Re: mirrors with different layouts ?

Hm, nobody answered my original first question so far. If I have a lv which is striped across 10 disks, and I want to add a mirror, what happens if I tell lvextend to use 2 particular disks for the new mirror (instead of 10) ? Does the command fail ?

Carsten
Ashwani Kashyap
Honored Contributor

Re: mirrors with different layouts ?

You cannot use LVM mirroring with LVM BLOCK striping.
BLOCK striping means that you use the -i and -I options with lvcreate .

However, you can use LVM extent striping with LVM mirror.
Extent striping means that you used the -D option with lvcreate.

David Child_1
Honored Contributor

Re: mirrors with different layouts ?

Carsten,

As Ashwani mentioned, if your logical volumes were created using the '-i and -I' options for striping, you cannot use LVM mirroring. You will need to perform the tasks mentioned by the others (e.g. create new logical volumes and file system(s) and copy the data).

If these striped logical volumes were created using the '-D' (extent based) option, then you can use LVM mirroring. I have some ideas about how it might work to change the layout, but I haven't tested it. If you could post an lvdisplay of your logical volume we could determine how your local volume stripes were set up.

David
Carsten Hennig
Occasional Advisor

Re: mirrors with different layouts ?

Thanks, here is the output from lvdisplay for one volume.

Carsten
RAC_1
Honored Contributor
Solution

Re: mirrors with different layouts ?

Now you are clear, you can not mirror a stripped volume.

If I would have been you, I would have done it as follows.

1 BACK UP (If required later on--just in case)

2 Create new VGS, with required sizes. (take care of -e option) Create lvols required.
Copy data from old vgs to new vgs.

3. If everything is OK, remove old vg.
You can further import the new VG as your old vg. (If you do not want to change vg name)
vgexport -pv -s -m /tmp/vg_new.map /dev/vg_new

mkdir /dev/vg_old
mknod /dev/vg_old/group c 64 0x0y0000
y==appropriate minot number
vgimport -vs -m /tmp/vg_new.map /dev/vg_old
Activate it and mount.

For your information, To take care of insufficient PE, you can use vgmodify tool. But bewae, this is not supported.

Anil

vgimport -v -s -m /t
There is no substitute to HARDWORK
Ashwani Kashyap
Honored Contributor

Re: mirrors with different layouts ?

This is a blocked striped logical volume
Carsten Hennig
Occasional Advisor

Re: mirrors with different layouts ?

Hi, I am still reading the manuals. ;-)
Is it possible to use pvmove for striped volumes to migrate data to the new storage devices ? Of course, I would have to keep the old volume structure, then.

Carsten