1、添加一块虚拟磁盘
2、开启虚拟机,查看新增磁盘
[root@rhels5532 ~]# fdisk -lDisk /dev/sda: 32.2 GB, 32212254720 bytes255 heads, 63 sectors/track, 3916 cylindersUnits = 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 / SolarisDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdb doesn't contain a valid partition table[root@rhels5532 ~]#
3、磁盘格式化
[root@rhels5532 ~]# fdisk /dev/sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent 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): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id SystemCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-2349, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-2349, default 2349): +1gCommand (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdb1 1 123 987966 83 LinuxCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 2First cylinder (124-2349, default 124): Using default value 124Last cylinder or +size or +sizeM or +sizeK (124-2349, default 2349): +1gCommand (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 LinuxCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 3First cylinder (247-2349, default 247): Using default value 247Last cylinder or +size or +sizeM or +sizeK (247-2349, default 2349): +1gCommand (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 LinuxCommand (m for help): nCommand action e extended p primary partition (1-4)eSelected partition 4First cylinder (370-2349, default 370): Using default value 370Last cylinder or +size or +sizeM or +sizeK (370-2349, default 2349): Using default value 2349Command (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 ExtendedCommand (m for help): nFirst cylinder (370-2349, default 370): Using default value 370Last cylinder or +size or +sizeM or +sizeK (370-2349, default 2349): +3gCommand (m for help): nFirst cylinder (736-2349, default 736): Using default value 736Last cylinder or +size or +sizeM or +sizeK (736-2349, default 2349): +3gCommand (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 LinuxCommand (m for help): nFirst cylinder (1102-2349, default 1102): Using default value 1102Last cylinder or +size or +sizeM or +sizeK (1102-2349, default 2349): +3gCommand (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 LinuxCommand (m for help): nFirst cylinder (1468-2349, default 1468): Using default value 1468Last cylinder or +size or +sizeM or +sizeK (1468-2349, default 2349): +3gCommand (m for help): nFirst cylinder (1834-2349, default 1834): Using default value 1834Last cylinder or +size or +sizeM or +sizeK (1834-2349, default 2349): +3gCommand (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 LinuxCommand (m for help): nFirst cylinder (2200-2349, default 2200): Using default value 2200Last cylinder or +size or +sizeM or +sizeK (2200-2349, default 2349): +1gCommand (m for help): pDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 LinuxCommand (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.[root@rhels5532 ~]#
4、查看格式化后的磁盘信息
[root@rhels5532 ~]# fdisk -lDisk /dev/sda: 32.2 GB, 32212254720 bytes255 heads, 63 sectors/track, 3916 cylindersUnits = 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 / SolarisDisk /dev/sdb: 19.3 GB, 19327352832 bytes255 heads, 63 sectors/track, 2349 cylindersUnits = 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 ~]#
5、配置ASMLib驱动