Re: zpool vdev vs. glabel

2010-02-11 Thread Alex Shubnikov

Use gpart and add created partition to your raidz- for example
[code]
backupstorage# gpart create -s GPT ad0
backupstorage# gpart add -b 34 -s 1953525101 -i 1 -t freebsd-zfs -l 
disk0 ad0

backupstorage# gpart show
=34  1953525101  da0  GPT  (932G)
  34  19535251011  freebsd-zfs  (932G)
backupstorage# gpart show -l
=34  1953525101  da0  GPT  (932G)
  34  19535251011  disk0  (932G)
backupstorage# ls /dev/gpt
disk0
backupstorage# zpool status -v
  pool: storage
 state: ONLINE
 scrub: none requested
config:

NAME   STATE READ WRITE CKSUM
storageONLINE   0 0 0
  raidz1   ONLINE   0 0 0
gpt/disk0  ONLINE   0 0 0
gpt/disk1  ONLINE   0 0 0
gpt/disk2  ONLINE   0 0 0
gpt/disk3  ONLINE   0 0 0
gpt/disk4  ONLINE   0 0 0
gpt/disk5  ONLINE   0 0 0
gpt/disk6  ONLINE   0 0 0
gpt/disk7  ONLINE   0 0 0

[code]
Try to remove and insert disks- all it should happy =)
PS: sorry for my english =)

Gerrit Kühn пишет:

Hi,

I have created a raidz2 with disk I labeled with glabel before. Right
after creation this pool looked fine, using devices label/tank[1-6].

I did some tests with replacing/swapping disks and so on. After doing a

zpool offline tank label/tank6
remove disk
camcontrol rescan all
insert disk
camcontrol rescan all
zpool online tank label/tank6

I got the disk back, but not under the requested label, but under the da
device name:

  pool: tank
 state: ONLINE
 scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:56:37
2010 config:

NAME STATE READ WRITE CKSUM
tank ONLINE   0 0 0
  raidz2 ONLINE   0 0 0
label/tank1  ONLINE   0 0 0  8.50K resilvered
label/tank2  ONLINE   0 0 0  7.50K resilvered
label/tank3  ONLINE   0 0 0  8.50K resilvered
label/tank4  ONLINE   0 0 0  7.50K resilvered
label/tank5  ONLINE   0 0 0  9K resilvered
da6  ONLINE   0 0 0  13.5K resilvered

errors: No known data errors



Why does this happen? Is there any way to get zfs to use the label again?
After the device is in use, the label in /dev/label disappears. When
taking the device offline again, the label is there, but cannot be used:

pigpen# zpool offline tank da6
pigpen# zpool status
  pool: system
 state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
attempt was made to correct the error.  Applications are
unaffected. action: Determine if the device needs to be replaced, and
clear the errors using 'zpool clear' or replace the device with 'zpool
replace'. see: http://www.sun.com/msg/ZFS-8000-9P
 scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:49:14
2010 config:

NAME   STATE READ WRITE CKSUM
system ONLINE   0 0 0
  mirror   ONLINE   0 0 0
label/system1  ONLINE   3   617 0  126K resilvered
label/system2  ONLINE   0 0 0  41K resilvered

errors: No known data errors

  pool: tank
 state: DEGRADED
status: One or more devices has experienced an unrecoverable error.  An
attempt was made to correct the error.  Applications are
unaffected. action: Determine if the device needs to be replaced, and
clear the errors using 'zpool clear' or replace the device with 'zpool
replace'. see: http://www.sun.com/msg/ZFS-8000-9P
 scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:56:37
2010 config:

NAME STATE READ WRITE CKSUM
tank DEGRADED 0 0 0
  raidz2 DEGRADED 0 0 0
label/tank1  ONLINE   0 0 0  8.50K resilvered
label/tank2  ONLINE   0 0 0  7.50K resilvered
label/tank3  ONLINE   0 0 0  8.50K resilvered
label/tank4  ONLINE   0 0 0  7.50K resilvered
label/tank5  ONLINE   0 0 0  9K resilvered
da6  OFFLINE  038 0  13.5K resilvered

