Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-06 Thread Dick Davies
Does 'zpool attach' enough for a root pool?
I mean, does it install GRUB bootblocks on the disk?

On Wed, Jul 2, 2008 at 1:10 PM, Robert Milkowski [EMAIL PROTECTED] wrote:
 Hello Tommaso,

 Wednesday, July 2, 2008, 1:04:06 PM, you wrote:

  the root filesystem of my thumper is a ZFS with a single disk:



 is it possible to add a mirror to it? I seem to be able only to add a new
 PAIR of disks in mirror, but not to add a mirror to the existing disk ...

 zpool attach

-- 
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-06 Thread Tommaso Boccali
we did a mistake :(

tom

On Wed, Jul 2, 2008 at 5:58 PM, Richard Elling [EMAIL PROTECTED] wrote:
 Tommaso Boccali wrote:

 Ciao, the rot filesystem of my thumper is a ZFS with a single disk:

 bash-3.2# zpool status rpool
  pool: rpool
  state: ONLINE
  scrub: none requested
 config:

NAMESTATE READ WRITE CKSUM
rpool   ONLINE   0 0 0
  c5t0d0s0  ONLINE   0 0 0
spares
  c0t7d0AVAILc1t6d0AVAILc1t7d0
  AVAIL

 is it possible to add a mirror to it? I seem to be able only to add a new
 PAIR of disks in mirror, but not to add a mirror to the existing disk ...


 As Edna and Robert mentioned, zpool attach will add the mirror.
 But note that the X4500 has only two possible boot devices:
 c5t0d0 and c5t4d0.  This is a BIOS limitation.  So you will want
 to mirror with c5t4d0 and configure the disks for boot.  See the
 docs on ZFS boot for details on how to configure the boot sectors
 and grub.
 -- richard





-- 
Tommaso Boccali
INFN Pisa
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-06 Thread Tommaso Boccali

 As Edna and Robert mentioned, zpool attach will add the mirror.
 But note that the X4500 has only two possible boot devices:
 c5t0d0 and c5t4d0.  This is a BIOS limitation.  So you will want
 to mirror with c5t4d0 and configure the disks for boot.  See the
 docs on ZFS boot for details on how to configure the boot sectors
 and grub.
 -- richard


uhm, bad.

I did not know this, so now the root is
bash-3.2# zpool status rpool
  pool: rpool
 state: ONLINE
 scrub: resilver completed after 0h8m with 0 errors on Wed Jul  2 16:09:14 2008
config:

NAME  STATE READ WRITE CKSUM
rpool ONLINE   0 0 0
  mirror  ONLINE   0 0 0
c5t0d0s0  ONLINE   0 0 0
c1t7d0ONLINE   0 0 0
spares
  c0t7d0  AVAIL
  c1t6d0  AVAIL


while c5t4d0 belongs to a raiz pool:

...
  raidz1ONLINE   0 0 0
c0t4d0  ONLINE   0 0 0
c1t4d0  ONLINE   0 0 0
c5t4d0  ONLINE   0 0 0
c6t7d0  ONLINE   0 0 0
c5t5d0  ONLINE   0 0 0
c5t6d0  ONLINE   0 0 0
c5t7d0  ONLINE   0 0 0
c1t5d0  ONLINE   0 0 0
...

is it possible to restore the good behavior?
something like
- detach c1t7d0 from rpool
- detach c5t4d0 from the other pool (the pool still survives since it is raidz)
- reattach in reverse order? (and so reform mirror and raidz?)

thanks a lot again

tommaso




-- 
Tommaso Boccali
INFN Pisa
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-06 Thread Jeff Bonwick
I would just swap the physical locations of the drives, so that the
second half of the mirror is in the right location to be bootable.
ZFS won't mind -- it tracks the disks by content, not by pathname.
Note that SATA is not hotplug-happy, so you're probably best off
doing this while the box is powered off.  Upon reboot, ZFS should
figure out what happened, update the device paths, and... that's it.

Jeff

On Sun, Jul 06, 2008 at 08:47:25AM +0200, Tommaso Boccali wrote:
 
  As Edna and Robert mentioned, zpool attach will add the mirror.
  But note that the X4500 has only two possible boot devices:
  c5t0d0 and c5t4d0.  This is a BIOS limitation.  So you will want
  to mirror with c5t4d0 and configure the disks for boot.  See the
  docs on ZFS boot for details on how to configure the boot sectors
  and grub.
  -- richard
 
 
 uhm, bad.
 
 I did not know this, so now the root is
 bash-3.2# zpool status rpool
   pool: rpool
  state: ONLINE
  scrub: resilver completed after 0h8m with 0 errors on Wed Jul  2 16:09:14 
 2008
 config:
 
 NAME  STATE READ WRITE CKSUM
 rpool ONLINE   0 0 0
   mirror  ONLINE   0 0 0
 c5t0d0s0  ONLINE   0 0 0
 c1t7d0ONLINE   0 0 0
 spares
   c0t7d0  AVAIL
   c1t6d0  AVAIL
 
 
 while c5t4d0 belongs to a raiz pool:
 
 ...
   raidz1ONLINE   0 0 0
 c0t4d0  ONLINE   0 0 0
 c1t4d0  ONLINE   0 0 0
 c5t4d0  ONLINE   0 0 0
 c6t7d0  ONLINE   0 0 0
 c5t5d0  ONLINE   0 0 0
 c5t6d0  ONLINE   0 0 0
 c5t7d0  ONLINE   0 0 0
 c1t5d0  ONLINE   0 0 0
 ...
 
 is it possible to restore the good behavior?
 something like
 - detach c1t7d0 from rpool
 - detach c5t4d0 from the other pool (the pool still survives since it is 
 raidz)
 - reattach in reverse order? (and so reform mirror and raidz?)
 
 thanks a lot again
 
 tommaso
 
 
 
 
 -- 
 Tommaso Boccali
 INFN Pisa
 ___
 zfs-discuss mailing list
 zfs-discuss@opensolaris.org
 http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-06 Thread Johan Hartzenberg
On Sun, Jul 6, 2008 at 10:27 AM, Jeff Bonwick [EMAIL PROTECTED] wrote:

 I would just swap the physical locations of the drives, so that the
 second half of the mirror is in the right location to be bootable.
 ZFS won't mind -- it tracks the disks by content, not by pathname.
 Note that SATA is not hotplug-happy, so you're probably best off
 doing this while the box is powered off.  Upon reboot, ZFS should
 figure out what happened, update the device paths, and... that's it.


Wishlist item nr 1: Ability to setup raid 1+z
Wishlist item nr 2: Remove disks from pools

  _J

-- 
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke

Afrikaanse Stap Website: http://www.bloukous.co.za

My blog: http://initialprogramload.blogspot.com
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-06 Thread Tommaso Boccali
is there a way to do it via software ? (attach remove add detach)

if not else, it would help me quite a lot to understand the underlying
zfs mechanism ...
thanks

;)

