• 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
  • 相关阅读:
    nginx rewrite 模块
    nginx 的请求处理流程
    nginx keepalive 长连接
    cglib、orika、spring等bean copy工具性能测试和原理分析
    jackson、fastjson、kryo、protostuff等序列化工具性能对比
    Java源码详解系列(十一)--Spring的使用和源码(共计4篇博客)
    Spring源码系列(四)--spring-aop是如何设计的
    Spring源码系列(三)--spring-aop的基础组件、架构和使用
    JMH--一款由OpenJDK开发的基准测试工具
    MySQL系列文章汇总
  • 原文地址:https://www.cnblogs.com/kingle-study/p/10972214.html
Copyright © 2020-2023  润新知