AIX procedure for creating a logical volume from CLI

Hi,

What is the typical AIX procedure for creating a logical volume from CLI.

I have mostly worked on HPUX so far and on which the typica steps are:

1: pvcreate -f /dev/rdsk/<mydisk>
2: mkdir /dev/<myvg>
3: mknod /dev/<myvg>/group C 64 <0x030000>
4: vgcreate /dev/<myvg> /dev/dsk/<mydisk>
5:lvcreate -L <1000> /dev/<mydg>/

On one of my AIX box,while trying to do mkvg,i am getting following error message:

[root@labaix10:/]# mkvg -f -y vg1 hdisk183
0516-1254 mkvg: Changing the PVID in the ODM.
0516-1397 mkvg: The physical volume hdisk183, will not be added to
the volume group.
0516-862 mkvg: Unable to create volume group.

[root@labaix10:/]# echo $?
1

More info:
[root@labaix10:/]# uname -a
AIX labaix10 3 5 0004703ED700
[root@labaix10:/]# oslevel
5.3.0.0

[root@labaix10:/]# lsvg
rootvg
[root@labaix10:/]# lspv
hdisk0 0004703ea1ffac35 rootvg active
hdisk1 0004703ef54cfd06 None
hdisk183 none None <===
hdisk184 none None
hdisk185 none None
hdisk186 none None
hdisk187 none None
hdisk188 none None
hdisk189 none None
hdisk190 none None
hdisk191 none None
hdisk192 none None

~amit

The problem may be that the hdisk (which seems to come from some storage subsystem) is already in use on another system. The system will discover the PVID and the VG-information only after establishing access to the disk, which isn't possible as long as it is used by another system concurrently.

bakunin

Hi Bakunin,

Thanks for your reply,Yes the disk was under control of another Volume manager(Veritas Volume Manager),After removing from it,i could create the
OS-native Logical volumes.

Thanks,
~amit