ZFS disk replacement questions
Mahlon E. Smith
mahlon at martini.nu
Tue Nov 24 03:29:01 UTC 2009
On Tue, Nov 03, 2009, Derrick Ryalls wrote:
> On Tue, Nov 3, 2009 at 10:21 AM, Steve Polyack <korvus at 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? Is 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 disks.
> > This way you can name them in a way that makes sense to you. Additionally,
> > when you create the ZFS pool you will use the glabel'd names. This means
> > that the pool will still come up properly if something causes your devices
> > to be numbered differently (i.e. a drive dies and you happen to reboot the
> > system).
>
> 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'.
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
http://www.martini.nu/contact.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20091124/69a98f17/attachment.pgp
More information about the freebsd-questions
mailing list