Date: Mon, 23 Nov 2009 19:02:19 -0800 From: "Mahlon E. Smith" <mahlon@martini.nu> To: Derrick Ryalls <ryallsd@gmail.com> Cc: Steve Polyack <korvus@comcast.net>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: ZFS disk replacement questions Message-ID: <20091124030219.GZ23504@martini.nu> In-Reply-To: <d5eb95fc0911031132g264182c9qf1c4d51bb1ea2086@mail.gmail.com> References: <d5eb95fc0911030937n15bc2c9h73866ca6c7788216@mail.gmail.com> <4AF07493.7050208@comcast.net> <d5eb95fc0911031132g264182c9qf1c4d51bb1ea2086@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--7tPHY7RFL01rOa8z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 03, 2009, Derrick Ryalls wrote: > On Tue, Nov 3, 2009 at 10:21 AM, Steve Polyack <korvus@comcast.net> wrote: > > Derrick Ryalls wrote: > >> > >> 1) In the event of a disk failure, how do I trace back the name such > >> as adX to a physical drive in the enclosure? =A0Is there a way to take > >> the drive offline then use atacontrol to spin it down or something so > >> it is easy to identify? > >> > > > > In my opinion you are best off using glabel(8) to give names to the dis= ks. > > =A0This way you can name them in a way that makes sense to you. =A0Addi= tionally, > > when you create the ZFS pool you will use the glabel'd names. =A0This m= eans > > that the pool will still come up properly if something causes your devi= ces > > to be numbered differently (i.e. a drive dies and you happen to reboot = the > > system). >=20 > I believe ZFS does this automatically. Supposedly, if you take a > working set of RAIDZ drives from one machine and put it in another, > ZFS will figure out the drives since they get labelled by ZFS > internally. My question concerns how to identify the physical disk in > question based on the adX or glabel name? Different name in software > is fine, but if the drive fails I want to make sure I pull the correct > drive. This is only true if the metadata on the drives is re-read -- if your pool loses a drive and the device numbers shuffle, your pool will be FAILED on the next boot. You can, however, force the metadata to be re-read via a 'zfs export POOL', and a subsequent 'zfs import POOL'.=20 However, using glabel avoid that step entirely, as ZFS will always see the 'right' devices in the right places, regardless of where they are physically. -Mahlon -- Mahlon E. Smith =20 http://www.martini.nu/contact.html --7tPHY7RFL01rOa8z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFLC0y71bsjBDapbeMRAuD/AJ4nZbqQx6f+yaqeJnrXBT4+1EUIWgCfWCZi 2Fe5OIEm3a5p+PxH8ihu5u8= =QOKy -----END PGP SIGNATURE----- --7tPHY7RFL01rOa8z--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091124030219.GZ23504>