You are on page 1of 3

****Steps for mounting ASM Disks***** 

#For physical servers raise change and get the disk allocated. 
# Find the disk allocated by storage team for physical sevrer. 
# fdisk -l > /tmp/prediskcheck 
# first scan using below cmnd without scanning u cant get to the disk. 
# echo "- - -" > /sys/class/scsi_host/host$i/scan ( change $i by the host numbers) 
Or scan by script  
# for i in {1..5}; do  echo "- - -" > /sys/class/scsi_host/host$i/scan; done  
 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host/scan (go on host and press TAB than it
will shw the no. of hosts) 
host0/ host1/ host2/ host3/ host4/ host5/ 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host3/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host4/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host5/scan 
[root@e75lrl2090 ~]# fdisk -l > /tmp/postdiskcheck 
# diff /tmp/prediskcheck /tmp/postdiskcheck > /tmp/postdisk_output21072022  (for cpying for self
ease) 
# cat /tmp/postdisk_output21072022 | grep mpath 
or 
[root@e75lrl2090 ~]# diff /tmp/prediskcheck /tmp/postdiskcheck 
# diff /tmp/prediskcheck /tmp/postdiskcheck |grep mpath 
# ls -lrt /dev/disk/by-* 
# ls -lrt /dev/disk/by-* |grep mpath 
# fdisk -l |grep mpath ( cpy the output in notepad for matching ) 
# multipath -ll |grep mpath ( cpy the output in notepad for matching uid) 
# cd /etc/udev/rules.d/ 
[root@e75lrl2506 rules.d]# ll 
total 8 
-rw-r--r--. 1 root root  628 Jan  6 16:56 70-persistent-ipoib.rules 
-rw-------. 1 root root 2336 Apr 11 11:57 99-oracle-asmdevices.rules 
[root@e75lrl2506 rules.d]# cat 99-oracle-asmdevices.rules  
# cat  /etc/udev/rules.d/99-oracle-asmdevices.rules 
# vi  /etc/udev/rules.d/99-oracle-asmdevices.rules 
  
ACTION=="add|change", ENV{DM_UUID}=="mpath-360060e8012a9bc005040a",
SYMLINK+="oracleasm/DATA01", GROUP="asmadmin", OWNER="grid", MODE="0660"  
 
Add acrdng to the Data ,log or archive and than save it with new comment. 
Than run both below cmnds. 
  
# udevadm control --reload-rules 
# /sbin/udevadm trigger --type=devices --action=change   
 
# cd /dev/oracleasm/  
# ll ( list the output and check if the disks are added or not) 
# Now do the same thing on other server also if mentioned that it would be  shared ASM Disk. 
****Steps after mounting ASM Disks and shared between two servers***** 
Ask the storage team to provide shared storage between two servers. 
Than once storage gets assigned on server than do the precheck and postcheck. 
# Both servers uid should be same in ASM ALoocations. 
And Than cpy paste the details from source server to destination server and than do the mounting as
same as source server. 
 
 
 
 
*** Steps for Mounting & shared path*** 
#For physical servers raise change and get the disk allocated. 
# Find the disk allocated by storage team for physical sevrer. 
# fdisk -l > /tmp/prediskcheck 
# first scan using below cmnd without canning u cant get to the disk. 
# echo "- - -" > /sys/class/scsi_host/host$i/scan ( change $i by the host numbers) 
Or scan by script  
# for i in {1..5}; do  echo "- - -" > /sys/class/scsi_host/host$i/scan; done  
 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host/scan (go on host and press TAB) 
host0/ host1/ host2/ host3/ host4/ host5/ 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host3/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host4/scan 
[root@e75lrl2090 ~]# echo "- - -" > /sys/class/scsi_host/host5/scan 
[root@e75lrl2090 ~]# fdisk -l > /tmp/postdiskcheck 
# diff /tmp/prediskcheck /tmp/postdiskcheck > /tmp/postdisk_output21072022  (for cpying for self
ease) 
# cat /tmp/postdisk_output21072022 | grep mpath 
OR 
# diff /tmp/prediskcheck /tmp/postdiskcheck 
# diff /tmp/prediskcheck /tmp/postdiskcheck |grep mpath 
# ls -lrt /dev/disk/by-* 
# ls -lrt /dev/disk/by-* |grep mpath 
# df -h 
# diff /tmp/prediskcheck /tmp/postdiskcheck | more 
***if not found yet than do below cmnds*** 
# lsblk ( last mpath will be the disk but cnfrm by running below cmnds) 
sdjl                      8:496  0  200G  0 disk 
└─mpathq                253:19   0  200G  0 mpath 
# ls /dev/oracleasm (to check whether asm is created or not) 
# multipath -ll |grep -iE 'mpathq|size' 
mpathq (3624a937053b7e72f7e014d14000dd869) dm-19 PURE,FlashArray 
size=200G features='0' hwhandler='1 alua' wp=rw 
# grep -i '3624a937053b7e72f7e014d14000dd869' /etc/udev/rules.d/99-oracle-asmdevices.rules 
***As above cmnd not shwing any output means disk is free so we can use it**** 
Choose devmapper one if mpath disk is not visible. 
# vgcreate vg_samosa /dev/mapper/mpathi                   
or  
# vgcreate vg_samosa /dev/mapper/3624a937053b7e72f7e014d14001152dc 
# uname -r 
# vgs 
# lvcreate -l 100%FREE -n lv_samosa vg_samosa 
# lvdisplay | grep u01 
# mkfs.xfs /dev/vg_samosa/lv_samosa     ( paste the output of lv_display here
dev/vg_samosa/lv_samosa ) 
[root@e75lrl2090 ~]# mkdir /samosa 
[root@e75lrl2090 ~]# vi /etc/fstab 
/dev/vg_samosa/lv_samosa  /samosa                       xfs     defaults        0 0 
[root@e75lrl2090 ~]# mount /samosa 
[root@e75lrl2090 ~]# df -h 
[root@e75lrl2090 ~]# cd /dev 
[root@e75lrl2090 dev]# ls -lrt 
Hard mounting will be cmplted. 
# Create the vg of the mount point. 
# Create the lv  
 
 
 
***For Shared Mount point on two servers*** 
# rpm -qa nfs-utils  (check nfs utils is installed on server or not if not than install it) 
# yum install nfs-utils  -y 
# exportfs -v (for checking if there is any sharing btwn the servers or not) 
# vi /etc/exports (if not than save the below content by chnging the ip) ( source server) 
 /samosa    10.200.37.51(rw,sync)   (ip to be written here of destination server) 
 !wq! 
# systemctl restart nfs-server 
# rpm -qa nfs-utils ( now check on destination ip whether nfs utils is installed on server or not if not
than install it) 
# vi /etc/exports ( for saving the shared path) ( this will be done in source ip only not in destination) 
# mkdir /samosa ( after saving make directory on destination server also) 
# vi /etc/fstab (cpy paste the below content in destination ip) 
e75lrl2090.lfnet.se:/samosa   /samosa    nfs4   defaults 0 0    (hostname of the other server source
server) 
# systemctl restart nfs-server 
# mount /samosa 
# mount -o remount,exec /samosa 
 
 

You might also like