This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:cmd:fclun [2016/02/23 15:32] – [device mapper] js | linux:cmd:fclun [2022/07/29 13:05] (current) – [multipath] js | ||
---|---|---|---|
Line 3: | Line 3: | ||
=== multipathd === | === multipathd === | ||
- first install multipathd <code bash>yum install device-mapper-multipath</ | - first install multipathd <code bash>yum install device-mapper-multipath</ | ||
- | - copy multipath.conf in /etc | + | - copy multipath.conf in /etc or use multipath -t >/ |
- restart multipathd <code bash> | - restart multipathd <code bash> | ||
- alias in multipath.conf < | - alias in multipath.conf < | ||
Line 18: | Line 18: | ||
- install rescan script <code bash>yum install sg3_utils</ | - install rescan script <code bash>yum install sg3_utils</ | ||
- to rescan luns <code bash> | - to rescan luns <code bash> | ||
- | echo "- - -" > / | + | echo "- - -" > / |
=== multipath === | === multipath === | ||
Line 28: | Line 28: | ||
|- 1:0:0:1 sdc 8:32 active ready running | |- 1:0:0:1 sdc 8:32 active ready running | ||
`- 2:0:0:1 sde 8:64 active ready running</ | `- 2:0:0:1 sde 8:64 active ready running</ | ||
+ | | ||
+ | <WRAP center round box 90%> | ||
+ | Example: | ||
+ | | ||
+ | A server node with 2 * fibre channel HBAs attached to a storage controller with 2 ports sees 4 devices: | ||
+ | /dev/sda, /dev/sdb, dev/sdc, and /dev/sdd. | ||
+ | |||
+ | Device Mapper (DM) Multipath creates a single device with a unique World Wide Identifier (WWID) that reroutes I/O to those four underlying devices according to the multipath configuration. | ||
+ | |||
+ | </ | ||
+ | |||
=== device mapper === | === device mapper === | ||
- create block device in /dev/mapper with fsilun as name | - create block device in /dev/mapper with fsilun as name | ||
- | - wipe to create new fresh physical volume <code bash>dd if=/ | + | - wipe to create new fresh physical volume <code bash>dd if=/ |
=== lvm === | === lvm === | ||
- | - create physical volume <code bash> | + | - create physical volume <code bash> |
+ | Physical volume "/ | ||
* show pyhsical volume <code bash> | * show pyhsical volume <code bash> | ||
- | - create volume group <code bash>gcreate | + | |
+ | 1+0 records out | ||
+ | 512 bytes (512 B) copied, 0.000873947 s, 586 kB/ | ||
+ | | ||
+ | Physical volume "/ | ||
* show volume group <code bash> | * show volume group <code bash> | ||
- | - create logical volume (-L <size in PE see above) <code bash> | + | - create logical volume (-L <size in PE see above) <code bash> |
+ | Logical volume " | ||
* show logical volume <code bash> | * show logical volume <code bash> | ||
=== format filesystem === | === format filesystem === | ||
- | - create ext4 filesystem <code bash> | + | - create ext4 filesystem <code bash> |
+ | Discarding device blocks: done | ||
+ | Filesystem label= | ||
+ | OS type: Linux | ||
+ | Block size=4096 (log=2) | ||
+ | Fragment size=4096 (log=2) | ||
+ | Stride=0 blocks, Stripe width=0 blocks | ||
+ | 16384000 inodes, 65536000 blocks | ||
+ | 3276800 blocks (5.00%) reserved for the super user | ||
+ | First data block=0 | ||
+ | Maximum filesystem blocks=4294967296 | ||
+ | 2000 block groups | ||
+ | 32768 blocks per group, 32768 fragments per group | ||
+ | 8192 inodes per group | ||
+ | Superblock backups stored on blocks: | ||
+ | 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, | ||
+ | 4096000, 7962624, 11239424, 20480000, 23887872 | ||
+ | Writing inode tables: done | ||
+ | Creating journal (32768 blocks): done | ||
+ | Writing superblocks and filesystem accounting information: | ||
+ | This filesystem will be automatically checked every 34 mounts or | ||
+ | 180 days, whichever comes first. | ||
=== mount === | === mount === | ||
- create mount dir <code bash> | - create mount dir <code bash> | ||
- mount <code bash> | - mount <code bash> |