ZFS and Glabel

Freddie Cash fjwcash at gmail.com
Sat Jun 8 15:16:48 UTC 2013


On 2013-06-08 2:24 AM, "Reed A. Cartwright" <cartwright at asu.edu> wrote:
>
> I currently have a raidz2 pool that uses whole disks: da6, da7, etc.
> I want to label these using glabel and have zfs mount them using the
> labels.  This way, if an HDD fails, I will be able to easily replace
> the drive.
>
> So my questions are a follows:
>
> 1) Can glabel be used with zfs and raw disks?  Should it be?

Yes.

> 2) Can I add a glabel after the disks have been placed in a pool?

Yes.

> 3) How would I do this without losing data?

zpool offline storage da6
glabel label da6 storage1
zpool replace storage da6 label/storage1

Wait for the resilver to finish. Then repeat the above steps for each disk.

ZFS reserves about 1MB of the disk for "slack" space to allow for replacing
drives when the size is the same but the total number of disk sectors is
different.

I did the above on two separate storage boxes with 24 drives each without
any issues.


More information about the freebsd-fs mailing list