Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Rebuilding a kernel on a hardened gentoo
Date: Fri, 14 Sep 2018 08:15:20
Message-Id: 47EF807A-BBF4-4DC0-BF60-8D429E82C2FE@antarean.org
In Reply to: Re: [gentoo-user] Rebuilding a kernel on a hardened gentoo by "Stefan G. Weichinger"
On September 14, 2018 6:34:20 AM UTC, "Stefan G. Weichinger" <lists@×××××.at> wrote:
>Am 12.09.18 um 15:07 schrieb J. Roeleveld: > >> Bit sooner: >> >https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/ >> dm_multipath/mpio_overview >> >> >https://www.thegeekdiary.com/beginners-guide-to-device-mapper-dm-multipathing/ >> >> >> I use multipath from a SAS-controller to a dual-backplane and >SAS-disks. >> From the controller, I have 2 paths to each disk, which means I have >twice the >> amount of "sd?" entries. >> >> == >> # multipath -l >> 35000cca25d8ec910 dm-4 HGST,HUS726040ALS210 >> size=3.6T features='1 retain_attached_hw_handler' hwhandler='0' wp=rw >> |-+- policy='service-time 0' prio=0 status=active >> | `- 0:0:7:0 sdh 8:112 active undef running >> `-+- policy='service-time 0' prio=0 status=enabled >> `- 0:0:20:0 sdt 65:48 active undef running >> == >> (This is only the first device) >> >> It shows that device "35000cca25d8ec910" is mapped to "sdh" and >"sdt". >> To use the disk correctly, I need to access >"/dev/mapper/35000cca25d8ec910", >> which is: >> # ls -lsa /dev/mapper/35000cca25d8ec910 >> 0 lrwxrwxrwx 1 root root 7 Sep 4 11:43 /dev/mapper/35000cca25d8ec910 >-> ../ >> dm-4 >> >> I have "multipathd" in the "boot" runlevel. >> >> Version info: >> # eix -I multipath >> [I] sys-fs/multipath-tools >> Available versions: 0.5.0-r1 0.6.4-r1{tbz2} ~0.7.6^t ~0.7.7^t >{rbd >> systemd KERNEL="linux"} >> Installed versions: 0.6.4-r1{tbz2}(10:51:01 AM >01/23/2018)(-rbd - >> systemd) >> Homepage: http://christophe.varoqui.free.fr/ >> Description: Device mapper target autoconfig >> >> # uname -a >> Linux san1 4.9.76-gentoo-r1-generic #1 SMP Tue Jan 23 12:05:11 CET >2018 x86_64 >> Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz GenuineIntel GNU/Linux >> >> As for the terms, a LUN is a Logical disk provided by a SAN to a >different >> system. I have multipath inside my SAN and have a single path to >iSCSI >> clients. (Single switch with bonded NICs) > >thanks for the links etc > >To me it seems that the former administrator somehow tried to set that >up but failed. > >This corresponds to something he wrote when leaving the company. > >There is no multipathd-daemon enabled or running. > ># multipath >Sep 14 08:31:10 | MSA2040_SAMBA_storage: ignoring map >Sep 14 08:31:10 | MSA2040_SAMBA_storage: ignoring map > ># multipath -l ># > ># ls /dev/mapper/ >control > > >so nothing gets mapped here ;-) > >- > ># /etc/multipath.conf > >defaults { ># udev_dir /dev > polling_interval 15 ># selector "round-robin 0" > path_grouping_policy group_by_prio > failback 5 > path_checker tur ># prio_callout "/sbin/mpath_prio_tpc /dev/%n" > rr_min_io 100 > rr_weight uniform > no_path_retry queue > user_friendly_names yes >} >blacklist { > devnode cciss > devnode fd > devnode hd > devnode md > devnode sr > devnode scd > devnode st > devnode ram > devnode raw > devnode loop > devnode sda > devnode sdb >} > >multipaths { > multipath { > wwid 3600c0ff0001e91b2c1bae25601000000 >## To find your wwid, please use /usr/bin/sg_vpd --page=di /dev/DEVICE. > ## The address will be a 0x6. Remove the 0x and replace it with 3. > alias MSA2040_SAMBA_storage > } >} > > >--- I will check docs etc asap >That is a productive server a few 100 kms away from me, so I have to be > >careful. > >Users can work, so no hurry here, just interest.
You really want to be at the server or at least have some kind of access to the keyboard and screen to coordinate booting to a different environment before enabling multipath. You need to change all the devices from whatever they are now to the multipath versions, which is best done when booted into a live-environment instead of the actual production one. The idea is: Disk(/dev/sd?) - (multipathd) - virtual (/dev/mapper/???) - (filesystem) If the current system is pointing at /dev/sd?, you are bypassing multipathing. Also, important and should be obvious, the kernel must have multipath support enabled in de device-mapper section. I was able to get it all working before doing the rest of the system. On my system, I didn't have to change the default configuration of multipath as it autodetects which sd?'s are pointing to the same disc due to serial numbers and ZFS is happy to sit on top of that. -- Joost -- Sent from my Android device with K-9 Mail. Please excuse my brevity.