ZFS and disappearing glabels

2009-12-31 Thread George Hartzell

I've set up a system as described here.

  http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition

Using the 8.0 Release DVD and then csup'ing to RELENG_8 and
rebuilding.

I set it up with a single drive, the only change that I made was that
after creating ad10s1a I glabeled it as disk0, then added
/dev/label/disk0 to the pool.

That worked great.

Then I added a second larger drive, giving it an MBR, a bsd label, and
an s1a partition that I glabeled as disk1.  I attached that to the
pool and it resilvered happily.

However, when I rebooted I found that the pool now consists of
label/disk0 and ad12s1a.  I detached ad12s1a, relabeled it as disk1,
and attached disk1 to the pool again.  It resilvered fine.  Running
strings on /boot/zfs/zpool.cache shows /dev/label/disk0 and
/dev/label/disk1.

But, when I reboot I find I'm back to label/disk0 and ad12s1a.  At
this point strings on zpool.cache lists /dev/label/disk0 and ad12s1a.

I'd like to have the device independence of using labels, and am also
worried about problems caused by the different disk sizes (since the
glabeled partition is 512 bytes smaller).

Any ideas what's going wrong?

Thanks,

g.
___
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: ZFS and disappearing glabels

2009-12-31 Thread Eric

On 12/31/2009 1:48 PM, George Hartzell wrote:


I've set up a system as described here.

   http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition

Using the 8.0 Release DVD and then csup'ing to RELENG_8 and
rebuilding.

I set it up with a single drive, the only change that I made was that
after creating ad10s1a I glabeled it as disk0, then added
/dev/label/disk0 to the pool.

That worked great.

Then I added a second larger drive, giving it an MBR, a bsd label, and
an s1a partition that I glabeled as disk1.  I attached that to the
pool and it resilvered happily.

However, when I rebooted I found that the pool now consists of
label/disk0 and ad12s1a.  I detached ad12s1a, relabeled it as disk1,
and attached disk1 to the pool again.  It resilvered fine.  Running
strings on /boot/zfs/zpool.cache shows /dev/label/disk0 and
/dev/label/disk1.

But, when I reboot I find I'm back to label/disk0 and ad12s1a.  At
this point strings on zpool.cache lists /dev/label/disk0 and ad12s1a.

I'd like to have the device independence of using labels, and am also
worried about problems caused by the different disk sizes (since the
glabeled partition is 512 bytes smaller).

Any ideas what's going wrong?

Thanks,




i ran into the same issues. every reboot i would have to fight to 
relabel the drive (on 7.2). I upgraded to 8 and used GPT for everything 
(and ZFS on root) and i have not had any issues. I would recommend going 
that route. You can still label the drives with labels.


This is the docs I followed:

http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror

Works great!

Eric
___
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: ZFS and disappearing glabels

2009-12-31 Thread Roland Smith
On Thu, Dec 31, 2009 at 12:48:28PM -0800, George Hartzell wrote:
 
 I've set up a system as described here.
 
   http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition
 
 Using the 8.0 Release DVD and then csup'ing to RELENG_8 and
 rebuilding.
 
 I set it up with a single drive, the only change that I made was that
 after creating ad10s1a I glabeled it as disk0, then added
 /dev/label/disk0 to the pool.
 
 That worked great.
 
 Then I added a second larger drive, giving it an MBR, a bsd label, and
 an s1a partition that I glabeled as disk1.  I attached that to the
 pool and it resilvered happily.
 
 However, when I rebooted I found that the pool now consists of
 label/disk0 and ad12s1a.  I detached ad12s1a, relabeled it as disk1,
 and attached disk1 to the pool again.  It resilvered fine.  Running
 strings on /boot/zfs/zpool.cache shows /dev/label/disk0 and
 /dev/label/disk1.
 
How did you create the labels? See glabel(8) about the difference between the
manual and automatic method. Maybe you accidentally used the manual method
on the second disk?

