在linux下,使用fdisk对硬盘分区:先删除原有分区,然后创建新的分区
1) 删除分区
代码如下 | 复制代码 |
[root@standby root]# fdisk /dev/sdc The number of cylinders for this disk is set to 4425. Command (m for help): m Command (m for help): p Disk /dev/sdc: 36.4 GB, 36401479680 bytes Device Boot Start End Blocks Id System Command (m for help): d Command (m for help): d Command (m for help): d Command (m for help): d Command (m for help): p Disk /dev/sdc: 36.4 GB, 36401479680 bytes Device Boot Start End Blocks Id System Command (m for help): w Calling ioctl() to re-read partition table. |
2) 创建分区
代码如下 | 复制代码 |
[root@standby root]# fdisk /dev/sdc The number of cylinders for this disk is set to 4425. Command (m for help): p Disk /dev/sdc: 36.4 GB, 36401479680 bytes Device Boot Start End Blocks Id System Command (m for help): n Command (m for help): n Command (m for help): n Command (m for help): n Command (m for help): n Command (m for help): d Command (m for help): n Command (m for help): n Command (m for help): n Command (m for help): n Command (m for help): n Command (m for help): p Disk /dev/sdc: 36.4 GB, 36401479680 bytes Device Boot Start End Blocks Id System Command (m for help): w Calling ioctl() to re-read partition table.
|
分区建好后有两种方法:使用文件系统,使用裸设备
1) 使用文件系统
创建文件系统
代码如下 | 复制代码 |
[root@standby root]# mkdir /test Writing inode tables: done This filesystem will be automatically checked every 38 mounts or |
挂接文件系统
代码如下 | 复制代码 |
[root@standby root]# mount /dev/sdc3 /test |
改权限
代码如下 | 复制代码 |
[root@standby root]# ls -ltr /test [root@standby root]# chown -R oracle.dba /test [root@standby root]# ls -ltr /test |
创建表空间
代码如下 | 复制代码 |
SQL> create tablespace chen Tablespace created. |
向表空间增加数据文件
代码如下 | 复制代码 |
SQL> alter tablespace chen Tablespace altered. |
可以看到表空间chen的大小是20m了
代码如下 | 复制代码 |
SQL> select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size TABLESPACE_NAME TS_SIZE |
2) 使用裸设备
可以看到已有的绑定
代码如下 | 复制代码 |
[root@standby root]# raw -qa /dev/raw/raw1: bound to major 8, minor 17 /dev/raw/raw2: bound to major 8, minor 18 /dev/raw/raw3: bound to major 8, minor 19 /dev/raw/raw4: bound to major 8, minor 20 /dev/raw/raw5: bound to major 8, minor 34 |
绑定裸设备
代码如下 | 复制代码 |
[root@standby test]# raw /dev/raw/raw6 /dev/sdc1 ditional information: 1 |
改权限
代码如下 | 复制代码 |
[root@standby root]# chown -R oracle.dba /dev/raw [root@standby root]# chmod 755 /dev/raw |
创建表空间
代码如下 | 复制代码 |
SQL> create tablespace jin Tablespace created |
指令:fdisk
用途:观察硬盘之实体使用情形与分割硬盘用。
使用方法:
一、在 console 上输入 fdisk -l /dev/sda ,观察硬盘之实体使用情形。
二、在 console 上输入 fdisk /dev/sda,可进入分割硬盘模式。
1. 输入 m 显示所有命令列示。
2. 输入 p 显示硬盘分割情形。
3. 输入 a 设定硬盘启动区。
4. 输入 n 设定新的硬盘分割区。
4.1. 输入 e 硬盘为[延伸]分割区(extend)。
4.2. 输入 p 硬盘为[主要]分割区(primary)。
5. 输入 t 改变硬盘分割区属性。
6. 输入 d 删除硬盘分割区属性。
7. 输入 q 结束不存入硬盘分割区属性。
8. 输入 w 结束并写入硬盘分割区属性
茶杯头甜蜜终章dlc 官方手机版v1.0.0.3
下载火柴人传说暗影格斗内置菜单 最新版v3.0.1
下载荒野乱斗测试服 安卓版v61.10.3
下载荒野乱斗彩虹服 安卓版v61.10.3
下载寒霜启示录 安卓版v1.25.10
寒霜启示录是一款生存模拟游戏,不少玩家可能对于末日都有着自己
末日城堡免广告版 安卓最新版v0.7.1
末日城堡免广告版是一款非常好玩的模拟经营类游戏,内部可以不看
甜蜜人生模拟器 最新版v1.4.5
甜蜜人生模拟器是一款非常好玩的模拟恋爱手游,玩家在这里能够对
武器锻造师内置功能菜单 v10.4
武器锻造师内置菜单版是游戏的破解版本,在该版本中为玩家提供了
开放空间overfield 安卓版v1.0.5
开放空间Overfield是一款箱庭养成经营手游,让你在广阔