Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 2019 19:01:22 +0200
From:      Guido Falsi <mad@madpilot.net>
To:        Freddie Cash <fjwcash@gmail.com>
Cc:        Michael Gmelin <grembo@freebsd.org>, Kurt Jaeger <lists@opsec.eu>, Toomas Soome <tsoome@me.com>, FreeBSD-Current <freebsd-current@freebsd.org>
Subject:   Re: Lockdown adaX numbers to allow booting ?
Message-ID:  <9cc6e486-a0e5-50aa-1273-3987f7b6ad5e@madpilot.net>
In-Reply-To: <CAOjFWZ5-cx4_bs-ZHfHeaekXEQ_L3PX5Wi6D4Jd=ZYUMTn4TBA@mail.gmail.com>
References:  <20190919140219.GE2863@home.opsec.eu> <7E0AE025-596C-457E-BC40-41217857A3CD@me.com> <20190919155713.GG2863@home.opsec.eu> <3C855A39-BF79-4430-98CB-CB9174768E11@freebsd.org> <2cadfea9-e3da-f672-e12f-35109f11ad34@madpilot.net> <CAOjFWZ5-cx4_bs-ZHfHeaekXEQ_L3PX5Wi6D4Jd=ZYUMTn4TBA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19/09/19 18:54, Freddie Cash wrote:
> On Thu, Sep 19, 2019 at 9:47 AM Guido Falsi <mad@madpilot.net
> <mailto:mad@madpilot.net>> wrote:
> 
>     On 19/09/19 18:04, Michael Gmelin wrote:
>     >
>     > What about gpart output of the pool drives?
>     >
>     > In general you would create zpools using gptids or gpt labels, not
>     the devices, so you’re independent of device numbering. The boot
>     loader should only be installed on drives that contain the boot pool
>     (maybe you have old boot loaders on data drives?).
>     >
> 
>     Actually the installer will at least some times use the adaX device to
>     create ZFS pools. At least it did for me when I recently rebuilt a
>     machine after a (multiple) disk crash.
> 
>     So it could not be Kurt fault if he has a pool with adaX devices in it.
> 
>     I installed the system on one disk and the installed used adaX to create
>     the pool. I added the second disk to the mirror a few days later.
> 
>     Now I have:
> 
>       pool: zroot
>      state: ONLINE
>       scan: resilvered 24.6G in 0 days 00:09:41 with 0 errors on Tue Sep  3
>     16:10:08 2019
>     config:
> 
>             NAME          STATE     READ WRITE CKSUM
>             zroot         ONLINE       0     0     0
>               mirror-0    ONLINE       0     0     0
>                 ada0p4    ONLINE       0     0     0
>                 gpt/zfs1  ONLINE       0     0     0
> 
>     errors: No known data errors
> 
>     Now, in the case of a mirror (or a zraid) this could be fixed by
>     detaching adaX devices and reattaching them using the label. Disvantage
>     is the cluster will need to resilver, causing some degraded time and
>     extra disk load.
> 
> 
> Boot off a LiveCD/USB stick.  Export the pool.  Import the pool with -d
> /dev/gpt and it will use the GPT labels instead.  Reboot into the
> system, and it should continue to use the GPT labels.  No resilvering
> required. 

Good suggestion. I did not think about it. I'll try that once I can
reboot the machine.

-- 
Guido Falsi <mad@madpilot.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9cc6e486-a0e5-50aa-1273-3987f7b6ad5e>