tom

On Sun, Jul 6, 2008 at 10:27 AM, Jeff Bonwick [EMAIL PROTECTED] wrote:
 I would just swap the physical locations of the drives, so that the
 second half of the mirror is in the right location to be bootable.
 ZFS won't mind -- it tracks the disks by content, not by pathname.
 Note that SATA is not hotplug-happy, so you're probably best off
 doing this while the box is powered off.  Upon reboot, ZFS should
 figure out what happened, update the device paths, and... that's it.

 Jeff

 On Sun, Jul 06, 2008 at 08:47:25AM +0200, Tommaso Boccali wrote:
 
  As Edna and Robert mentioned, zpool attach will add the mirror.
  But note that the X4500 has only two possible boot devices:
  c5t0d0 and c5t4d0.  This is a BIOS limitation.  So you will want
  to mirror with c5t4d0 and configure the disks for boot.  See the
  docs on ZFS boot for details on how to configure the boot sectors
  and grub.
  -- richard
 

 uhm, bad.

 I did not know this, so now the root is
 bash-3.2# zpool status rpool
   pool: rpool
  state: ONLINE
  scrub: resilver completed after 0h8m with 0 errors on Wed Jul  2 16:09:14 
 2008
 config:

 NAME  STATE READ WRITE CKSUM
 rpool ONLINE   0 0 0
   mirror  ONLINE   0 0 0
 c5t0d0s0  ONLINE   0 0 0
 c1t7d0ONLINE   0 0 0
 spares
   c0t7d0  AVAIL
   c1t6d0  AVAIL


 while c5t4d0 belongs to a raiz pool:

 ...
   raidz1ONLINE   0 0 0
 c0t4d0  ONLINE   0 0 0
 c1t4d0  ONLINE   0 0 0
 c5t4d0  ONLINE   0 0 0
 c6t7d0  ONLINE   0 0 0
 c5t5d0  ONLINE   0 0 0
 c5t6d0  ONLINE   0 0 0
 c5t7d0  ONLINE   0 0 0
 c1t5d0  ONLINE   0 0 0
 ...

 is it possible to restore the good behavior?
 something like
 - detach c1t7d0 from rpool
 - detach c5t4d0 from the other pool (the pool still survives since it is 
 raidz)
 - reattach in reverse order? (and so reform mirror and raidz?)

 thanks a lot again

 tommaso
 



 --
 Tommaso Boccali
 INFN Pisa
 ___
 zfs-discuss mailing list
 zfs-discuss@opensolaris.org
 http://mail.opensolaris.org/mailman/listinfo/zfs-discuss




