Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 May 2021 17:50:13 +0300
From:      Daniel Kalchev <daniel@digsys.bg>
To:        Alan Somers <asomers@freebsd.org>
Cc:        joe mcguckin <joe@via.net>, freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: Upsizing a ZFS filesystem - shift question
Message-ID:  <EFC0D4E9-3C8D-40C8-A1A6-FDCB3205C2B6@digsys.bg>
In-Reply-To: <CAOtMX2iZFMMF02OoXXThM_qqrJ6TbOWQA1wgJKS0=vZEjEr8ig@mail.gmail.com>
References:  <BF3CEC2C-2DEB-424A-97B8-2D35FDEEFD18@via.net> <CAOtMX2iZFMMF02OoXXThM_qqrJ6TbOWQA1wgJKS0=vZEjEr8ig@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The ashift property is on a per-vdev =E2=80=94 so you can have different =
ashift vdevs in the same pool.

Another best bet is, if the system is running recent FreeBSD with ZFS =
that has the device_removal feature and you are not using raidz.

You can add a new vdev, then remove the old vdevs one by one. =
Eventually, you will end up with the new vdevs only.

This will ensure data is online at all time, but performance will be of =
course best with recreating the zpool =E2=80=94 you can use zfs =
send/receive to move data to the new pool.

Daniel

> On 27 May 2021, at 21:36, Alan Somers <asomers@freebsd.org> wrote:
>=20
> ashift affects how the data is laid out on disk, so you can't change =
it
> after the drives have been replaced.  And you don't want to use =
ashift=3D9
> for the new drives; their performance will suck.  Your best bet is to
> create a new zpool, then send | receive the data from the old pool.
> -Alan
>=20
> On Thu, May 27, 2021 at 12:33 PM joe mcguckin <joe@via.net> wrote:
>=20
>> I have an existing 32TB filesystem (2 X 8T vdevs). I want to upgrade =
each
>> of the drives to 16TB. I pulled one drive and tried a =E2=80=98zfs =
replace=E2=80=99 comand,
>> but zfs replied with some message about new drive
>> optimal ashift doesn=E2=80=99t match the vdev. It suggested Retrying  =
the
>> =E2=80=98replace=E2=80=99 command with =E2=80=98zfs replace -o =
ashift=3DN=E2=80=99
>>=20
>> Ok, a little investigation shows the existing filesystem has an =
ashift of
>> 9. These are older 2T drives with 512 byte sectors. The newer drives =
are
>> 4kn sectors.
>>=20
>> Is ashift settable on a drive by drive basis? Can I temporarily set =
ashift
>> on a drive until all the drives in a vdev have been replaced?  Once =
all
>> drives have been replaced, how do I set ashift=3D12 for all the =
drives in the
>> vdev?
>>=20
>> After replacing all the drives, will the additional space magicially
>> appear or is there an additional command or series of steps?
>>=20
>> Thanks,
>>=20
>> Joe
>>=20
>> Joe McGuckin
>> ViaNet Communications
>>=20
>> joe@via.net
>> 650-207-0372 cell
>> 650-213-1302 office
>> 650-969-2124 fax
>>=20
>>=20
>>=20
>>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EFC0D4E9-3C8D-40C8-A1A6-FDCB3205C2B6>