oracle--共享磁盘挂载
浏览器右上角查看导航按钮>>>>
01,查看挂载的磁盘
[root@SHLPDBWX01 ~]# fdisk -l Disk /dev/sda: 53.7 GB, 53687091200 bytes 64 heads, 32 sectors/track, 51200 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00098353 Device Boot Start End Blocks Id System /dev/sda1 * 2 201 204800 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 202 2201 2048000 82 Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/sda3 2202 51200 50174976 83 Linux Partition 3 does not end on cylinder boundary. Disk /dev/sdb: 21.5 GB, 21474836480 bytes 64 heads, 32 sectors/track, 20480 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
02,进行分区
[root@SHLPDBWX01 ~]# fdisk /dev/sdb WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1
First cylinder (1-1011, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1011, default 1011):
Using default value 1011
Command (m for help): p
Disk /dev/sdb: 1073 MB, 1073741824 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7b7e0c74
Device Boot Start End Blocks Id System
/dev/sdb1 1 1011 1048376+ 83 Linux
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
[root@SHLPDBWX01 ~]# fdisk /dev/sdc
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-16384, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-16384, default 16384):
Using default value 16384
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@SHLPDBWX01 ~]# fdisk /dev/sdd
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): d
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1First cylinder (1-20480, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-20480, default 20480):
Using default value 20480
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@SHLPDBWX01 ~]# fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098353
Device Boot Start End Blocks Id System
/dev/sda1 * 2 201 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 202 2201 2048000 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 2202 51200 50174976 83 Linux
Partition 3 does not end on cylinder boundary.
Disk /dev/sdb: 1073 MB, 1073741824 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7b7e0c74
Device Boot Start End Blocks Id System
/dev/sdb1 1 1011 1048376+ 83 Linux
Disk /dev/sdd: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8cbc1ef4
Device Boot Start End Blocks Id System
/dev/sdd1 1 20480 20971504 83 Linux
Disk /dev/sdc: 17.2 GB, 17179869184 bytes
64 heads, 32 sectors/track, 16384 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf00b82af
Device Boot Start End Blocks Id System
/dev/sdc1 1 16384 16777200 83 Linux
03,装载磁盘
[root@SHLPDBWX01 ~]# cat /etc/udev/rules.d/60-raw.rules # Enter raw device bindings here. # # An example would be: # ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N" # to bind /dev/raw/raw1 to /dev/sda, or # ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m" # to bind /dev/raw/raw2 to the device with major 8, minor 1. ACTION=="add",KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N" ACTION=="add",KERNEL=="sdb5",RUN+="/bin/raw /dev/raw/raw2 %N" ACTION=="add",KERNEL=="sdb6",RUN+="/bin/raw /dev/raw/raw3 %N" KERNEL=="raw1", OWNER="oracle", GROUP="oinstall", MODE="660" KERNEL=="raw2", OWNER="oracle", GROUP="oinstall", MODE="660" KERNEL=="raw3", OWNER="oracle", GROUP="oinstall", MODE="644" [root@SHLPDBWX01 ~]# start_udev Starting udev: [ OK ] [root@SHLPDBWX01 ~]# ll /dev/raw/raw* crw-rw----. 1 oracle oinstall 162, 1 Jun 4 10:43 /dev/raw/raw1 crw-rw----. 1 oracle oinstall 162, 2 Jun 4 10:43 /dev/raw/raw2 crw-r--r--. 1 oracle oinstall 162, 3 Jun 4 10:43 /dev/raw/raw3 crw-rw----. 1 root disk 162, 0 Jun 4 10:43 /dev/raw/rawctl
人生就像一滴水,非要落下才后悔!
--kingle
分类:
oracle 数据库
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人