Or it could be that the GEOM metadata is overwritten. This metadata is written
in the last sector, explaining the size difference you noticed. If the metadat
is overwritten, GEOM will not recognize it.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpuuY6XVFwMp.pgp
Description: PGP signature


Re: ZFS and disappearing glabels

2009-12-31 Thread George Hartzell
Eric writes:
  On 12/31/2009 1:48 PM, George Hartzell wrote:
  
   I've set up a system as described here.
  
  http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition
  
   Using the 8.0 Release DVD and then csup'ing to RELENG_8 and
   rebuilding.
  
   I set it up with a single drive, the only change that I made was that
   after creating ad10s1a I glabeled it as disk0, then added
   /dev/label/disk0 to the pool.
  
   That worked great.
  
   Then I added a second larger drive, giving it an MBR, a bsd label, and
   an s1a partition that I glabeled as disk1.  I attached that to the
   pool and it resilvered happily.
  
   However, when I rebooted I found that the pool now consists of
   label/disk0 and ad12s1a.  I detached ad12s1a, relabeled it as disk1,
   and attached disk1 to the pool again.  It resilvered fine.  Running
   strings on /boot/zfs/zpool.cache shows /dev/label/disk0 and
   /dev/label/disk1.
  
   But, when I reboot I find I'm back to label/disk0 and ad12s1a.  At
   this point strings on zpool.cache lists /dev/label/disk0 and ad12s1a.
  
   I'd like to have the device independence of using labels, and am also
   worried about problems caused by the different disk sizes (since the
   glabeled partition is 512 bytes smaller).
  
   Any ideas what's going wrong?
  
   Thanks,
  
  
  
  i ran into the same issues. every reboot i would have to fight to 
  relabel the drive (on 7.2). I upgraded to 8 and used GPT for everything 
  (and ZFS on root) and i have not had any issues. I would recommend going 
  that route. You can still label the drives with labels.
  
  This is the docs I followed:
  
  http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror
  
  Works great!

I'm running something like that on another machine, but can't on this
one.

The gory details include the fact that this is a mac pro.  It's EFI
firmware only does magic bios emulation if it sees an MBR formatted
disk and so setting things up via GPT won't work for me.  I did try it
using the link that you pointed to above and it wouldn't boot.  Tried
it via the apple's firmware choose a boot disk by holding down the
option key trick and via rEFIt.

g.

___
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: ZFS and disappearing glabels

2009-12-31 Thread George Hartzell
Roland Smith writes:
  On Thu, Dec 31, 2009 at 12:48:28PM -0800, George Hartzell wrote:
   
   I've set up a system as described here.
   
 http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition
   
   Using the 8.0 Release DVD and then csup'ing to RELENG_8 and
   rebuilding.
   
   I set it up with a single drive, the only change that I made was that
   after creating ad10s1a I glabeled it as disk0, then added
   /dev/label/disk0 to the pool.
   
   That worked great.
   
   Then I added a second larger drive, giving it an MBR, a bsd label, and
   an s1a partition that I glabeled as disk1.  I attached that to the
   pool and it resilvered happily.
   
   However, when I rebooted I found that the pool now consists of
   label/disk0 and ad12s1a.  I detached ad12s1a, relabeled it as disk1,
   and attached disk1 to the pool again.  It resilvered fine.  Running
   strings on /boot/zfs/zpool.cache shows /dev/label/disk0 and
   /dev/label/disk1.
   
  How did you create the labels? See glabel(8) about the difference between the
  manual and automatic method. Maybe you accidentally used the manual 
  method
  on the second disk?
  [...]

+1 bonus point to Roland, just in time under the New Years wire.

I created the first label with 'glabel label', which creates an
automatic label, but created the second with 'glabel create' (assuming
it was a synonym), which creates a manual label.

I did a detach, relabeled, reattached, and away I go.

Thanks,!

g.
___
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