如何创建ASM磁盘?

1、添加一块虚拟磁盘

2、开启虚拟机,查看新增磁盘

[root@rhels5532 ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3393    27254241   83  Linux
/dev/sda2            3394        3915     4192965   82  Linux swap / Solaris

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table
[root@rhels5532 ~]# 

3、磁盘格式化

[root@rhels5532 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 2349.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2349, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2349, default 2349): +1g

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (124-2349, default 124): 
Using default value 124
Last cylinder or +size or +sizeM or +sizeK (124-2349, default 2349): +1g

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (247-2349, default 247): 
Using default value 247
Last cylinder or +size or +sizeM or +sizeK (247-2349, default 2349): +1g

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux
/dev/sdb3             247         369      987997+  83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Selected partition 4
First cylinder (370-2349, default 370): 
Using default value 370
Last cylinder or +size or +sizeM or +sizeK (370-2349, default 2349): 
Using default value 2349

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux
/dev/sdb3             247         369      987997+  83  Linux
/dev/sdb4             370        2349    15904350    5  Extended

Command (m for help): n
First cylinder (370-2349, default 370): 
Using default value 370
Last cylinder or +size or +sizeM or +sizeK (370-2349, default 2349): +3g

Command (m for help): n
First cylinder (736-2349, default 736): 
Using default value 736
Last cylinder or +size or +sizeM or +sizeK (736-2349, default 2349): +3g

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux
/dev/sdb3             247         369      987997+  83  Linux
/dev/sdb4             370        2349    15904350    5  Extended
/dev/sdb5             370         735     2939863+  83  Linux
/dev/sdb6             736        1101     2939863+  83  Linux

Command (m for help): n
First cylinder (1102-2349, default 1102): 
Using default value 1102
Last cylinder or +size or +sizeM or +sizeK (1102-2349, default 2349): +3g

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux
/dev/sdb3             247         369      987997+  83  Linux
/dev/sdb4             370        2349    15904350    5  Extended
/dev/sdb5             370         735     2939863+  83  Linux
/dev/sdb6             736        1101     2939863+  83  Linux
/dev/sdb7            1102        1467     2939863+  83  Linux

Command (m for help): n
First cylinder (1468-2349, default 1468): 
Using default value 1468
Last cylinder or +size or +sizeM or +sizeK (1468-2349, default 2349): +3g

Command (m for help): n
First cylinder (1834-2349, default 1834): 
Using default value 1834
Last cylinder or +size or +sizeM or +sizeK (1834-2349, default 2349): +3g

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux
/dev/sdb3             247         369      987997+  83  Linux
/dev/sdb4             370        2349    15904350    5  Extended
/dev/sdb5             370         735     2939863+  83  Linux
/dev/sdb6             736        1101     2939863+  83  Linux
/dev/sdb7            1102        1467     2939863+  83  Linux
/dev/sdb8            1468        1833     2939863+  83  Linux
/dev/sdb9            1834        2199     2939863+  83  Linux

Command (m for help): n
First cylinder (2200-2349, default 2200): 
Using default value 2200
Last cylinder or +size or +sizeM or +sizeK (2200-2349, default 2349): +1g

Command (m for help): p

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux
/dev/sdb3             247         369      987997+  83  Linux
/dev/sdb4             370        2349    15904350    5  Extended
/dev/sdb5             370         735     2939863+  83  Linux
/dev/sdb6             736        1101     2939863+  83  Linux
/dev/sdb7            1102        1467     2939863+  83  Linux
/dev/sdb8            1468        1833     2939863+  83  Linux
/dev/sdb9            1834        2199     2939863+  83  Linux
/dev/sdb10           2200        2322      987966   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rhels5532 ~]# 
View Code

4、查看格式化后的磁盘信息

[root@rhels5532 ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3393    27254241   83  Linux
/dev/sda2            3394        3915     4192965   82  Linux swap / Solaris

Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   83  Linux
/dev/sdb2             124         246      987997+  83  Linux
/dev/sdb3             247         369      987997+  83  Linux
/dev/sdb4             370        2349    15904350    5  Extended
/dev/sdb5             370         735     2939863+  83  Linux
/dev/sdb6             736        1101     2939863+  83  Linux
/dev/sdb7            1102        1467     2939863+  83  Linux
/dev/sdb8            1468        1833     2939863+  83  Linux
/dev/sdb9            1834        2199     2939863+  83  Linux
/dev/sdb10           2200        2322      987966   83  Linux
[root@rhels5532 ~]# 
View Code

5、配置ASMLib驱动

 

posted @ 2014-02-13 16:06  ArcerZhang  阅读(767)  评论(0编辑  收藏  举报