This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[oracle@rhec2lab1:/home/oracle]$ . oraenv | |
ORACLE_SID = [+ASM] ? | |
The Oracle base remains unchanged with value /u01/app/grid | |
[oracle@rhec2lab1:/home/oracle]$ srvctl status asm | |
ASM is running on rhec2lab1 | |
[oracle@rhec2lab1:/home/oracle]$ srvctl config asm | |
ASM home: <CRS home> | |
Password file: +DATA/ASM/orapwasm | |
ASM listener: LISTENER | |
Spfile: +DATA/ASM/ASMPARAMETERFILE/registry.253.893677453 | |
ASM diskgroup discovery string: | |
[oracle@rhec2lab1:/home/oracle]$ asmcmd -p | |
ASMCMD [+] > lsdg | |
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name | |
MOUNTED EXTERN N 512 4096 4194304 30716 15616 0 15616 0 N DATA/ | |
MOUNTED EXTERN N 512 4096 4194304 10232 3252 0 3252 0 N FRA/ | |
ASMCMD [+] > lsdsk | |
Path | |
ORCL:DATA1 | |
ORCL:FRA1 | |
[oracle@rhec2lab1:/home/oracle]$ kfod disks=all | |
-------------------------------------------------------------------------------- | |
Disk Size Path User Group | |
================================================================================ | |
1: 30718 Mb ORCL:DATA1 | |
2: 10235 Mb ORCL:FRA1 | |
-------------------------------------------------------------------------------- | |
ORACLE_SID ORACLE_HOME | |
================================================================================ | |
+ASM /u01/app/grid/12.1.0.2 | |
[oracle@rhec2lab1:/home/oracle/sh]$ ./oracleasm_device_map.sh | |
ASM Disk Mappings | |
---------------------------------------------------- | |
DATA1: /dev/xvde1 | |
FRA1: /dev/xvdd1 | |
[oracle@rhec2lab1:/home/oracle]$ ls -l /dev/xv* | |
brw-rw----. 1 root disk 202, 0 Oct 30 2015 /dev/xvda | |
brw-rw----. 1 root disk 202, 1 Oct 30 2015 /dev/xvda1 | |
brw-rw----. 1 root disk 202, 16 Oct 30 2015 /dev/xvdb | |
brw-rw----. 1 root disk 202, 17 Oct 30 2015 /dev/xvdb1 | |
brw-rw----. 1 root disk 202, 48 Oct 30 2015 /dev/xvdd | |
brw-rw----. 1 root disk 202, 49 Oct 30 2015 /dev/xvdd1 | |
brw-rw----. 1 root disk 202, 64 Oct 30 2015 /dev/xvde | |
brw-rw----. 1 root disk 202, 65 Oct 30 2015 /dev/xvde1 | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
# http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html#setting_up_ec2_command_linux | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
[oracle@rhec2lab1:/home/oracle]$ mkdir ec2 | |
[oracle@rhec2lab1:/home/oracle]$ cd ec2 | |
[oracle@rhec2lab1:/home/oracle/ec2]$ wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip | |
--2015-10-30 10:32:52-- http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip | |
Resolving s3.amazonaws.com... 54.231.10.176 | |
Connecting to s3.amazonaws.com|54.231.10.176|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 17566389 (17M) [binary/octet-stream] | |
Saving to: ec2-api-tools.zip | |
100%[=======================================================================================================================>] 17,566,389 12.3M/s in 1.4s | |
2015-10-30 10:32:54 (12.3 MB/s) - ec2-api-tools.zip | |
[oracle@rhec2lab1:/home/oracle/ec2]$ unzip ec2-api-tools.zip -d ec2-api-tools | |
Archive: ec2-api-tools.zip | |
creating: ec2-api-tools/ec2-api-tools-1.7.5.1/ | |
inflating: ec2-api-tools/ec2-api-tools-1.7.5.1/THIRDPARTYLICENSE.TXT | |
... | |
inflating: ec2-api-tools/ec2-api-tools-1.7.5.1/notice.txt | |
[oracle@rhec2lab1:/home/oracle/ec2]$ cd ec2-api-tools | |
[oracle@rhec2lab1:/home/oracle/ec2/ec2-api-tools]$ ll | |
total 4 | |
drwxr-xr-x. 4 oracle oinstall 4096 Sep 7 07:56 ec2-api-tools-1.7.5.1 | |
[oracle@rhec2lab1:/home/oracle/ec2/ec2-api-tools]$ cd ec2-api-tools-1.7.5.1/ | |
[oracle@rhec2lab1:/home/oracle/ec2/ec2-api-tools/ec2-api-tools-1.7.5.1]$ ll | |
total 96 | |
drwxr-xr-x. 2 oracle oinstall 28672 Sep 7 07:56 bin | |
drwxr-xr-x. 2 oracle oinstall 4096 Sep 7 07:56 lib | |
-rw-r--r--. 1 oracle oinstall 4852 Sep 7 04:01 license.txt | |
-rw-r--r--. 1 oracle oinstall 539 Sep 7 04:01 notice.txt | |
-rw-r--r--. 1 oracle oinstall 46468 Sep 7 04:01 THIRDPARTYLICENSE.TXT | |
[oracle@rhec2lab1:/home/oracle/ec2/ec2-api-tools/ec2-api-tools-1.7.5.1]$ cd | |
[oracle@rhec2lab1:/home/oracle]$ export JAVA_HOME="/usr/lib/jvm/jre-1.7.0-openjdk.x86_64" | |
[oracle@rhec2lab1:/home/oracle]$ export EC2_HOME=/home/oracle/ec2/ec2-api-tools/ec2-api-tools-1.7.5.1 | |
[oracle@rhec2lab1:/home/oracle]$ export PATH=$PATH:$EC2_HOME/bin | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
# https://console.aws.amazon.com/iam/home?#security_credential | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
[oracle@rhec2lab1:/home/oracle]$ export AWS_ACCESS_KEY="..." | |
[oracle@rhec2lab1:/home/oracle]$ export AWS_SECRET_KEY="..." | |
[oracle@rhec2lab1:/home/oracle]$ ec2-describe-regions | |
REGION eu-west-1 ec2.eu-west-1.amazonaws.com | |
REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com | |
REGION ap-southeast-2 ec2.ap-southeast-2.amazonaws.com | |
REGION eu-central-1 ec2.eu-central-1.amazonaws.com | |
REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com | |
REGION us-east-1 ec2.us-east-1.amazonaws.com | |
REGION sa-east-1 ec2.sa-east-1.amazonaws.com | |
REGION us-west-1 ec2.us-west-1.amazonaws.com | |
REGION us-west-2 ec2.us-west-2.amazonaws.com | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
# http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-DescribeVolumes.html | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
[oracle@rhec2lab1:/home/oracle]$ ec2-describe-volumes | |
VOLUME vol-ed40fd01 50 snap-2e0be09c us-east-1a in-use 2015-10-19T13:24:52+0000 io1 500 Not Encrypted | |
ATTACHMENT vol-ed40fd01 i-b4accf0b /dev/sdb attached 2015-10-19T13:24:52+0000 true | |
VOLUME vol-d940fd35 6 snap-1a0be0a8 us-east-1a in-use 2015-10-19T13:24:52+0000 gp2 18 Not Encrypted | |
ATTACHMENT vol-d940fd35 i-b4accf0b /dev/sda1 attached 2015-10-19T13:24:52+0000 true | |
VOLUME vol-35853fd9 30 us-east-1a in-use 2015-10-20T15:54:23+0000 standard Not Encrypted | |
ATTACHMENT vol-35853fd9 i-b4accf0b /dev/sde attached 2015-10-21T15:10:59+0000 false | |
VOLUME vol-8c7ac060 10 us-east-1a in-use 2015-10-20T15:54:50+0000 standard Not Encrypted | |
ATTACHMENT vol-8c7ac060 i-b4accf0b /dev/sdd attached 2015-10-20T15:56:40+0000 false | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
# http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-CreateVolume.html | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
[oracle@rhec2lab1:/home/oracle]$ ec2-create-volume --size 10 --availability-zone us-east-1a | |
VOLUME vol-cabfc226 10 us-east-1a creating 2015-10-30T14:47:58+0000 standard Not Encrypted | |
[oracle@rhec2lab1:/home/oracle]$ ec2-describe-volumes | grep "vol-cabfc226" | |
VOLUME vol-cabfc226 10 us-east-1a available 2015-10-30T14:47:58+0000 standard Not Encrypted | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
# http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-AttachVolume.html | |
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~## | |
[oracle@rhec2lab1:/home/oracle]$ ec2-attach-volume vol-cabfc226 -i i-b4accf0b -d /dev/sdf | |
ATTACHMENT vol-cabfc226 i-b4accf0b /dev/sdf attaching 2015-10-30T14:51:57+0000 | |
[oracle@rhec2lab1:/home/oracle]$ ec2-describe-volumes | grep "vol-cabfc226" | |
VOLUME vol-cabfc226 10 us-east-1a in-use 2015-10-30T14:47:58+0000 standard Not Encrypted | |
ATTACHMENT vol-cabfc226 i-b4accf0b /dev/sdf attached 2015-10-30T14:51:56+0000 false | |
[oracle@rhec2lab1:/home/oracle]$ ls -l /dev/xv* | |
brw-rw----. 1 root disk 202, 0 Oct 30 2015 /dev/xvda | |
brw-rw----. 1 root disk 202, 1 Oct 30 2015 /dev/xvda1 | |
brw-rw----. 1 root disk 202, 16 Oct 30 2015 /dev/xvdb | |
brw-rw----. 1 root disk 202, 17 Oct 30 2015 /dev/xvdb1 | |
brw-rw----. 1 root disk 202, 48 Oct 30 2015 /dev/xvdd | |
brw-rw----. 1 root disk 202, 49 Oct 30 2015 /dev/xvdd1 | |
brw-rw----. 1 root disk 202, 64 Oct 30 2015 /dev/xvde | |
brw-rw----. 1 root disk 202, 65 Oct 30 2015 /dev/xvde1 | |
brw-rw----. 1 root disk 202, 80 Oct 30 10:52 /dev/xvdf # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | |
[root@rhec2lab1:/root]# fdisk /dev/xvdf | |
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel | |
Building a new DOS disklabel with disk identifier 0x63f3f645. | |
Changes will remain in memory only, until you decide to write them. | |
After that, of course, the previous content won't be recoverable. | |
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) | |
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to | |
switch off the mode (command 'c') and change display units to | |
sectors (command 'u'). | |
Command (m for help): n | |
Command action | |
e extended | |
p primary partition (1-4) | |
p | |
Partition number (1-4): 1 | |
First cylinder (1-1305, default 1): | |
Using default value 1 | |
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305): | |
Using default value 1305 | |
Command (m for help): w | |
The partition table has been altered! | |
Calling ioctl() to re-read partition table. | |
Syncing disks. | |
[root@rhec2lab1:/root]# ls -l /dev/xvdf* | |
brw-rw----. 1 root disk 202, 80 Oct 30 10:59 /dev/xvdf | |
brw-rw----. 1 root disk 202, 81 Oct 30 10:59 /dev/xvdf1 | |
[root@rhec2lab1:/root]# /etc/init.d/oracleasm createdisk FRA2 /dev/xvdf1 | |
Marking disk "FRA2" as an ASM disk: [ OK ] | |
[root@rhec2lab1:/root]# /etc/init.d/oracleasm listdisks | |
DATA1 | |
FRA1 | |
FRA2 | |
[oracle@rhec2lab1:/home/oracle]$ kfod disks=all | |
-------------------------------------------------------------------------------- | |
Disk Size Path User Group | |
================================================================================ | |
1: 30718 Mb ORCL:DATA1 | |
2: 10235 Mb ORCL:FRA1 | |
3: 10236 Mb ORCL:FRA2 | |
-------------------------------------------------------------------------------- | |
ORACLE_SID ORACLE_HOME | |
================================================================================ | |
+ASM /u01/app/grid/12.1.0.2 |
No comments:
Post a Comment