[zfs-discuss] /dev/disk/by-wwn

Andreas Dilger adilger at dilger.ca
Fri Feb 3 02:55:27 EST 2012


On 2012-02-02, at 5:19 PM, Paul Pettigrew wrote:
> Our wwn method has some other use case advantages for us, that won us over the by-path approach, which I will detail here in the hope of assisting others:
> 1. we can determine HDD wwn values in the labs in advance (not all manufacturers display this on their sticker) and know that we can use these in any of our chassis
> 2. when disk(s) go into chassis, they do so with the wwn number on a sticker/label that is visible, so it can be easily identified for removal when drive failure occurs
> 3. if there is an entire hardware / chassis failure, we can take all disks and simply insert them into another chassis (which will likely have different HBA's, different cabling - which means the by-path config file was lost with the chassis failure and would be different in the new chassis anyway) and with the by-wwn technique, simply requires a quick "zpool import" routine and the system is operational again. This has saved our bacon on two prod occasions already :-)
> 
> Moreover, having the ability to abstract to irrelevance all "plumbing" between each actual HDD's wwn number, and the reference to it by wwn number in ZFS operations at the CLI, has allowed us to meet several use cases we were otherwise not able to.

Since ZFS already stores GUID values in the ├╝berblock of every disk, I don't
understand why it doesn't just scan the disks at boot time, and then import
them automatically based on the GUID, and not care at all what the device
name is?  At most, the device name could be used as a fast order-1 cache for
device->GUID lookups, but if there is any error finding the right GUID it
should be straight forward to use libblkid (or similar) to locate the GUID
regardless of what disk it is on.

At worst this should mean that when the disk topology changes there will need
to be a quick scan of potentially every disk in the node.  However, since udev
is ALREADY doing this at startup time to generate the by-id, by-uuid, by-label,
etc paths, it should cost no extra time at boot to have udev find the ZFS GUID.

I even wrote ZFS support for libblkid, and it is included upstream into
util-linux-ng, so it is probably already usable by udev on new distros today.

> -----Original Message-----
> From: Brian Behlendorf [mailto:behlendorf1 at llnl.gov]
> Sent: Friday, 3 February 2012 8:14 AM
> To: zfs-discuss at zfsonlinux.org
> Subject: Re: [zfs-discuss] /dev/disk/by-wwn
> 
> Alternately you can setup an /etc/zdev.conf file.  It provides a convenient way to map the /dev/disk/by-path names to a short name meaningful under /dev/disk/zpool.  Personally, I find this is the best way to go when using a large number of disks in JBODs.  Here's an example.
> 
> http://zfsonlinux.org/faq.html#HowDoISetupZdevConf
> 
> --
> Thanks,
> Brian
> 
> On Thu, 2012-01-05 at 09:07 -0800, Ben Hodgens wrote:
>> On Wed, Jan 4, 2012 at 4:30 PM, Paul Pettigrew
>> <Paul.Pettigrew at mach.com.au> wrote:
>>> Happy New Year all
>>> 
>>> This is my first post to the list, so hopefully it functions correctly.
>>> 
>>> Our business has 5x ZoL SANs operating in pre-production (up to 45x bay 3TB = 135TB).  I would like to share our experience and gain feedback on one particular aspect of our design.........
>>> 
>>> In short, we have settled on configuring udev to produce an additional directory called "/dev/disk/by-wwn" as when we reference /dev/disk/by-id we get a mixed bag of names in addition to the WWN references.
>> 
>> What is the actual problem you've been experiencing with using
>> /dev/disk/by-id? I've not seen anything yet on my own systems which
>> isn't consistent, allowing me to identify which disk is which. They
>> always identify by bus (type) followed by model and serial. For
>> instance:
>> 
>> ata-ST32000644NS_9WM54L5Z
>> 
>> I've moved disks from one controller to another without hickups.
>> (Caveat: I'm using 1068e controllers with the IT firmware.)
>> 
>>> 
>>> When using the world wide number values, we are guaranteed to always be able to identify every HDD in the server, and also in hardware (printed label tag stuck to each HDD/bay so it is visible). This means we can add, replace, etc HDD's and never have to worry about what controller it is on, or /dev/sdX values changing.
>>> 
>>> This also solves the issue of running zpool import -d /dev/disk/by-id which will take the names in alphabetical order, thereby preventing the use of WWN references.
>>> 
>>> My question to the group is: have others applied a similar approach? found this to be the best way to uniquely reference HDD's without additional manual config?
>> 
>> 
>> Paul, I've got labels on each of the drives with the serial number,
>> which I'll just associate with what udev reports as the serial. I
>> presume this will work properly, and will at least help me identify
>> failed disks.
>> 
>> Some additional notes about my setup: Hardware is a Supermicro board
>> with IBM Br10-r SAS cards. I'm Debian 6 64 bit, though I pulled udev
>> from sid (unstable) due to a problem with stable (6) not
>> properly/fully inumerating drives. Version of udev in use is 175-3
>> according to the package. I'm also using lsiutil from
>> http://hwraid.le-vert.net/. I'm using the LSI firmware for the SAS
>> cards to get them to IT mode.
>> 
>> (I had to use a DOS disk and flash them individually - one in the
>> chassis at a time - on a non-Intel board, as there is a known problem
>> with sasflash. I'd suggest starting there instead of ending up there,
>> like I did.)
>> 
>>> 
>>> Cheers
>>> 
>>> Paul
>>> 
>>> 
>>> Here is an example of the normal/default Ubuntu /dev/disk/by-id
>>> (which has ata, scsi and wwn references)
>>> 
>>> root at gsan1-coy:/dev/disk/by-id# ls -l | grep -v part total 0
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGJY0DA -> ../../sdm lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGK0STA -> ../../sdj lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGTUGXA -> ../../sdac lrwxrwxrwx
>>> 1 root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGV1DZA -> ../../sdl lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGWTG5A -> ../../sdp lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX3KYA -> ../../sdc lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX3MWA -> ../../sdy lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX59SA -> ../../sdg lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX5BAA -> ../../sdv lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX5RHA -> ../../sdz lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX5RPA -> ../../sdb lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX5S0A -> ../../sdad lrwxrwxrwx
>>> 1 root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX5SUA -> ../../sds lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX6GSA -> ../../sdx lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX6HKA -> ../../sdab lrwxrwxrwx
>>> 1 root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX6W0A -> ../../sdn lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX72AA -> ../../sdd lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX771A -> ../../sdu lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX778A -> ../../sdaa lrwxrwxrwx
>>> 1 root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX7Y5A -> ../../sdw lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX7Y7A -> ../../sdt lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX7YSA -> ../../sdq lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX84DA -> ../../sdr lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX8EJA -> ../../sda lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX8GSA -> ../../sdo lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX8JSA -> ../../sdk lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGX8N3A -> ../../sdh lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGXGTMA -> ../../sde lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGXH2PA -> ../../sdi lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> ata-Hitachi_HDS723030ALA640_MK0311YHGXH2WA -> ../../sdf lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> ata-WDC_WD5000BPKT-00PK4T0_WD-WX91A7183047 -> ../../sdae lrwxrwxrwx
>>> 1 root root 10 2012-01-03 21:43
>>> ata-WDC_WD5000BPKT-00PK4T0_WD-WXM1E31TAP87 -> ../../sdaf lrwxrwxrwx
>>> 1 root root  9 2012-01-03 21:43 md-name-gsan1-coy:0 -> ../../md0
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 md-name-gsan1-coy:1 ->
>>> ../../md1 lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> md-name-gsan1-coy:2 -> ../../md2 lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 md-uuid-0407d199:0509cb20:cb4f611a:b675868a ->
>>> ../../md1 lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> md-uuid-7df365e9:46dffa2e:65109feb:7aebf121 -> ../../md2 lrwxrwxrwx
>>> 1 root root  9 2012-01-03 21:43
>>> md-uuid-d358d95c:a1a512a5:47c07870:aa5ae4f3 -> ../../md0 lrwxrwxrwx
>>> 1 root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGJY0DA -> ../../sdm lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGK0STA -> ../../sdj lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGTUGXA -> ../../sdac lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGV1DZA -> ../../sdl lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGWTG5A -> ../../sdp lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX3KYA -> ../../sdc lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX3MWA -> ../../sdy lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX59SA -> ../../sdg lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX5BAA -> ../../sdv lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX5RHA -> ../../sdz lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX5RPA -> ../../sdb lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX5S0A -> ../../sdad lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX5SUA -> ../../sds lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX6GSA -> ../../sdx lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX6HKA -> ../../sdab lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX6W0A -> ../../sdn lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX72AA -> ../../sdd lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX771A -> ../../sdu lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX778A -> ../../sdaa lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX7Y5A -> ../../sdw lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX7Y7A -> ../../sdt lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX7YSA -> ../../sdq lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX84DA -> ../../sdr lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX8EJA -> ../../sda lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX8GSA -> ../../sdo lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX8JSA -> ../../sdk lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGX8N3A -> ../../sdh lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGXGTMA -> ../../sde lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGXH2PA -> ../../sdi lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43
>>> scsi-SATA_Hitachi_HDS7230_MK0311YHGXH2WA -> ../../sdf lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> scsi-SATA_WDC_WD5000BPKT-_WD-WX91A7183047 -> ../../sdae lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43
>>> scsi-SATA_WDC_WD5000BPKT-_WD-WXM1E31TAP87 -> ../../sdaf lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225c7b2d9 -> ../../sdm
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225c7bd30 ->
>>> ../../sdj lrwxrwxrwx 1 root root 10 2012-01-03 21:43
>>> wwn-0x5000cca225cb488f -> ../../sdac lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225cbd6f9 -> ../../sdl lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225cca1d4 -> ../../sdp
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccc7d3 ->
>>> ../../sdc lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccc80f -> ../../sdy lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccce57 -> ../../sdg lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccce88 -> ../../sdv
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225cccfe2 ->
>>> ../../sdz lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225cccfe8 -> ../../sdb lrwxrwxrwx 1 root root 10
>>> 2012-01-03 21:43 wwn-0x5000cca225cccff2 -> ../../sdad lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd00b -> ../../sds
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd2b3 ->
>>> ../../sdx lrwxrwxrwx 1 root root 10 2012-01-03 21:43
>>> wwn-0x5000cca225ccd2cc -> ../../sdab lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccd42f -> ../../sdn lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd4f3 -> ../../sdd
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd585 ->
>>> ../../sdu lrwxrwxrwx 1 root root 10 2012-01-03 21:43
>>> wwn-0x5000cca225ccd58c -> ../../sdaa lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccd833 -> ../../sdw lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd835 -> ../../sdt
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd845 ->
>>> ../../sdq lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccd8f4 -> ../../sdr lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccda0f -> ../../sda lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccda35 -> ../../sdo
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccda73 ->
>>> ../../sdk lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccdadb -> ../../sdh lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccf1ed -> ../../sde lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccf306 -> ../../sdi
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccf30c ->
>>> ../../sdf lrwxrwxrwx 1 root root 10 2012-01-03 21:43
>>> wwn-0x50014ee25b8235a8 -> ../../sdae lrwxrwxrwx 1 root root 10
>>> 2012-01-03 21:43 wwn-0x50014ee2b0e0ebba -> ../../sdaf
>>> 
>>> Here it is with our /dev/disk/by-wwn solution:
>>> 
>>> root at gsan1-coy:/dev/disk/by-wwn# ls -l | grep -v part total 0
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225c7b2d9 ->
>>> ../../sdm lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225c7bd30 -> ../../sdj lrwxrwxrwx 1 root root 10
>>> 2012-01-03 21:43 wwn-0x5000cca225cb488f -> ../../sdac lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225cbd6f9 -> ../../sdl
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225cca1d4 ->
>>> ../../sdp lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccc7d3 -> ../../sdc lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccc80f -> ../../sdy lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccce57 -> ../../sdg
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccce88 ->
>>> ../../sdv lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225cccfe2 -> ../../sdz lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225cccfe8 -> ../../sdb lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43 wwn-0x5000cca225cccff2 -> ../../sdad
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd00b ->
>>> ../../sds lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccd2b3 -> ../../sdx lrwxrwxrwx 1 root root 10
>>> 2012-01-03 21:43 wwn-0x5000cca225ccd2cc -> ../../sdab lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd42f -> ../../sdn
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd4f3 ->
>>> ../../sdd lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccd585 -> ../../sdu lrwxrwxrwx 1 root root 10
>>> 2012-01-03 21:43 wwn-0x5000cca225ccd58c -> ../../sdaa lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd833 -> ../../sdw
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccd835 ->
>>> ../../sdt lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccd845 -> ../../sdq lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccd8f4 -> ../../sdr lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccda0f -> ../../sda
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccda35 ->
>>> ../../sdo lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccda73 -> ../../sdk lrwxrwxrwx 1 root root  9
>>> 2012-01-03 21:43 wwn-0x5000cca225ccdadb -> ../../sdh lrwxrwxrwx 1
>>> root root  9 2012-01-03 21:43 wwn-0x5000cca225ccf1ed -> ../../sde
>>> lrwxrwxrwx 1 root root  9 2012-01-03 21:43 wwn-0x5000cca225ccf306 ->
>>> ../../sdi lrwxrwxrwx 1 root root  9 2012-01-03 21:43
>>> wwn-0x5000cca225ccf30c -> ../../sdf lrwxrwxrwx 1 root root 10
>>> 2012-01-03 21:43 wwn-0x50014ee25b8235a8 -> ../../sdae lrwxrwxrwx 1
>>> root root 10 2012-01-03 21:43 wwn-0x50014ee2b0e0ebba -> ../../sdaf
>>> 
>>> Which means if we now run zpool import -d /dev/disk/by-wwn we will be guaranteed to get ZFS referencing the WWN values (becomes invaluable when moving disks to new chassis, or having pulled out and re-inserted/jumbled the order across controllers):
>>> 
>>> root at gsan1-coy:/dev/disk/by-wwn# zpool status
>>> pool: tank
>>> state: ONLINE
>>> scan: scrub repaired 0 in 20h2m with 0 errors on Thu Jan  5
>>> 06:41:05 2012
>>> config:
>>> 
>>>       NAME                        STATE     READ WRITE CKSUM
>>>       tank                        ONLINE       0     0     0
>>>         raidz1-0                  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccd42f  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccda35  ONLINE       0     0     0
>>>           wwn-0x5000cca225cccfe2  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccc7d3  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccda0f  ONLINE       0     0     0
>>>           wwn-0x5000cca225cbd6f9  ONLINE       0     0     0
>>>           wwn-0x5000cca225cccff2  ONLINE       0     0     0
>>>         raidz1-1                  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccd58c  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccd2cc  ONLINE       0     0     0
>>>           wwn-0x5000cca225cb488f  ONLINE       0     0     0
>>>           wwn-0x5000cca225cca1d4  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccce88  ONLINE       0     0     0
>>>           wwn-0x5000cca225cccfe8  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccd2b3  ONLINE       0     0     0
>>>         raidz1-2                  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccd4f3  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccf1ed  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccf30c  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccce57  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccdadb  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccf306  ONLINE       0     0     0
>>>           wwn-0x5000cca225ccda73  ONLINE       0     0     0
>>>       spares
>>>         wwn-0x5000cca225ccd8f4    AVAIL
>>> 
>>> errors: No known data errors
>>> 
>>> 
> 
> 
> 
> 
> 


Cheers, Andreas







More information about the zfs-discuss mailing list