Friday, November 17, 2017

ASM raw disk creation



[root@suthakar asmdsk]# dd if=/dev/zero of=/asmdisk/disk1 bs=1024k count=1000
1000+0 records in                                                          
1000+0 records in                                                          
1000+0 records out                                                         
1048576000 bytes (1.0 GB) copied, 6.0365 s, 174 MB/s

 dd if=/dev/zero of=/asmdisk/disk2 bs=1024k count=1000
1000+0 records in                                                           
1000+0 records out                                                          
1048576000 bytes (1.0 GB) copied, 1.02826 s, 1.0 GB/s          

dd if=/dev/zero of=/asmdisk/disk3 bs=1024k count=1000
1000+0 records in                                                           
1000+0 records out                                                          
1048576000 bytes (1.0 GB) copied, 1.03051 s, 1.0 GB/s

dd if=/dev/zero of=/asmdisk/disk4 bs=1024k count=1000
1000+0 records in                                                           
1000+0 records out                                                          
1048576000 bytes (1.0 GB) copied, 1.0228 s, 1.0 GB/s
---

[root@suthakar asmdsk]#  /sbin/losetup /dev/loop1 /asmdisk/disk1            
[root@suthakar asmdsk]#  /sbin/losetup /dev/loop2 /asmdisk/disk2            
[root@suthakar asmdsk]#  /sbin/losetup /dev/loop3 /asmdisk/disk3            
[root@suthakar asmdsk]#  /sbin/losetup /dev/loop4 /asmdisk/disk4


raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw1:  bound to major 7, minor 1

raw /dev/raw/raw2 /dev/loop2
/dev/raw/raw2:  bound to major 7, minor 2

raw /dev/raw/raw3 /dev/loop3
/dev/raw/raw3:  bound to major 7, minor 3

raw /dev/raw/raw4 /dev/loop4
/dev/raw/raw4:  bound to major 7, minor 4

[root@suthakar raw]# ls -ltr
total 0
crw-rw----. 1 root disk 162, 0 Nov 15 14:37 rawctl
crw-rw----. 1 root disk 162, 1 Nov 15 15:03 raw1
crw-rw----. 1 root disk 162, 2 Nov 15 15:03 raw2
crw-rw----. 1 root disk 162, 3 Nov 15 15:04 raw3
crw-rw----. 1 root disk 162, 4 Nov 15 15:04 raw4
[root@suthakar raw]#
chown -R oracle:oinstall *
[root@suthakar raw]# pwd
/dev/raw
[root@suthakar raw]# ls -ltr
total 0
crw-rw----. 1 oracle oinstall 162, 0 Nov 15 14:37 rawctl
crw-rw----. 1 oracle oinstall 162, 1 Nov 15 15:03 raw1
crw-rw----. 1 oracle oinstall 162, 2 Nov 15 15:03 raw2
crw-rw----. 1 oracle oinstall 162, 3 Nov 15 15:04 raw3
crw-rw----. 1 oracle oinstall 162, 4 Nov 15 15:04 raw4


No comments: