Documente Academic
Documente Profesional
Documente Cultură
org Weblog
AskDba.org Weblog
Writing About Our Experiences With Oracle Databases
Home Forums Oracle10g Oracle11g Oracle12c Performance Grid MySQL Unix Resource Center
PostgreSQL About Us
I thought of sharing few tips on creating ASM devices on AIX which I will be helpful to Oracle DBA's. Suppose SysAdmin gives you list of
Serial numbers for LUN instead of device Name
In case there are lot many disks, then it could be a tiring task of running above command and finding each device. You can use below
code which will list name of devices and size (In MB) of disk.
for i in 1000 1100 1018 1118 1030 1130 104C 114C 1068 1168 1080 1180
do
j=`pcmpath query device|grep -p $i"$"|grep DEVICE|awk -F ":" '{print }'|awk '{print }`
k=`bootinfo -s $j`
echo $i $j $k
done
http://askdba.org/weblog/2009/02/creating-asm-devices-on-aix/ 1/6
8/4/2017 Creating ASM devices on AIX | AskDba.org Weblog
Now if you need to create new device name, you need to use mknod command and pass on major and minor numbers. Following code
can be used to perform same
#export m=0
# for i in hdisk4 hdisk10 hdisk5 hdisk11 hdisk6 hdisk12 hdisk7 hdisk13 hdisk8 hdisk14 hdisk9 hdisk15
do
j=`ls -la /dev/$i |awk '{print }'|awk -F "," '{print }'`
k=`ls -la /dev/$i |awk '{print }'`
m=`expr $m + 1` ;echo "mknod /dev/asm_disk"$m "c "$j $k
done
mknod /dev/asm_disk1 c 21 4
mknod /dev/asm_disk2 c 21 12
mknod /dev/asm_disk3 c 21 13
mknod /dev/asm_disk4 c 21 15
mknod /dev/asm_disk5 c 21 5
mknod /dev/asm_disk6 c 21 6
mknod /dev/asm_disk7 c 21 8
mknod /dev/asm_disk8 c 21 7
mknod /dev/asm_disk9 c 21 14
mknod /dev/asm_disk10 c 21 10
mknod /dev/asm_disk11 c 21 9
mknod /dev/asm_disk12 c 21 11
Now you can change the ownership to oracle:dba and permission to 660. I have 12 disks , so using list of 12 variables. In case you have
more disks , then you can add more variables
# for i in 1 2 3 4 5 6 7 8 9 10 11 12
do
chown oracle:dba /dev/asm_disk$i
chmod 660 /dev/asm_disk$i
done
In case you need to use same logic for creating OCR and Voting disks on RAC system, replace /dev/asm with /dev/ocr or /dev/voting . I
hope this would save some time and also prevent errors
In case you have disks in ordered number,say 53 to 62 then you can also use for loop as below.
#bash
bash-3.00#
#export m=0
#for ((i=53;i<=62;i++))
do
j=`ls -la /dev/hdisk$i |awk '{print }'|awk -F "," '{print }'`
k=`ls -la /dev/hdisk$i |awk '{print }'`
m=`expr $m + 1` ;echo "mknod /dev/asm_disk"$m "c "$j $k
done
#for ((i=1;i<=10;i++))
do
chown oracle:dba /dev/asm_disk$i
http://askdba.org/weblog/2009/02/creating-asm-devices-on-aix/ 2/6
8/4/2017 Creating ASM devices on AIX | AskDba.org Weblog
chmod 660 /dev/asm_disk$i
done
I would suggest anyone using the scripts to first check in a test environment.
Related Posts
10.2.0.4 on AIX5L (64-Bit) is Out
ASM Disk Discovery
CRS Fails to Start – 10.2.0.1 RAC Install on AIX
Effect of OS Terminal Setting “STTY” on Oracle Database
How To Discover Disk Name When LUN Number is Known (OEL5)
Share this:
1
More
1 February, 2009 in 10g. Tags: 10g, AIX5L, ASM, oracle, RAC, Unix
Related posts
← CRS Fails to Start – 10.2.0.1 RAC Install on AIX Scheduling Job through Cron?? →
If you can find a way to increment the disk # easily, you would be golden and it would save a few lines
Reply
http://askdba.org/weblog/2009/02/creating-asm-devices-on-aix/ 3/6
8/4/2017 Creating ASM devices on AIX | AskDba.org Weblog
John,
You can use soft links but oracle recommend's using mknod to create link. You can use following code to
increment disk#
-Amit
Reply
Hi there,
http://gjilevski.wordpress.com/2010/02/16/creating-asm-devices-on-aix/
The author has copied other user’s material in countless occasions without giving credit.
Reply
Yeah Martin. This seems to be exact copy.I have put a comment, let’s see what he has to say.
Cheers
Amit
Reply
http://askdba.org/weblog/2009/02/creating-asm-devices-on-aix/ 4/6
8/4/2017 Creating ASM devices on AIX | AskDba.org Weblog
Thanks to your instructions, I was able to get this working once before. However, I am trying to do it again and I’m
running into trouble. When I try to create the ASM disk group during the grid infrastructure installation, the disks do not
show up. In my case, the disks I’m trying to add are EMC powerpath disks. Any idea what could cause them to not show
up?
Reply
Hi Lucas,
If you have set set asm_diskstring parameter to correct value i.e, something like /dev/rhd* (in case of emcpowerpath)
the disks should be visible to you.
If still the disks are not getting shown please check Metalink note 1174604.1 “ASM Is Not Detecting EMC PowerPath
Raw Devices Or Regular Raw Devices On AIX” as there could be some permissions issue.
Regards,
Saurabh Sood
Reply
Reply
Leave a Reply
Enter your comment here...
http://askdba.org/weblog/2009/02/creating-asm-devices-on-aix/ 5/6
8/4/2017 Creating ASM devices on AIX | AskDba.org Weblog
Search
Trending
GATHER_STATS_JOB - Is it enabled?
Recent Comments
tolu on 11g: Multiple failed login attempt can block New Application connections
http://askdba.org/weblog/2009/02/creating-asm-devices-on-aix/ 6/6