Difference between revisions of "Add New Multipath Block Device"
(Created page with "= Adding a new LUN = Whenever you want to present a LUN to an active machine, you must either rescan the SCSI bus or restart the machine. Scanning the bus can be achieved wit...") |
|||
Line 30: | Line 30: | ||
<code># multipath -r</code> | <code># multipath -r</code> | ||
− | + | Now you have a new block device, you can proceed to convert it into a [[Add New Logical Volume|Physical Volume for LVM]], or put a filesystem directly onto the block device. | |
− | Now you have a new block device, you can proceed to convert it into a Physical Volume for LVM | ||
− | + | Once done, create a mountpoint for this filesystem: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<code># mkdir /databases/data01</code> | <code># mkdir /databases/data01</code> |
Latest revision as of 13:43, 3 January 2018
Adding a new LUN
Whenever you want to present a LUN to an active machine, you must either rescan the SCSI bus or restart the machine. Scanning the bus can be achieved with:
# echo "- - -" > /sys/class/scsi_host/hostX/scan
Replace the X with the SCSI bus you wish to scan. This is a non-destructive action, and so all buses may be scanned at any time.
Next, view the currently known multipaths with:
# multipath -ll
All connected SCSI disks, including the ones on any SAN paths, should now be shown. New devices will be shown as just a WWID, but we want to give each disk a personality to be able to recall them more accurately. To do this, we will create an alias in /etc/multipath.conf set to a friendlier name that has been communicated.
# vi /etc/multipath.conf
multipaths { multipath { wwid "3600508b40010889b00009000015a0000" alias system } multipath { wwid "3600508b40010889b0000900001880000" alias data01 } }
Reload the device map with:
# multipath -r
Now you have a new block device, you can proceed to convert it into a Physical Volume for LVM, or put a filesystem directly onto the block device.
Once done, create a mountpoint for this filesystem:
# mkdir /databases/data01
Set the correct permissions at the mount point:
# chown oracle:dba /databases/data01
# chmod 770 /databases/data01
# chmod +s /databases/data01
Edit /etc/fstab So that the filesystem will be mounted on boot:
# vi /etc/fstab
/dev/Vdata01/Ldata01 /databases/data01 ext4 defaults 1 2
Then you can test (and mount) this with:
# mount -a