-- 
Tommaso Boccali
INFN Pisa
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-06 Thread Richard Elling
Tommaso Boccali wrote:
 is there a way to do it via software ? (attach remove add detach)
   

Skeleton process:
1. detach c1t7d0 from the root mirror
2. replace c5t4d0 with c1t7d0

In the details, you will need to be careful with the partitioning
for the root mirror.  You will need to use slices because the boot
process does not understand EFI labels.  In other words, your
rpool mirror at c1t7d0 has an EFI label and is not bootable.
Note: this is not a ZFS limitation, it is a boot limitation.

The detailed procedure for configuring a boot mirror using
ZFS as the root file system is in the ZFS Administration Guide
http://www.opensolaris.org/os/community/zfs/docs/zfsadmin.pdf
 -- richard

 if not else, it would help me quite a lot to understand the underlying
 zfs mechanism ...
 thanks

 ;)

 tom

 On Sun, Jul 6, 2008 at 10:27 AM, Jeff Bonwick [EMAIL PROTECTED] wrote:
   
 I would just swap the physical locations of the drives, so that the
 second half of the mirror is in the right location to be bootable.
 ZFS won't mind -- it tracks the disks by content, not by pathname.
 Note that SATA is not hotplug-happy, so you're probably best off
 doing this while the box is powered off.  Upon reboot, ZFS should
 figure out what happened, update the device paths, and... that's it.

 Jeff

 On Sun, Jul 06, 2008 at 08:47:25AM +0200, Tommaso Boccali wrote:
 
 As Edna and Robert mentioned, zpool attach will add the mirror.
 But note that the X4500 has only two possible boot devices:
 c5t0d0 and c5t4d0.  This is a BIOS limitation.  So you will want
 to mirror with c5t4d0 and configure the disks for boot.  See the
 docs on ZFS boot for details on how to configure the boot sectors
 and grub.
 -- richard

 
 uhm, bad.

 I did not know this, so now the root is
 bash-3.2# zpool status rpool
   pool: rpool
  state: ONLINE
  scrub: resilver completed after 0h8m with 0 errors on Wed Jul  2 16:09:14 
 2008
 config:

 NAME  STATE READ WRITE CKSUM
 rpool ONLINE   0 0 0
   mirror  ONLINE   0 0 0
 c5t0d0s0  ONLINE   0 0 0
 c1t7d0ONLINE   0 0 0
 spares
   c0t7d0  AVAIL
   c1t6d0  AVAIL


 while c5t4d0 belongs to a raiz pool:

 ...
   raidz1ONLINE   0 0 0
 c0t4d0  ONLINE   0 0 0
 c1t4d0  ONLINE   0 0 0
 c5t4d0  ONLINE   0 0 0
 c6t7d0  ONLINE   0 0 0
 c5t5d0  ONLINE   0 0 0
 c5t6d0  ONLINE   0 0 0
 c5t7d0  ONLINE   0 0 0
 c1t5d0  ONLINE   0 0 0
 ...

 is it possible to restore the good behavior?
 something like
 - detach c1t7d0 from rpool
 - detach c5t4d0 from the other pool (the pool still survives since it is 
 raidz)
 - reattach in reverse order? (and so reform mirror and raidz?)

 thanks a lot again

 tommaso
   

 --
 Tommaso Boccali
 INFN Pisa
 ___
 zfs-discuss mailing list
 zfs-discuss@opensolaris.org
 http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
   



   

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-02 Thread Enda O'Connor
Hi Tommaso
Have a look at the man page for zfs and the attach section in 
particular, it will do the job nicely.