errors: No known data errors
pigpen# ll /dev/label/
total 0
crw-r-  1 root  operator0, 104 Feb  9 14:04 lisacrypt1
crw-r-  1 root  operator0, 112 Feb  9 14:04 lisacrypt2
crw-r-  1 root  operator0, 113 Feb  9 14:04 lisacrypt3
crw-r-  1 root  operator0, 134 Feb  9 14:48 system1
crw-r-  1 root  operator0, 115 Feb  9 14:04 system2
crw-r-  1 root  operator0, 116 Feb  9 14:04 tank1
crw-r-  1 root  operator0, 117 Feb  9 14:04 tank2
crw-r-  1 root  operator0, 118 Feb  9 14:04 tank3
crw-r-  

Re: zpool vdev vs. glabel

2010-02-10 Thread Gerrit Kühn
On Tue, 9 Feb 2010 13:27:21 -0700 Elliot Finley efinley.li...@gmail.com
wrote about Re: zpool vdev vs. glabel:

EF I ran into this same problem.  you need to clean the beginning and end
EF of your disk off before glabeling and adding it to your pool.  clean
EF with dd if=/dev/zero...

Hm, I think I did that (at least for the beginning part).
Maybe I was not quite clear what I did below: I removed and re-attached
the *same* disk which was labelled with glabel and running fine brefore.
The label was there when I inserted it back, but zfs went for the da
device node anyway.
If I see this problem again, I will try to wipe the complete disk before
re-inserting it.


cu
  Gerrit
___
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: zpool vdev vs. glabel

2010-02-10 Thread Jeremy Chadwick
On Wed, Feb 10, 2010 at 09:24:12AM +0100, Gerrit Kühn wrote:
 On Tue, 9 Feb 2010 13:27:21 -0700 Elliot Finley efinley.li...@gmail.com
 wrote about Re: zpool vdev vs. glabel:
 
 EF I ran into this same problem.  you need to clean the beginning and end
 EF of your disk off before glabeling and adding it to your pool.  clean
 EF with dd if=/dev/zero...
 
 Hm, I think I did that (at least for the beginning part).
 Maybe I was not quite clear what I did below: I removed and re-attached
 the *same* disk which was labelled with glabel and running fine brefore.
 The label was there when I inserted it back, but zfs went for the da
 device node anyway.
 If I see this problem again, I will try to wipe the complete disk before
 re-inserting it.

If I remember right, glabel metadata is stored in the last sector of
the disk, not the beginning.

glabel clear would probably be easier than dd if=/dev/zero'ing the
entire disk.

-- 
| Jeremy Chadwick   j...@parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
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: zpool vdev vs. glabel

2010-02-10 Thread Marius Nünnerich
2010/2/10 Gerrit Kühn ger...@pmp.uni-hannover.de:
 On Tue, 9 Feb 2010 13:27:21 -0700 Elliot Finley efinley.li...@gmail.com
 wrote about Re: zpool vdev vs. glabel:

 EF I ran into this same problem.  you need to clean the beginning and end
 EF of your disk off before glabeling and adding it to your pool.  clean
 EF with dd if=/dev/zero...

 Hm, I think I did that (at least for the beginning part).
 Maybe I was not quite clear what I did below: I removed and re-attached
 the *same* disk which was labelled with glabel and running fine brefore.
 The label was there when I inserted it back, but zfs went for the da
 device node anyway.
 If I see this problem again, I will try to wipe the complete disk before
 re-inserting it.

It seems there is some kind of race condition with zfs either picking
up the disk itself or the label device for the same disk. I guess it's
which ever it probes first. I wrote the GPT part of glabel for using
it in situations like this, I had not a single report of this kind of
problem with the gpt labels. Maybe you can try them too?

My zpool looks like this:
% zpool status
  pool: tank
 state: ONLINE
 scrub: none requested
config:

NAME STATE READ WRITE CKSUM
tank ONLINE   0 0 0
  raidz2 ONLINE   0 0 0
gpt/wd1  ONLINE   0 0 0
gpt/wd2  ONLINE   0 0 0
gpt/wd3  ONLINE   0 0 0
gpt/wd4  ONLINE   0 0 0
gpt/wd5  ONLINE   0 0 0

errors: No known data errors

I already physically reordered the devices a few times and it always
worked out correctly.
___
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: zpool vdev vs. glabel

2010-02-10 Thread Gerrit Kühn
On Wed, 10 Feb 2010 10:18:49 +0100 Marius Nünnerich mar...@nuenneri.ch
wrote about Re: zpool vdev vs. glabel:

MN It seems there is some kind of race condition with zfs either picking
MN up the disk itself or the label device for the same disk. I guess it's
MN which ever it probes first.

