Date: Thu, 3 Sep 2009 14:44:07 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Mel Flynn <mel.flynn+fbsd.fs@mailing.thruhere.net> Cc: freebsd-fs@FreeBSD.org, freeebsd-geom@FreeBSD.org Subject: Re: Patch to allow gmirror to set priority of a disk Message-ID: <20090903124407.GJ1821@garage.freebsd.pl> In-Reply-To: <200909030000.11961.mel.flynn%2Bfbsd.fs@mailing.thruhere.net> References: <200909030000.11961.mel.flynn%2Bfbsd.fs@mailing.thruhere.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--CxDuMX1Cv2n9FQfo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 03, 2009 at 12:00:11AM +0200, Mel Flynn wrote: > Hi, >=20 > I've created a patch that allows gmirror to set the priority of a disk. I= 've=20 > needed this feature so I can signal which disk is the "master" on the nex= t=20 > reboot and also because insertion of a 3rd disk comes with the same prior= ity=20 > as the master disk. >=20 > Some background about the first issue: I've got one system that gets READ= _DMA=20 > errors and then dumps the disk out of the mirror. I believe it is NOT rel= ated=20 > to disk errors, but rather to IDE/Motherboard bandwidth (SMART doesn't sh= ow=20 > any errors and the READ_DMA errors are scattered amongst LBA blocks, no= =20 > WRITE_DMA errors ever, never got SATA disks to work on this mobo and last= but=20 > not least it only happens when IO is high, like daily backup with dump -C= =20 > 20M). > Which disk gets thrown out, is random and the last time that happened I= =20 > rebooted since I needed a new kernel anyway and the wrong disk was consid= er=20 > master. This is a side-effect of me having to do several: > gmirror forget gm0 > gmirror insert gm0 adX >=20 > during an uptime sequence. As a result, both disks have the same priority. >=20 > Unfortunately, due to geographic relocation, I no longer have physical ac= cess=20 > to the machine, so I have only compile tested this patch, but I wanted to= get=20 > some feedback about it: > - Have I made some mistakes that would trash my mirror? ;) > - Is there any desire to have this feature other then my own? > - Any style issues? Thank you for working on this, this is a long missing bit, although I've some comments. You assume that you can write to the mirror component, so you also assume that your mirror if offline, because if it would be online you won't be able to write to one of its components. If your mirror is offline, you can just 'gmirror label' the components again. It won't touch your data and this way you will have your priorities set properly. So what we need more is to be able to change priority of a mirror component which is part of an online mirror, so we need to comunicate with the kernel. Would you like to implement this functionality this way? I'd suggest doing this not as separate gmirror(8) subcommand, but as an extension to 'configure' subcommand, where one can provide priority by giving '-p' argument. PS. In case of 'gmirror insert' you already can change the priority with the '-p' option. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --CxDuMX1Cv2n9FQfo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKn7oXForvXbEpPzQRAl79AJ4lnFGlRTEtrSdtvxTaGzI1TfTztQCeLXHw 5IXMMt6npggy1hh2wmxdrk4= =7oeb -----END PGP SIGNATURE----- --CxDuMX1Cv2n9FQfo--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090903124407.GJ1821>