ORACLEASM DISK MANAGEMENT
CREATE NEW ASM DISK
For creating new disk group I have added 5GB hdd to my virtual machine
[root@asmdb ~]# fdisk -l
Disk /dev/sdd: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xa02d897a
Device Boot Start End Blocks Id System
/dev/sdd1 2048 20971519 10484736 83 Linux
Disk /dev/sda: 37.6 GB, 37580963840 bytes, 73400320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000dda71
Device Boot Start End Blocks Id System
/dev/sda1 2048 6143 2048 83 Linux
/dev/sda2 * 6144 2103295 1048576 83 Linux
/dev/sda3 2103296 73400319 35648512 8e Linux LVM
Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x59a690de
Device Boot Start End Blocks Id System
/dev/sdb1 2048 4194303 2096128 83 Linux
Disk /dev/sdc: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xab1ef169
Device Boot Start End Blocks Id System
/dev/sdc1 2048 41943039 20970496 83 Linux
Disk /dev/sde: 5368 MB, 5368709120 bytes, 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ol-root: 24.7 GB, 24696061952 bytes, 48234496 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ol-swap: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ol-tmp: 3217 MB, 3217031168 bytes, 6283264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@asmdb ~]# fdisk /dev/sde
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x88619815.
Command (m for help): help
h: unknown command
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-10485759, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759):
Using default value 10485759
Partition 1 of type Linux and of size 5 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@asmdb ~]# oracleasm createdisk DATA1 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@asmdb ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks... [root@asmdb ~]# oracleasm listdisks DATA DATA1 OCR RECO
QUERYING THE DISK DETAILS
[root@asmdb ~]# oracleasm querydisk /dev/sde1 Device "/dev/sde1" is marked an ASM disk with the label "DATA1"
RENAMING THE DISK
[root@asmdb ~]# oracleasm renamedisk DATA1 NEWDATA
WARNING: Changing the label of an disk marked for ASM is a very dangerous
operation. If this is really what you mean to do, you must
ensure that all Oracle and ASM instances have ceased using
this disk. Otherwise, you may LOSE DATA.
If you are really sure you wish to change the label and are sure that
all of your Oracle and ASM instances have ceased using the disk,
rerun this command with the '-f' option.[root@asmdb ~]# oracleasm renamedisk -f DATA1 NEWDATA Instantiating disk "NEWDATA": done Writing disk header: done Removing old ASM disk "DATA1": done
[root@asmdb ~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks...
[root@asmdb ~]# oracleasm listdisks DATA OCR NEWDATA RECO
DELETING THE DISK
[root@asmdb ~]# oracleasm deletedisk NEWDATA Clearing disk header: done Dropping disk: done
[root@asmdb ~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks...
[root@asmdb ~]# oracleasm listdisks DATA OCR RECO
No comments:
Post a Comment