随笔 - 369  文章 - 1  评论 - 15  阅读 - 52万

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
复制代码

 

posted on   kingle-l  阅读(1835)  评论(3编辑  收藏  举报
编辑推荐:
· 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训练数据并当服务器共享给他人
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

levels of contents
点击右上角即可分享
微信分享提示

目录导航