This could explain it. However, it seems that zfs sticks to the da device
once it changed it's mind. Meanwhile I discovered one more system where is
obviously has happened (although I cannot say when:

luna# zpool status
  pool: tank
 state: ONLINE
 scrub: none requested
config:

NAME  STATE READ WRITE CKSUM
tank  ONLINE   0 0 0
  raidz1  ONLINE   0 0 0
label/disk-1  ONLINE   0 0 0
da0   ONLINE   0 0 0
label/disk-2  ONLINE   0 0 0
label/disk-3  ONLINE   0 0 0

errors: No known data errors

MN I wrote the GPT part of glabel for using
MN it in situations like this, I had not a single report of this kind of
MN problem with the gpt labels. Maybe you can try them too?

Yeah, I just have to look into how gpt labels work. I did not use them at
all up to now.


cu
  Gerrit
___
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: zpool vdev vs. glabel

2010-02-09 Thread Jeremy Chadwick
On Tue, Feb 09, 2010 at 03:06:06PM +0100, Gerrit Kühn wrote:
 Hi,
 
 I have created a raidz2 with disk I labeled with glabel before. Right
 after creation this pool looked fine, using devices label/tank[1-6].
 
 I did some tests with replacing/swapping disks and so on. After doing a
 
 zpool offline tank label/tank6
 remove disk
 camcontrol rescan all
 insert disk
 camcontrol rescan all
 zpool online tank label/tank6
 
 I got the disk back, but not under the requested label, but under the da
 device name:
 
   pool: tank
  state: ONLINE
  scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:56:37
 2010 config:
 
 NAME STATE READ WRITE CKSUM
 tank ONLINE   0 0 0
   raidz2 ONLINE   0 0 0
 label/tank1  ONLINE   0 0 0  8.50K resilvered
 label/tank2  ONLINE   0 0 0  7.50K resilvered
 label/tank3  ONLINE   0 0 0  8.50K resilvered
 label/tank4  ONLINE   0 0 0  7.50K resilvered
 label/tank5  ONLINE   0 0 0  9K resilvered
 da6  ONLINE   0 0 0  13.5K resilvered
 
 errors: No known data errors
 
 
 
 Why does this happen? Is there any way to get zfs to use the label again?
 After the device is in use, the label in /dev/label disappears. When
 taking the device offline again, the label is there, but cannot be used:
 
 pigpen# zpool offline tank da6
 pigpen# zpool status
   pool: system
  state: ONLINE
 status: One or more devices has experienced an unrecoverable error.  An
 attempt was made to correct the error.  Applications are
 unaffected. action: Determine if the device needs to be replaced, and
 clear the errors using 'zpool clear' or replace the device with 'zpool
 replace'. see: http://www.sun.com/msg/ZFS-8000-9P
  scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:49:14
 2010 config:
 
 NAME   STATE READ WRITE CKSUM
 system ONLINE   0 0 0
   mirror   ONLINE   0 0 0
 label/system1  ONLINE   3   617 0  126K resilvered
 label/system2  ONLINE   0 0 0  41K resilvered
 
 errors: No known data errors
 
   pool: tank
  state: DEGRADED
 status: One or more devices has experienced an unrecoverable error.  An
 attempt was made to correct the error.  Applications are
 unaffected. action: Determine if the device needs to be replaced, and
 clear the errors using 'zpool clear' or replace the device with 'zpool
 replace'. see: http://www.sun.com/msg/ZFS-8000-9P
  scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:56:37
 2010 config:
 
 NAME STATE READ WRITE CKSUM
 tank DEGRADED 0 0 0
   raidz2 DEGRADED 0 0 0
 label/tank1  ONLINE   0 0 0  8.50K resilvered
 label/tank2  ONLINE   0 0 0  7.50K resilvered
 label/tank3  ONLINE   0 0 0  8.50K resilvered
 label/tank4  ONLINE   0 0 0  7.50K resilvered
 label/tank5  ONLINE   0 0 0  9K resilvered
 da6  OFFLINE  038 0  13.5K resilvered
 
 errors: No known data errors
 pigpen# ll /dev/label/
 total 0
 crw-r-  1 root  operator0, 104 Feb  9 14:04 lisacrypt1
 crw-r-  1 root  operator0, 112 Feb  9 14:04 lisacrypt2
 crw-r-  1 root  operator0, 113 Feb  9 14:04 lisacrypt3
 crw-r-  1 root  operator0, 134 Feb  9 14:48 system1
 crw-r-  1 root  operator0, 115 Feb  9 14:04 system2
 crw-r-  1 root  operator0, 116 Feb  9 14:04 tank1
 crw-r-  1 root  operator0, 117 Feb  9 14:04 tank2
 crw-r-  1 root  operator0, 118 Feb  9 14:04 tank3
 crw-r-  1 root  operator0, 101 Feb  9 14:04 tank4
 crw-r-  1 root  operator0, 102 Feb  9 14:04 tank5
 crw-r-  1 root  operator0, 103 Feb  9 15:02 tank6
 
 pigpen# zpool online tank label/tank6
 cannot online label/tank6: no such device in pool
 
 In a different thread I found the hint to use zpool replace to get to the
 usage of labels, but this seems not possible, either:
 
 pigpen# zpool replace tank label/tank6
 invalid vdev specification
 use '-f' to override the following errors:
 /dev/label/tank6 is part of active pool 'tank'
 
 pigpen# zpool replace -f tank label/tank6
 invalid vdev specification
 the following errors must be manually repaired:
 /dev/label/tank6 is part of active pool 'tank'
 
 pigpen# zpool replace -f tank da6 label/tank6
 invalid vdev specification
 the following errors must be manually repaired:
 /dev/label/tank6 is part of active pool 'tank'
 
 
 I'm running out of ideas here...

Would zpool export and zpool import be necessary in this case?

Also, I'm a little confused as to the use of glabel in this 

Re: zpool vdev vs. glabel

2010-02-09 Thread Gerrit Kühn
On Tue, 9 Feb 2010 06:26:58 -0800 Jeremy Chadwick
free...@jdc.parodius.com wrote about Re: zpool vdev vs. glabel:

JC  I'm running out of ideas here...

JC Would zpool export and zpool import be necessary in this case?

I tried that several times, does not change anything.

JC Also, I'm a little confused as to the use of glabel in this case.  In
JC what condition do your disk indices (e.g. X of daX) change?  Are you
JC yanking multiple disks out of a system at the same time and then
JC shoving them back into different drive bays?  

I just did not want to do hard-wiring da-devices in the kernel. I have two
lsi controllers, and they do not even come up in the same order every time
I boot (mpt0/mpt1), let alone the disks picking up the same daX every
time. I thought labeling the disks would be a good idea to prevent all
these kinds of problems.

JC Are you switching
JC between storage subsystem drivers (ahci(4) vs. ataahci(4), for
JC example) regularly?

No (not yet al least :-).

JC I've yet to be convinced glabel is worth bothering with, unless the
JC system adheres to one of the above situations (which are worthy of
JC strangulation anyway ;-) ).

