准备建立RAC,在测试使用ASM 时,遇到建立 ASM时总是出错。
后经测试发现,主要问题还是在分区时选择项目出错了。
当分区的类型为:EXTENDED时,不能通过。
Device Boot Start End Blocks Id System
/dev/sdd1 1 102 104432 5 Extended
当修改成:
Device Boot Start End Blocks Id System
/dev/sdd1 1 102 104432 83 Linux
后,问题解决。
下面为总个过程
[root@testdb 11.2.0]# /etc/init.d/oracleasm createdisk VOLB /dev/sdd1
Marking disk "VOLB" as an ASM disk: [FAILED]
[root@testdb 11.2.0]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 83 Linux
/dev/sda2 1913 2549 5116702+ 83 Linux
/dev/sda3 2550 2811 2104515 82 Linux swap
/dev/sda4 2812 5221 19358325 5 Extended
/dev/sda5 2812 5221 19358293+ 83 Linux
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
Disk /dev/sdb: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 102 104432 5 Extended
Disk /dev/sdc: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
Disk /dev/sdd: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 102 104432 5 Extended
[root@testdb 11.2.0]# fdisk /dev/sdd
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
Command (m for help): d
Selected partition 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@testdb 11.2.0]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 83 Linux
/dev/sda2 1913 2549 5116702+ 83 Linux
/dev/sda3 2550 2811 2104515 82 Linux swap
/dev/sda4 2812 5221 19358325 5 Extended
/dev/sda5 2812 5221 19358293+ 83 Linux
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
Disk /dev/sdb: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 102 104432 5 Extended
Disk /dev/sdc: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdd: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
[root@testdb 11.2.0]# fdisk /dev/sdd
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-102, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-102, default 102): 102
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@testdb 11.2.0]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 83 Linux
/dev/sda2 1913 2549 5116702+ 83 Linux
/dev/sda3 2550 2811 2104515 82 Linux swap
/dev/sda4 2812 5221 19358325 5 Extended
/dev/sda5 2812 5221 19358293+ 83 Linux
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
Disk /dev/sdb: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 102 104432 5 Extended
Disk /dev/sdc: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdd: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 102 104432 83 Linux
[root@testdb 11.2.0]# /etc/init.d/oracleasm createdisk VOLB /dev/sdd1
Marking disk "VOLB" as an ASM disk: [ OK ]
[root@testdb 11.2.0]#