How do I mirror an external scsi vg to one hdisk san? The vg has multiple hdisks and the san hdisk has only one.
Is this possible or do I need to create the same hdisks as the scsi? What I meant is, if the scsi vg has 10 hdisk then I need to create also 10 hdisk of san with the same size as per hdisk?
Short answer: yes, you can mirror several SCSI disks to one SAN disk - but you should not do it anyways.
Long version:
FS considerations
As far as your sample vg layout goes you still use JFS(-1) filesystems. You should change that to the newer and by far better JFS2-filesystem. It will be necessary to recreate the filesystems and do a backup/restore of the data. As far as i know there is no way to convert JFS to JFS2 directly.
VG considerations
There are some limits in the LVM and one does good to stay away from any of them. The most restraining one is (in my experience) the PP size. As a PV can only hold 1019 PPs it limits directly the size of the disks you can effectively use. (Yes, there is the possibility of using a "factor" to lighten this restriction up to a certain point but at the same time it even tightens the limit on the maximum number of PVs in a VG, so i would not consider it as a long-term solution. Better stay away from that and save this option for a situation where it really *really* is your only possibility.)
As you have several SCSI PVs in the VG i suppose the PP size to be relatively small. When you add your SAN disk it probably exceeds the PP number limit and would practically enforce you to introduce a factor into the VG. The IMHO better (that is: more sustainable) solution would be recreate the VG anew and with better suited values for PP size.
Conclusion
If you still want to migrate to the new disk without recreating the VG and the FSs do the following, which can all be done without any downtime:
Add the new PV to the VG, maybe first changing the VG to a "Big VG" and introducing a factor as necessary.
use the "mirrorvg" facility to add mirrors to every LV, you can designate the new PV as destination for the mirror. You can do that using SMITty.
wait until the synchronization is finished. This may take some time and you might want to start in an evening so this can take place over night.
remove the mirror using the "unmirrorvg". You can again use SMITty and designate which mirror to remove by declaring the PVs from which the mirrors are to be removed.
used "reducevg" to get the old disks out of the VG finally.
use "rmdev" to remove the SCSI devices, disconnect them from the system.
Again, i would consider this as an unfortunate solution, but it *can* be done without any downtime (just the performance would be noticeably degraded during the synchronization). Better do the following:
create a new VG using the SAN share as PV. Carefully choose a sensible value for the PP size as it limits the maximum size of the PVs in the VG as well as the maximum capacity of the VG as a whole. (Introducing a factor means multiplying the maximum number of PPs per PV as well as dividing the maximum number of PVs in the VG by this factor, so the maximum diskspace held by the VG is final!)
create LVs/FSs using the old VG as a blueprint. Use JFS2 as filesystem. Use temporary mountpoints to mount the newly created FSs.
2a. Create a (several?) mountgroup(s) for the new filesystems. You can use "mount -t" to mount all the filesystems in such a group so this is a handy device. You do this by adding a "type = <mountgroup name>" line into the FS stanza in /etc/filesystems.
Identify static content of the filesystems. This can be copied to the new FSs in advance.
Get a downtime to migrate the rest of the data via copy/restore. Tip: you can do it in one pass using the following mechanism:
# cd /old/fs
# tar -cvf - * | (cd /new/fs ; tar -xf - )
umount the old FSs and new , change the temporary mountpoints of the new FSs in /etc/filesystem, mount the new filesystems.
let some time pass to make sure everything is ok. You can still mount the old FSs to temporary mountpoints if something is (supposed to be) missing.
after a "varoffvg oldvg" and "exportvg oldvg" delete the devices of the SCSI devices and unplug them.
These are just LVs, which are not in use at the moment, because the filesystems on them are unmounted. If you still need them or not is nothing we can find out for you - it might be a database as well as any other type of data, but the reason the LVs are "closed" is because of the FSs they contain are not mounted.