I would really like to know how this happened at all... meanwhile I used a
spare disk under a different name to replace everything round-robin back
to normal.

However, I just recognized one more thing:

pigpen# zpool status tank
  pool: tank
 state: ONLINE
 scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 15:50:01
2010 config:

NAME STATE READ WRITE CKSUM
tank ONLINE   0 0 0
  raidz2 ONLINE   0 0 0
label/tank1  ONLINE   0 0 0  11K resilvered
label/tank2  ONLINE   0 0 0  10K resilvered
label/tank3  ONLINE   0 0 0  11K resilvered
label/tank4  ONLINE   0 0 0  10.5K resilvered
label/tank5  ONLINE   0 0 0  11K resilvered
label/tank6  ONLINE   0 0 0  15K resilvered

errors: No known data errors
pigpen# zpool offline tank label/tank5
pigpen# zpool status tank
  pool: tank
 state: DEGRADED
status: One or more devices has experienced an unrecoverable error.  An
attempt was made to correct the error.  Applications are
unaffected. action: Determine if the device needs to be replaced, and
clear the errors using 'zpool clear' or replace the device with 'zpool
replace'. see: http://www.sun.com/msg/ZFS-8000-9P
 scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 15:50:01
2010 config:

NAME STATE READ WRITE CKSUM
tank DEGRADED 0 0 0
  raidz2 DEGRADED 0 0 0
label/tank1  ONLINE   0 0 0  11K resilvered
label/tank2  ONLINE   0 0 0  10K resilvered
label/tank3  ONLINE   0 0 0  11K resilvered
label/tank4  ONLINE   0 0 0  10.5K resilvered
label/tank5  ONLINE   0 0 0  11K resilvered
label/tank6  OFFLINE  039 0  15K resilvered

errors: No known data errors

pigpen# zpool offline tank label/tank5
cannot offline label/tank5: no valid replicas



