Re: gpt labels for zfs partitions don't appear in /dev/gpt

2011-06-15 Thread Bartosz Stec

W dniu 2011-06-15 14:12, Andrey V. Elsukov pisze:

On 15.06.2011 15:43, Bartosz Stec wrote:

As you see I have ada{0-2}p3 labeled as disk{0-2} All labeled partitions have 
valid gpt id but
zfs partitions don't have accesible gpt label in /dev/gpt:

It always worked so. Read geom(4) manual page, especially about SPOILING.

Ah, I see your point now.

As you see labels was firstly seen, but removed at the end. I tried to set 
blank label and then
correct one again, but no luck.
Any ideas what's possibly wrong here?

There are two reasons:
1. glabel does not create providers for providers which are already in use.
2. `gpart modify` does not touch partition provider and it is not spoiled and 
retasted.


Problem appeared after my pool was broken and I imported it from some boot CD to fix 
this by "import
-F".

Now I have unreadable output from zpool commands, like this:

 NAMESTATE READ WRITE 
CKSUM
 zroot   ONLINE   0 0   
  0
   raidz1-0  ONLINE   0 0   
  0
 gptid/2ea57c66-bc69-11df-8955-0050dad823cd  ONLINE   0 0   
  0
 gptid/5bc92016-6852-11df-a16c-0050dad823cd  ONLINE   0 0   
  0
 gptid/87d467cc-bc3b-11df-8066-0050dad823cd  ONLINE   0 0   
  0


You can disable gptids and this output will be changed back:
echo kern.geom.label.gptid.enable="0">>  /boot/loader.conf


Yes, indeed it did the trick. Thank you for your detailed explanation.

--
Bartosz Stec


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: gpt labels for zfs partitions don't appear in /dev/gpt

2011-06-15 Thread Andrey V. Elsukov
On 15.06.2011 15:43, Bartosz Stec wrote:
> As you see I have ada{0-2}p3 labeled as disk{0-2} All labeled partitions have 
> valid gpt id but
> zfs partitions don't have accesible gpt label in /dev/gpt:

It always worked so. Read geom(4) manual page, especially about SPOILING.

> As you see labels was firstly seen, but removed at the end. I tried to set 
> blank label and then
> correct one again, but no luck.
> Any ideas what's possibly wrong here?

There are two reasons:
1. glabel does not create providers for providers which are already in use.
2. `gpart modify` does not touch partition provider and it is not spoiled and 
retasted.

> Problem appeared after my pool was broken and I imported it from some boot CD 
> to fix this by "import
> -F".
> 
> Now I have unreadable output from zpool commands, like this:
> 
> NAMESTATE READ WRITE 
> CKSUM
> zroot   ONLINE   0 0  
>0
>   raidz1-0  ONLINE   0 0  
>0
> gptid/2ea57c66-bc69-11df-8955-0050dad823cd  ONLINE   0 0  
>0
> gptid/5bc92016-6852-11df-a16c-0050dad823cd  ONLINE   0 0  
>0
> gptid/87d467cc-bc3b-11df-8066-0050dad823cd  ONLINE   0 0  
>0
> 

You can disable gptids and this output will be changed back:
echo kern.geom.label.gptid.enable="0" >> /boot/loader.conf

-- 
WBR, Andrey V. Elsukov
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


gpt labels for zfs partitions don't appear in /dev/gpt

2011-06-15 Thread Bartosz Stec

Hi list,
please take a look at this:

   #gpart show
   =>  34  80293181  ada0  GPT  (38G)
34   128 1  freebsd-boot  (64k)
   162   2097152 2  freebsd-swap  (1.0G)
   2097314  76068013 3  freebsd-zfs  (36G)
  78165327   2127888- free -  (1.0G)

   =>  34  78165293  ada1  GPT  (37G)
34   128 1  freebsd-boot  (64k)
   162   2097152 2  freebsd-swap  (1.0G)
   2097314  76068013 3  freebsd-zfs  (36G)

   =>  34  80293181  ada2  GPT  (38G)
34   128 1  freebsd-boot  (64k)
   162   2097152 2  freebsd-swap  (1.0G)
   2097314  76068013 3  freebsd-zfs  (36G)
  78165327   2127888- free -  (1.0G)

   # gpart show -l
   =>  34  80293181  ada0  GPT  (38G)
34   128 1  (null)  (64k)
   162   2097152 2  swap0  (1.0G)
   2097314  76068013 3  disk0  (36G)
  78165327   2127888- free -  (1.0G)

   =>  34  78165293  ada1  GPT  (37G)
34   128 1  (null)  (64k)
   162   2097152 2  swap1  (1.0G)
   2097314  76068013 3  disk1  (36G)

   =>  34  80293181  ada2  GPT  (38G)
34   128 1  (null)  (64k)
   162   2097152 2  swap2  (1.0G)
   2097314  76068013 3  disk2  (36G)
  78165327   2127888- free -  (1.0G)

As you see I have ada{0-2}p3 labeled as disk{0-2}

All labeled partitions have valid gpt id but zfs partitions don't have 
accesible gpt label in /dev/gpt:


   # glabel list
   Geom name: ada0p1
   Providers:
   1. Name: gptid/fe8c7129-bc68-11df-8955-0050dad823cd
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 128
   length: 65536
   index: 0
   Consumers:
   1. Name: ada0p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0

   Geom name: ada0p2
   Providers:
   1. Name: gpt/swap0
   Mediasize: 1073741824 (1.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 82944
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 2097152
   length: 1073741824
   index: 0
   Consumers:
   1. Name: ada0p2
   Mediasize: 1073741824 (1.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 82944
   Mode: r1w1e2

   Geom name: ada0p3
   Providers:
   1. Name: gptid/2ea57c66-bc69-11df-8955-0050dad823cd
   Mediasize: 38946822656 (36G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1073824768
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 76068013
   length: 38946822656
   index: 0
   Consumers:
   1. Name: ada0p3
   Mediasize: 38946822656 (36G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1073824768
   Mode: r1w1e2

   Geom name: ada1p1
   Providers:
   1. Name: gptid/060c432a-6852-11df-a16c-0050dad823cd
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 128
   length: 65536
   index: 0
   Consumers:
   1. Name: ada1p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0

   Geom name: ada1p2
   Providers:
   1. Name: gpt/swap1
   Mediasize: 1073741824 (1.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 82944
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 2097152
   length: 1073741824
   index: 0
   Consumers:
   1. Name: ada1p2
   Mediasize: 1073741824 (1.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 82944
   Mode: r1w1e2

   Geom name: ada1p3
   Providers:
   1. Name: gptid/5bc92016-6852-11df-a16c-0050dad823cd
   Mediasize: 38946822656 (36G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1073824768
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 76068013
   length: 38946822656
   index: 0
   Consumers:
   1. Name: ada1p3
   Mediasize: 38946822656 (36G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1073824768
   Mode: r1w1e2

   Geom name: ada2p1
   Providers:
   1. Name: gptid/c506cc78-bc3a-11df-8066-0050dad823cd
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 128
   length: 65536
   index: 0
   Consumers:
   1. Name: ada2p1
   Mediasize: 65536 (64k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0

   Geom name: ada2p2
   Providers:
   1. Name: gpt/swap2
   Mediasize: 1073741824 (1.0G)
   Sectorsize: 512
   Stripesize: 0