Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE 硬件配置
IBM Xseries 346
Xen 3.6G,4G 内存,70G 硬盘+36G+36G硬盘2
软件配置
RHEL 5.3,Oracle10g for Linux 64bit
环境说明
本环境使用IBM服务器上安装RHEL 5.3的64位系统,硬盘两块,分别为76G和36G。其中76G空间为操作系统和软件,36G为第二块硬盘分区作为ASM盘。
规划方案:计划将第二块硬盘分为三个分区,各个分区大小相等。每个分区作为一个ASM盘,名称分别为VOL1、VOL2和VOL3。
安装操作系统和oracle 10g软件不用说了,网上大把。
系统分区:
[root@Enmo ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 63G 9.8G 50G 17% /
/dev/sda1 99M 25M 70M 26% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
磁盘分区情况为:
[root@Enmo ~]# fdisk -l
Disk /dev/sda: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 535 4192965 82 Linux swap / Solaris
/dev/sda3 536 8924 67384642+ 83 Linux
Disk /dev/sdb: 36.4 GB, 36401479680 bytes
64 heads, 32 sectors/track, 34715 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
进行ASM盘分区
根据规划方案,对sdb盘进行分区格式化操作。在linux上,可以使用fdisk命令,在交互的方式下进行磁盘分区:
[root@Enmo ~]# fdisk /dev/sdb --命令方式:fdisk <进行分区的磁盘文件>
The number of cylinders for this disk is set to 34715.
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)
Command (m for help): m –查看以下命令方式
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
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 –新建立一个分区
Command action –要求输入新建主分区还是扩展分区,注意:一块硬盘上只能有四个主分区
e extended
p primary partition (1-4)
p
Partition number (1-4): 1 //输入主分区编号
First cylinder (1-34715, default 1): 1 //分区起始柱面,该硬盘可用的范围是1-34715;
Last cylinder or +size or +sizeM or +sizeK (1-34715, default 34715): 11571 //分区截止柱面
Command (m for help): m
Command action
。。。。。。
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2 //输入第二个分区
First cylinder (11572-34715, default 11572): 11572
Last cylinder or +size or +sizeM or +sizeK (11572-34715, default 34715): 23142
Command (m for help): m
Command action
。。。。。。
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3 //输入第三个分区
First cylinder (23143-34715, default 23143):
Using default value 23143
Last cylinder or +size or +sizeM or +sizeK (23143-34715, default 34715):
Using default value 34715
--注意:此时分区信息还没有正式写入,要求输入w命令后才能写入!
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
查看分区结果:
[root@Enmo ~]# fdisk -l
Disk /dev/sda: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 535 4192965 82 Linux swap / Solaris
/dev/sda3 536 8924 67384642+ 83 Linux
Disk /dev/sdb: 36.4 GB, 36401479680 bytes
64 heads, 32 sectors/track, 34715 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 11571 11848688 83 Linux
/dev/sdb2 11572 23142 11848704 83 Linux
/dev/sdb3 23143 34715 11850752 83 Linux
分区建立之后,还要用特定的文件系统格式进行分区格式化。
[root@Enmo ~]# mkfs.ext3/dev/sdb1
-bash: mkfs.ext3/dev/sdb1: No such file or directory
[root@Enmo ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1482208 inodes, 2962172 blocks
148108 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3036676096
91 block groups
32768 blocks per group, 32768 fragments per group
16288 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
剩下两个分区 /dev/sdb2和/dev/sdb3类似。
准备好分区磁盘之后,就可以进行ASM驱动安装和ASM disk配置构建了。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24582392/viewspace-695495/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24582392/viewspace-695495/