Why can't I offline a second disk? This is a raidz2 volume, after all?!


cu
  Gerrit
___
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: zpool vdev vs. glabel

2010-02-09 Thread Freddie Cash
On Tue, Feb 9, 2010 at 6:26 AM, Jeremy Chadwick free...@jdc.parodius.comwrote:

 Also, I'm a little confused as to the use of glabel in this case.  In
 what condition do your disk indices (e.g. X of daX) change?  Are you
 yanking multiple disks out of a system at the same time and then shoving
 them back into different drive bays?  Are you switching between storage
 subsystem drivers (ahci(4) vs. ataahci(4), for example) regularly?

 I've yet to be convinced glabel is worth bothering with, unless the
 system adheres to one of the above situations (which are worthy of
 strangulation anyway ;-) ).

 Use multiple disk controllers in a server, and watch as kernel updates
and/or BIOS updates change the order that the controllers are probed, thus
changing the dev node for every disk in the system.

Use multiple disk controllers that use CAM, then move from an IDE-based
CompactFlash adapter to a SATA-based CompactFlash adapter for the /
filesystem, and watch the system renumber all your dev nodes.

Use a RAID controller configured for JBOD or Single Disk arrays, and
replace a drive while the server is running, which assigns the disk largest
da number +1, then renumbers everything when the server reboots.

After you run into those kinds of things a few times, you'll start to use
glabel(8) for everything.  Plus, it just makes things easier to understand.
 Instead of da0 through da25 which is a mix of SATA, RAID, and USB drives,
you have cfdisk0, cfdisk1, disk00 through disk24, and so on.

Personally, the greatest thing to ever happen to FreeBSD is the introduction
of GEOM, and the addition of the glabel class.  :)

While ZFS does it's own disk labelling behind the scenes, using glabel just
makes things easier.
-- 
Freddie Cash
fjwc...@gmail.com
___
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: zpool vdev vs. glabel

2010-02-09 Thread Elliot Finley
I ran into this same problem.  you need to clean the beginning and end of
your disk off before glabeling and adding it to your pool.  clean with dd
if=/dev/zero...

2010/2/9 Gerrit Kühn ger...@pmp.uni-hannover.de

 Hi,

 I have created a raidz2 with disk I labeled with glabel before. Right
 after creation this pool looked fine, using devices label/tank[1-6].

 I did some tests with replacing/swapping disks and so on. After doing a

 zpool offline tank label/tank6
 remove disk
 camcontrol rescan all
 insert disk
 camcontrol rescan all
 zpool online tank label/tank6

 I got the disk back, but not under the requested label, but under the da
 device name:

  pool: tank
  state: ONLINE
  scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:56:37
 2010 config:

NAME STATE READ WRITE CKSUM
tank ONLINE   0 0 0
  raidz2 ONLINE   0 0 0
label/tank1  ONLINE   0 0 0  8.50K resilvered
label/tank2  ONLINE   0 0 0  7.50K resilvered
label/tank3  ONLINE   0 0 0  8.50K resilvered
label/tank4  ONLINE   0 0 0  7.50K resilvered
label/tank5  ONLINE   0 0 0  9K resilvered
da6  ONLINE   0 0 0  13.5K resilvered

 errors: No known data errors



 Why does this happen? Is there any way to get zfs to use the label again?
 After the device is in use, the label in /dev/label disappears. When
 taking the device offline again, the label is there, but cannot be used:

 pigpen# zpool offline tank da6
 pigpen# zpool status
  pool: system
  state: ONLINE
 status: One or more devices has experienced an unrecoverable error.  An
attempt was made to correct the error.  Applications are
 unaffected. action: Determine if the device needs to be replaced, and
 clear the errors using 'zpool clear' or replace the device with 'zpool
 replace'. see: http://www.sun.com/msg/ZFS-8000-9P
  scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:49:14
 2010 config:

NAME   STATE READ WRITE CKSUM
system ONLINE   0 0 0
  mirror   ONLINE   0 0 0
label/system1  ONLINE   3   617 0  126K resilvered
label/system2  ONLINE   0 0 0  41K resilvered

 errors: No known data errors

  pool: tank
  state: DEGRADED
 status: One or more devices has experienced an unrecoverable error.  An
attempt was made to correct the error.  Applications are
 unaffected. action: Determine if the device needs to be replaced, and
 clear the errors using 'zpool clear' or replace the device with 'zpool
 replace'. see: http://www.sun.com/msg/ZFS-8000-9P
  scrub: resilver completed after 0h0m with 0 errors on Tue Feb  9 14:56:37
 2010 config:

