In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Create an asm disk using multipath
There are various ways to create asm disks. For standardization, this paper adopts the combination of multipath and udev to manage asm disks. Suitable for linux6, linux7, multipath or single path.
The following operations use oracle linux 7 as an example.
1. Install multipath softwar
The yum source uses an Oracle official source or a local iso source
[root@oel7 ~] # yum provides multipath
Loaded plugins: ulninfo
Device-mapper-multipath-0.4.9-119.el7.x86_64: Tools to manage multipath devices using device-mapper
Repo: dbinstall
Matched from:
Filename: / usr/sbin/multipath
# yum install device-mapper-multipath-0.4.9-119.el7.x86_64
two。 Load module & create a configuration file
The initial installation requires loading the dm module
# modprobe dm-multipath
# modprobe dm-round-robin
# cp / usr/share/doc/device-mapper-multipath-*/multipath.conf / etc/multipath.conf
3. Edit configuration file / etc/multipath.conf
Devices {
Device {
Vendor "VMware,"
Product "VMware Virtual S"
Path_grouping_policy multibus
Path_checker readsector0
Path_selector "round-robin 0"
Hardware_handler "0"
Failback 15
Rr_weight priorities
No_path_retry queue
}
}
Multipaths {
Multipath {
Wwid 36000c29b9e405c3d07021157ace9ab9f
Alias asm_data01
}
Multipath {
Wwid 36000c2933be13ffabcb0ce90806ea5dd
Alias asm_fra01
}
}
4. View multipath Devic
Restart the service
# systemctl restart multipathd
# multipath-ll
Because it is a virtual machine and non-multipath, no related devices are generated. At this point we manually add wwid to the multipath repository. If it is true multipath, you do not need to add it manually.
Multipath-a / dev/sdb
Multipath-a / dev/sdc
Restart the service again
# systemctl restart multipathd
View Devic
# multipath-ll
Asm_fra01 (36000c2933be13ffabcb0ce90806ea5dd) dm-3 VMware, VMware Virtual S
Size=10G features='1 queue_if_no_path' hwhandler='0' wp=rw
`- +-policy='round-robin 0' prio=1 status=active
`- 0 sdc 0lV 2RO sdc 8:32 active ready running
Asm_data01 (36000c29b9e405c3d07021157ace9ab9f) dm-2 VMware, VMware Virtual S
Size=30G features='1 queue_if_no_path' hwhandler='0' wp=rw
`- +-policy='round-robin 0' prio=1 status=active
`- 0VOVUR 1RU 0sdb 8:16 active ready running
5. Configure udev rules
So much work has been done to make the configuration of udev rules simple.
Let's take a look at the device features managed by multipath.
[root@oel7] # udevadm info-Q all-n / dev/mapper/asm_data01
P: / devices/virtual/block/dm-2
N: dm-2
L: 10
S: disk/by-id/dm-name-asm_data01
S: disk/by-id/dm-uuid-mpath-36000c29b9e405c3d07021157ace9ab9f
S: disk/by-label/DATA1
S: mapper/asm_data01
E: DEVLINKS=/dev/disk/by-id/dm-name-asm_data01 / dev/disk/by-id/dm-uuid-mpath-36000c29b9e405c3d07021157ace9ab9f / dev/disk/by-label/DATA1 / dev/mapper/asm_data01
E: DEVNAME=/dev/dm-2
E: DEVPATH=/devices/virtual/block/dm-2
E: DEVTYPE=disk
E: DM_MULTIPATH_TIMESTAMP=1536682254
E: DM_NAME=asm_data01
E: DM_SUSPENDED=0
E: DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
E: DM_UDEV_PRIMARY_SOURCE_FLAG=1
E: DM_UDEV_RULES_VSN=2
E: DM_UUID=mpath-36000c29b9e405c3d07021157ace9ab9f
E: ID_FS_LABEL=DATA1
E: ID_FS_LABEL_ENC=DATA1
E: ID_FS_TYPE=oracleasm
E: ID_FS_USAGE=filesystem
E: MAJOR=249
E: MINOR=2
E: MPATH_SBIN_PATH=/sbin
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=83840
Using the shading part to make udev rules
Cat > > / etc/udev/rules.d/99-oracle-asmdevices.rules
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.