Linux不重啟識別新掛載磁碟
導讀 | RAC資料庫擴容儲存空間,新掛載過來的盤沒有識別到,透過fdisk -l 沒有看到。經查詢需要重啟或者掃描來看到新掛載的磁碟,今天分享一下具體的方法。 |
一、概述
RAC資料庫擴容儲存空間,新掛載過來的盤沒有識別到,透過fdisk -l 沒有看到。經查詢需要重啟或者掃描來看到新掛載的磁碟,今天分享一下具體的方法。
環境:OEL 6.4 和 RAC 11.2.0.4
二、關鍵事項
不要使用/dev/sdX 或 /dev/dm-XX 作為裝置名稱,因為此裝置名稱在重新啟動後可能會更改
使用WWID 識別裝置
全域性識別符號 (WWID) 可用於可靠地識別磁碟裝置。
WWID 是 SCSI 標準要求所有 SCSI 裝置提供的持久的、獨立於系統的 ID。
三、顯示系統上所有可用的 WWID
Shell script to display WWID on your system #!/bin/bash # #Usage: As root user run : ./check_wwid.sh # for FILE in `find /dev -name "sd*" | sort` do WWID=`scsi_id --whitelisted --replace-whitespace --device=$FILE ` echo $FILE " WWID: " $WWID done $ sudo ./check_wwid.sh .. /dev/sdb WWID: 1ATA_VBOX_HARDDISK_VB81c4f844-94203a15 /dev/sdb1 WWID: 1ATA_VBOX_HARDDISK_VB81c4f844-94203a15 /dev/sdc WWID: 1ATA_VBOX_HARDDISK_VB2ed83c09-e66dbcfb /dev/sdc1 WWID: 1ATA_VBOX_HARDDISK_VB2ed83c09-e66dbcfb .. --> Of course WWIDs for partitions and for the complete disk are identical # cat 99-oracle-asmdevices.rules KERNEL=="sd*", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="14f504e46494c45523264556151442d5261336d2d566e4250", OWNER="grid", GROUP="asmadmin", MODE="0660" # ls -ls /dev/sdr 0 brw-rw----. 1 grid asmadmin 65, 16 Mar 19 14:42 /dev/sdr Reload and Restart the udev rules # udevadm control --reload-rules # start_udev Starting udev: [ OK ] Verify disk protections: # ls -ltr /dev/asm* brw-rw----. 1 grid asmadmin 8, 17 Mar 15 10:03 /dev/asmdisk1_udev_sdb1 brw-rw----. 1 grid asmadmin 8, 33 Mar 15 10:03 /dev/asmdisk2_udev_sdc1 Redistribute 99-oracle-asmdevices.rules file to all cluster nodes and restat udev echo system on these nodes # scp 99-oracle-asmdevices.rules grac42:/etc/udev/rules.d # scp 99-oracle-asmdevices.rules grac43:/etc/udev/rules.d On each RAC node # udevadm control --reload-rules # start_udev # ls -ltr /dev/asm* brw-rw----. 1 grid asmadmin 8, 17 Mar 15 10:03 /dev/asmdisk1_udev_sdb1 brw-rw----. 1 grid asmadmin 8, 33 Mar 15 10:03 /dev/asmdisk2_udev_sdc1
四、使用 /sbin/scsi_id 的磁碟分割槽的 UDev 規則(首選模式,因為我們可以更改名稱)
請注意此示例對映: /dev/sdb1 到 /dev/asmdisk1_udev_sdb1:
# cat 99-oracle-asmdevices.rules KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB81c4f844-94203a15", NAME= "asmdisk1_udev_sdb1", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB2ed83c09-e66dbcfb", NAME= "asmdisk1_udev_sdc1", OWNER="grid", GROUP="asmadmin", MODE="0660" # ls -l /dev/asmdisk1_udev_sdb1 /dev/asmdisk1_udev_sdc1 brw-rw----. 1 grid asmadmin 8, 17 Mar 19 13:53 /dev/asmdisk1_udev_sdb1 brw-rw----. 1 grid asmadmin 8, 33 Mar 19 13:53 /dev/asmdisk1_udev_sdc1
五、磁碟組
(1) 擴容磁碟組
查詢到path:
select group_number,disk_number ,path from v$asm_disk;
擴容磁碟組:
alter diskgroup data2 add disk '/dev/asm-diski'; ALTER DISKGROUP DATA2 REBALANCE POWER 10;
檢視是均衡完成:
select operation,est_minutes from v$asm_operation;
完成之後修改回去:
alter diskgroup DATA rebalance power 1;
或者:直接做均衡:
alter diskgroup DATA add disk '/dev/asm-diski' rebalance power 10;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69955379/viewspace-2909077/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 不重新啟動Linux,手工識別線上新增磁碟方法Linux
- HDFS免重啟掛載新磁碟
- Linux下partprobe命令的使用, 不重啟識別新分割槽Linux
- Linux 掛載磁碟Linux
- Linux磁碟掛載 轉Linux
- Linux下磁碟掛載Linux
- centos上掛載新的磁碟CentOS
- LInux掛載windows共享磁碟LinuxWindows
- linux中磁碟的掛載Linux
- Linux掛載ISCSI TARGET磁碟Linux
- linux fdisk 命令 磁碟劃分新的分割槽及掛載Linux
- Linux 磁碟分割槽和掛載Linux
- linux 新增磁碟 分割槽掛載Linux
- linux 磁碟分割槽掛載-fdiskLinux
- windows系統掛載OraCFS型別磁碟Windows型別
- Linux(centos)手動掛載系統磁碟和自動掛載系統磁碟教程LinuxCentOS
- 新增磁碟並掛載磁碟
- linux磁碟掛載與解除安裝Linux
- ubuntu磁碟掛載Ubuntu
- Centos 磁碟掛載CentOS
- Linux LVM磁碟管理與FS掛載LinuxLVM
- Linux磁碟分割槽及自動掛載Linux
- Linux 磁碟掛載和swap空間管理Linux
- linux掛載新硬碟,開機自動掛載Linux硬碟
- liunx磁碟掛載操作
- 磁碟掛載mount,umount
- 開機掛載磁碟
- linux下玩轉磁碟管理與掛載硬碟Linux硬碟
- linux rac不重啟加盤Linux
- CentOS7.X磁碟掛載及取消掛載CentOS
- Linux磁碟分割槽、掛載、檢視檔案大小Linux
- 磁碟分割槽以及Linux目錄掛載詳解Linux
- Linux精講——磁碟掛載mount/解除安裝umountLinux
- 【Linux】Linux檔案系統管理1 磁碟分割槽、格式化、掛載-卷標掛載Linux
- 【Linux】Linux檔案系統管理2 磁碟分割槽、格式化、掛載-UUID掛載LinuxUI
- linux不重啟的情況接受新的分割槽表資訊partprobeLinux
- Virtualbox中Linux新增一個新磁碟->建立分割槽->格式化->掛載分割槽Linux
- linux partprobe 識別新分割槽Linux