trying to whack a glabel for a zfs mirror

Jason Hellenthal jhell at DataIX.net
Sun Jan 29 08:50:58 UTC 2012



On Sun, Jan 29, 2012 at 04:03:35PM +0900, Randy Bush wrote:
> as usual, i am a bit clueless here.
> 
> NAME                STATE     READ WRITE CKSUM
> tank                DEGRADED     0     0     0
>   mirror            DEGRADED     0     0     0
>     label/m00-d01   REMOVED      0     0     0
>     label/m00-d00   ONLINE       0     0     0
>   mirror            ONLINE       0     0     0
>     label/m01-d00   ONLINE       0     0     0
>     label/m01-d01c  ONLINE       0     0     0
>   mirror            ONLINE       0     0     0
>     label/m02-d00c  ONLINE       0     0     0
>     label/m02-d01c  ONLINE       0     0     0
>   mirror            ONLINE       0     0     0
>     label/m03-d00   ONLINE       0     0     0
>     label/m03-d01c  ONLINE       0     0     0
>   mirror            ONLINE       0     0     0
>     label/m04-d00   ONLINE       0     0     0
>     label/m04-d01   ONLINE       0     0     0
>   mirror            ONLINE       0     0     0
>     label/m05-d01   ONLINE       0     0     0
>     label/m05-d00   ONLINE       0     0     0
> 
> Geom name: da2s3
> Providers:
> 1. Name: label/m00-d01
>    Mediasize: 1965957073408 (1.8T)
>    Sectorsize: 512
>    Mode: r0w0e0
>    secoffset: 0
>    offset: 0
>    seclength: 3839759909
>    length: 1965957073408
>    index: 0
> Consumers:
> 1. Name: da2s3
>    Mediasize: 1965957073920 (1.8T)
>    Sectorsize: 512
>    Mode: r0w0e0
> 
> # zpool attach tank label/m00-d00 label/m00-d01
> cannot use '/dev/label/m00-d01': must be a GEOM provider or regular file
> 
> # glabel label m00-d01 /dev/da2s3
> glabel: Can't store metadata on /dev/da2s3: Invalid argument.
> 
> # sysctl kern.geom.debugflags=17
> kern.geom.debugflags: 0 -> 17
> 
> # dd if=/dev/zero of=/dev/da2s3
> dd: /dev/da2s3: Invalid argument
> 
> randy

Once again the use of glabel(8) that causes and can cause loss of data within ZFS disks... DO NOT USE GLABEL! it is not a solution that you are looking for and in the long run you will shoot yourself in the foot for using it.

What you are seeing is glabel blatently refusing to write meta-data to parts of the disk where something may already exist. This is a good thing.

In turn use something like gpart(8) to adjust the gpt label and/or set your disks up properly. This is not the same thing as glabel(8) which in turn is a hack and not a solution and severely needs to be shot into outerspace from world.


-- 
;s =;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20120129/1afec593/attachment.pgp


More information about the freebsd-fs mailing list