Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Jun 2014 14:55:12 -0400
From:      Daniel Staal <DStaal@usa.net>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: zpool offline - no such device
Message-ID:  <91FA168AC6AD992F200BCA39@[192.168.1.50]>
In-Reply-To: <20140604083847.ce10b00c6d2ac6e934965648@3dresearch.com>
References:  <20140603104416.a13299f4a2bbdbdb36782dee@3dresearch.com> <9D00B0534C785E4CE751D6F7@[192.168.1.50]> <20140604083847.ce10b00c6d2ac6e934965648@3dresearch.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--As of June 4, 2014 8:38:47 AM -0400, Janos Dohanics is alleged to have 
said:

>> Before you do anything else, it's probably a good idea to figure out
>> exactly what is on that disk and how many partitions it has.  Pulling
>> it out may not affect the zpool - but it may break other things in
>> your system, depending on what's on there.
>
> Here is what gpart says about ada1:
>
># gpart show -p
> [...]
>
> =>        34  1953525101    ada1  GPT  (931G)
>           34          94          - free -  (47k)
>          128     4194304  ada1p1  freebsd-swap  (2.0G)
>      4194432  1949330696  ada1p2  freebsd-zfs  (929G)
>   1953525128           7          - free -  (3.5k)

Ok, so we have at least swap on the drive as well, as well as some unused 
space.

I'm guessing that you probably have swap on all three drives, but that's 
just a guess.  I'd want to be sure before pulling this drive.  Check 
/etc/fstab and/or `swapctl -l` to see how it's set up - it could be 
mirrored or not.  If it's mirrored, you'll need to handle replacing that as 
well.  If it's not, you'll want to unmount ada1p1 as a swap partition 
before you remove the drive.  (And be sure you have swap before you do...)

It might be easier to shut down the machine and switch the drives then - 
but you'll still have to remember to re-set everything up when you bring 
the machine back up.

>> > For the failing drive, "zdb" gives:
>> >
>> > guid: 16455153587833556178
>> >
>> > Should I try "zpool offline vol1 [guid]"?
>>
>> I would try `zpool offline
>> gptid/e485eeba-0545-11e1-812d-8c89a53220c1` - that's what zfs calls
>> the disk.  But I'm not entirely sure about it either
>> - it would be a lot easier if these partitions had gpt lables, which
>> I know work well with ZFS.
>>
>> > When I'm replacing the failing drive with a new one (in the same USB
>> > slot), can I expect "zpool replace vol1 ada1" to work?
>>
>> That should probably work - but remember the mention above of working
>> out what *else* is on that drive.  This command would take the whole
>> disk for ZFS, and you may want to replace the other partitions of the
>> bad disk with something.
>>
>> Daniel T. Staal
>
> So, I should do gpart backup/restore first?

Probably - though that will of course assume you're replacing with the same 
size disk.  You might just want to re-create by hand - it's not like it's a 
complex partition scheme.  Up to you.

Either way though: If you are partitioning the new drive like this one, you 
don't want to use 'ada1' in your zpool - that will tell zfs to ignore the 
partitioning and just take the whole drive.  You'll want to tell it the 
partition you are giving it, so you still have the swap as well.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?91FA168AC6AD992F200BCA39>