zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    Leetcode 811. Subdomain Visit Count
    Leetcode 70. Climbing Stairs
    Leetcode 509. Fibonacci Number
    Leetcode 771. Jewels and Stones
    Leetcode 217. Contains Duplicate
    MYSQL安装第三步报错
    .net 开发WEB程序
    JDK版本问题
    打开ECLIPSE 报failed to load the jni shared library
    ANSI_NULLS SQL语句
  • 原文地址:https://www.cnblogs.com/kingle-study/p/10972214.html
Copyright © 2011-2022 走看看