This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:cmd:fclun [2016/02/19 16:23] – js | linux:cmd:fclun [2022/07/29 13:05] (current) – [multipath] js | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== use lun storage ====== | ====== use lun storage ====== | ||
- | - scan luns | + | === multipathd === |
- | - look for fc hosts< | + | |
- | - install | + | |
- | - to rescan luns <code bash> | + | |
- | echo "- - -" | + | |
- | - multipath(d) | + | |
- alias in multipath.conf < | - alias in multipath.conf < | ||
multipath { | multipath { | ||
wwid 360000970000296800677533030303638 | wwid 360000970000296800677533030303638 | ||
alias fsilun | alias fsilun | ||
- | }</ | + | |
+ | }</ | ||
+ | - reload multipathd <code bash> | ||
+ | - multipathd on startup <code bash> | ||
+ | |||
+ | === scan luns === | ||
+ | - look for fc hosts< | ||
+ | - install rescan script <code bash>yum install sg3_utils</ | ||
+ | - to rescan luns <code bash> | ||
+ | echo "- - -" > / | ||
+ | |||
+ | === multipath === | ||
- show <code bash> | - show <code bash> | ||
size=1000G features=' | size=1000G features=' | ||
Line 19: | 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 === | ||
+ | - create block device in /dev/mapper with fsilun as name | ||
+ | - wipe to create new fresh physical volume <code bash>dd if=/ | ||
+ | === lvm === | ||
+ | | ||
+ | | ||
+ | * show pyhsical volume <code bash> | ||
+ | | ||
+ | 1+0 records out | ||
+ | 512 bytes (512 B) copied, 0.000873947 s, 586 kB/ | ||
+ | - create | ||
+ | | ||
+ | * show volume group <code bash> | ||
+ | | ||
+ | Logical volume " | ||
+ | * show logical volume <code bash> | ||
+ | === format filesystem === | ||
+ | - 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 === | ||
+ | - create mount dir <code bash> | ||
+ | - mount <code bash> |