Date: Sat, 15 Aug 2020 11:34:07 +0200 (CEST) From: Wojciech Puchar <wojtek@puchar.net> To: freebsd-hackers@freebsd.org Subject: gmirror balance model "prefer" doesnt work properly Message-ID: <alpine.BSF.2.20.2008151127420.18876@puchar.net>
next in thread | raw e-mail | index | archive | help
ada0p3 is partition on SSD, ada3p3 is partition on magnetic disk. Geom name: root State: COMPLETE Components: 2 Balance: prefer Slice: 2097152 Flags: NONE GenID: 0 SyncID: 1 ID: 3736675121 Type: AUTOMATIC Providers: 1. Name: mirror/root Mediasize: 107374181888 (100G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e1 Consumers: 1. Name: ada0p3 Mediasize: 107374182400 (100G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 525139968 Mode: r1w1e1 State: ACTIVE Priority: 1 Flags: (null) GenID: 0 SyncID: 1 ID: 3655477467 2. Name: ada3p3 Mediasize: 107374182400 (100G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: NONE GenID: 0 SyncID: 1 ID: 3836554217 according to manual reads should be preferred from device of higher priority. i've set priority 1 for ssd, 0 for hdd. but reads are from hdd only. tried reverse - 0 for ssd, 1 for hdd - too reads are from hdd. looking in code seems like it is not implemented at all LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_state == G_MIRROR_DISK_STATE_ACTIVE) break; } just take first active disk. why?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.2008151127420.18876>