NAME STATE READ WRITE CKSUM
tank DEGRADED 0 0 0
  raidz2 DEGRADED 0 0 0
label/tank1  ONLINE   0 0 0  8.50K resilvered
label/tank2  ONLINE   0 0 0  7.50K resilvered
label/tank3  ONLINE   0 0 0  8.50K resilvered
label/tank4  ONLINE   0 0 0  7.50K resilvered
label/tank5  ONLINE   0 0 0  9K resilvered
da6  OFFLINE  038 0  13.5K resilvered

 errors: No known data errors
 pigpen# ll /dev/label/
 total 0
 crw-r-  1 root  operator0, 104 Feb  9 14:04 lisacrypt1
 crw-r-  1 root  operator0, 112 Feb  9 14:04 lisacrypt2
 crw-r-  1 root  operator0, 113 Feb  9 14:04 lisacrypt3
 crw-r-  1 root  operator0, 134 Feb  9 14:48 system1
 crw-r-  1 root  operator0, 115 Feb  9 14:04 system2
 crw-r-  1 root  operator0, 116 Feb  9 14:04 tank1
 crw-r-  1 root  operator0, 117 Feb  9 14:04 tank2
 crw-r-  1 root  operator0, 118 Feb  9 14:04 tank3
 crw-r-  1 root  operator0, 101 Feb  9 14:04 tank4
 crw-r-  1 root  operator0, 102 Feb  9 14:04 tank5
 crw-r-  1 root  operator0, 103 Feb  9 15:02 tank6

 pigpen# zpool online tank label/tank6
 cannot online label/tank6: no such device in pool

 In a different thread I found the hint to use zpool replace to get to the
 usage of labels, but this seems not possible, either:

 pigpen# zpool replace tank label/tank6
 invalid vdev specification
 use '-f' to override the following errors:
 /dev/label/tank6 is part of active pool 'tank'

 pigpen# zpool replace -f tank label/tank6
 invalid vdev specification
 the following errors must be manually repaired:
 /dev/label/tank6 is part of active pool 'tank'

 pigpen# zpool replace -f tank da6 label/tank6
 invalid vdev specification
 the following errors must be manually repaired:
 /dev/label/tank6 is part of active pool 'tank'


 I'm running out of ideas here...



 cu
   Gerrit
 

Re: zpool vdev vs. glabel

2010-02-09 Thread Ronald Klop

On Tue, 09 Feb 2010 18:10:21 +0100, Freddie Cash fjwc...@gmail.com wrote:

On Tue, Feb 9, 2010 at 6:26 AM, Jeremy Chadwick  
free...@jdc.parodius.comwrote:



Also, I'm a little confused as to the use of glabel in this case.  In
what condition do your disk indices (e.g. X of daX) change?  Are you
yanking multiple disks out of a system at the same time and then shoving
them back into different drive bays?  Are you switching between storage
subsystem drivers (ahci(4) vs. ataahci(4), for example) regularly?

I've yet to be convinced glabel is worth bothering with, unless the
system adheres to one of the above situations (which are worthy of
strangulation anyway ;-) ).

Use multiple disk controllers in a server, and watch as kernel updates
and/or BIOS updates change the order that the controllers are probed,  
thus

changing the dev node for every disk in the system.

Use multiple disk controllers that use CAM, then move from an IDE-based
CompactFlash adapter to a SATA-based CompactFlash adapter for the /
filesystem, and watch the system renumber all your dev nodes.

Use a RAID controller configured for JBOD or Single Disk arrays, and
replace a drive while the server is running, which assigns the disk  
largest

da number +1, then renumbers everything when the server reboots.

After you run into those kinds of things a few times, you'll start to use
glabel(8) for everything.  Plus, it just makes things easier to  
understand.
 Instead of da0 through da25 which is a mix of SATA, RAID, and USB  
drives,

you have cfdisk0, cfdisk1, disk00 through disk24, and so on.

Personally, the greatest thing to ever happen to FreeBSD is the  
introduction

of GEOM, and the addition of the glabel class.  :)


Yeah. GEOM is very very very nice. It is a very elegant solution to a lot  
of problems. I always wonder why other OS'es didn't pick it up.


Ronald.


While ZFS does it's own disk labelling behind the scenes, using glabel  
just

makes things easier.


___
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