|
p
Disk /dev/sdb:255 heads, 63 sectors, 4427 cylinders
Units = cylinders of 16065 * 512 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-4427, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4427, default 4427):
Using default value 4427
Command (m for help):w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING:If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
现在验证新分区:
例如:
# fdisk /dev/sdb
The number of cylinders for this disk is set to 4427.
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):p
Disk /dev/sdb:255 heads, 63 sectors, 4427 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 4427 35559846 83 Linux
Command (m for help):q
创建文件系统
使用 ext3 创建这个新的文件系统。也可以使用其他文件系统,但 ext3 在系统崩溃时可提供最快的恢复。
例如:
# mke2fs -j /dev/sdb1
mke2fs 1.26 (3-Feb-2002)
Filesystem label=
OS type:Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4447744 inodes, 8889961 blocks
444498 blocks (5.00%) reserved for the super user
First data block=0
272 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208, 4096000, 7962624
Writing inode tables:done
Creating journal (8192 blocks):done
Writing superblocks and filesystem accounting information:done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.Use tune2fs -c or -i to override.
创建挂载点
文件系统必须有一个挂载点,它只是一个空的目录,新文件系统在这里与系统目录树“相连”。挂载点的命名应遵循 Oracle 灵活结构 (OFA) 标准。有关 OFA 标准的更多信息,请参阅 Oracle 10g 数据库安装指南 的附录 D。
由于您已经在第 1 部分中使用了 /u01 和 /u02 目录名称,因此在本示例中使用 /u03。
例如:
# mkdir /u03
将新文件系统添加到 /etc/fstab
因此新文件系统将在系统启动时自动挂载,您需要向描述新文件系统及其安装位置的 /etc/fstab 文件中添加一行。使用文本编辑器向 /etc/fstab 中添加如下所示的一行。
/dev/sdb1 /u03 ext3 defaults 1 1
挂载新文件系统
文件系统挂载后就可以使用了。只有挂载了文件系统,才能在其中存储文件。使用以下命令挂载文件系统并验证它是否可用。
mount /u03
df -h /u03
例如:
# mount /u03
# df -h /u03
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 33G 33M 31G 1% /u03
创建 Oracle 目录并设置权限
现在,创建一个用于存放 Oracle 文件的目录。该示例中使用的目录名遵循数据库的 OFA 标准命名惯例,即 ORACLE_SID=demo1。
mkdir -p /u03/oradata/demo1
chown -R oracle:oinstall /u03/oradata
chmod -R 775 /u03/oradata
在新文件系统中创建一个新表空间
新文件系统已可以使用。接下来,在文件系统中创建一个用于存储数据库对象的新表空间。以 SYSTEM 用户身份连接到数据库,然后执行 CREATE TABLESPACE 语句,并在新文件系统中指定数据文件。
例如:
$ sqlplus
SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 15:01:08 2004
Copyright (c) 1982, 2004, Oracle.All rights reserved.
Enter user-name:
共15页: 上一页 [1] [2] [3] [4] 5 [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] 下一页
|