Enda



Tommaso Boccali wrote:
 Ciao, 
 the rot filesystem of my thumper is a ZFS with a single disk:
 
 bash-3.2# zpool status rpool
   pool: rpool
  state: ONLINE
  scrub: none requested
 config:
 
 NAMESTATE READ WRITE CKSUM
 rpool   ONLINE   0 0 0
   c5t0d0s0  ONLINE   0 0 0
 spares
   c0t7d0AVAIL   
   c1t6d0AVAIL   
   c1t7d0AVAIL   
 
 
 is it possible to add a mirror to it? I seem to be able only to add a 
 new PAIR of disks in mirror, but not to add a mirror to the existing 
 disk ...
 
 thanks
 
 tommaso
 
 
 Tommaso Boccali - CMS Experiment - INFN Pisa
 iChat/AIM/Skype/Gizmo:  tomboc73
 Mail: mailto:[EMAIL PROTECTED]
 Pisa: +390502214216  Portable: +393472563154
 CERN: +41227671545   Portable:  +41762310208
 
 
 
 
 ___
 zfs-discuss mailing list
 zfs-discuss@opensolaris.org
 http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-02 Thread Richard Elling
Tommaso Boccali wrote:
 Ciao, 
 the rot filesystem of my thumper is a ZFS with a single disk:

 bash-3.2# zpool status rpool
   pool: rpool
  state: ONLINE
  scrub: none requested
 config:

 NAMESTATE READ WRITE CKSUM
 rpool   ONLINE   0 0 0
   c5t0d0s0  ONLINE   0 0 0
 spares
   c0t7d0AVAIL   
   c1t6d0AVAIL   
   c1t7d0AVAIL   


 is it possible to add a mirror to it? I seem to be able only to add a 
 new PAIR of disks in mirror, but not to add a mirror to the existing 
 disk ...


As Edna and Robert mentioned, zpool attach will add the mirror.
But note that the X4500 has only two possible boot devices:
c5t0d0 and c5t4d0.  This is a BIOS limitation.  So you will want
to mirror with c5t4d0 and configure the disks for boot.  See the
docs on ZFS boot for details on how to configure the boot sectors
and grub.
 -- richard

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-02 Thread Orvar Korvar
Remember, you can not delete a device, so be careful what you add.
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-02 Thread Richard Elling
Orvar Korvar wrote:
 Remember, you can not delete a device, so be careful what you add.
   

You can detach disks from mirrors.
 -- richard

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-02 Thread dick hoogendijk
On Wed, 02 Jul 2008 13:41:18 -0700
Richard Elling [EMAIL PROTECTED] wrote:

 Orvar Korvar wrote:
  Remember, you can not delete a device, so be careful what you add.
 
 You can detach disks from mirrors.

So, a mirror of two disks becomes a system of two seperate disks?

-- 
Dick Hoogendijk -- PGP/GnuPG key: 01D2433D
++ http://nagual.nl/ + SunOS sxce snv91 ++
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] is it possible to add a mirror device later?

2008-07-02 Thread Richard Elling
dick hoogendijk wrote:
 On Wed, 02 Jul 2008 13:41:18 -0700
 Richard Elling [EMAIL PROTECTED] wrote:

   
 Orvar Korvar wrote:
 
 Remember, you can not delete a device, so be careful what you add.
   
 You can detach disks from mirrors.
 

 So, a mirror of two disks becomes a system of two seperate disks?

   

zpool detach will detach a disk from a mirror.  But it will no longer
be part of the pool.  If you want to add the detached disk to the
pool as a stripe, then that would be a zpool detach followed by a
zpool add

Please take a careful look at the zpool add, attach, and detach options.
 -- richard

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss