Tommaso Boccali
2008-Jul-02 12:04 UTC
[zfs-discuss] is it possible to add a mirror device later?
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: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c5t0d0s0 ONLINE 0 0 0 spares c0t7d0 AVAIL c1t6d0 AVAIL c1t7d0 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 ... thanks tommaso Tommaso Boccali - CMS Experiment - INFN Pisa iChat/AIM/Skype/Gizmo: tomboc73 Mail: mailto:tommaso.boccali at cern.ch Pisa: +390502214216 Portable: +393472563154 CERN: +41227671545 Portable: +41762310208 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20080702/971d30eb/attachment.html>
Hello Tommaso, Wednesday, July 2, 2008, 1:04:06 PM, you 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: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c5t0d0s0 ONLINE 0 0 0 spares c0t7d0 AVAIL c1t6d0 AVAIL c1t7d0 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 ... zpool attach -- Best regards, Robert mailto:milek@task.gda.pl http://milek.blogspot.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Enda O''Connor
2008-Jul-02 12:14 UTC
[zfs-discuss] is it possible to add a mirror device later?
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: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > c5t0d0s0 ONLINE 0 0 0 > spares > c0t7d0 AVAIL > c1t6d0 AVAIL > c1t7d0 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 ... > > thanks > > tommaso > > > Tommaso Boccali - CMS Experiment - INFN Pisa > iChat/AIM/Skype/Gizmo: tomboc73 > Mail: mailto:tommaso.boccali at cern.ch > Pisa: +390502214216 Portable: +393472563154 > CERN: +41227671545 Portable: +41762310208 > > > ------------------------------------------------------------------------ > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Richard Elling
2008-Jul-02 15:58 UTC
[zfs-discuss] is it possible to add a mirror device later?
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: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > c5t0d0s0 ONLINE 0 0 0 > spares > c0t7d0 AVAIL > c1t6d0 AVAIL > c1t7d0 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
Orvar Korvar
2008-Jul-02 20:31 UTC
[zfs-discuss] is it possible to add a mirror device later?
Remember, you can not delete a device, so be careful what you add. This message posted from opensolaris.org
Richard Elling
2008-Jul-02 20:41 UTC
[zfs-discuss] is it possible to add a mirror device later?
Orvar Korvar wrote:> Remember, you can not delete a device, so be careful what you add. >You can detach disks from mirrors. -- richard
dick hoogendijk
2008-Jul-02 21:40 UTC
[zfs-discuss] is it possible to add a mirror device later?
On Wed, 02 Jul 2008 13:41:18 -0700 Richard Elling <Richard.Elling at Sun.COM> 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 ++
Richard Elling
2008-Jul-02 22:31 UTC
[zfs-discuss] is it possible to add a mirror device later?
dick hoogendijk wrote:> On Wed, 02 Jul 2008 13:41:18 -0700 > Richard Elling <Richard.Elling at Sun.COM> 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
Dick Davies
2008-Jul-06 06:35 UTC
[zfs-discuss] is it possible to add a mirror device later?
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 <milek at task.gda.pl> 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/
Tommaso Boccali
2008-Jul-06 06:39 UTC
[zfs-discuss] is it possible to add a mirror device later?
we did a mistake :( tom On Wed, Jul 2, 2008 at 5:58 PM, Richard Elling <Richard.Elling at sun.com> 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: >> >> NAME STATE READ WRITE CKSUM >> rpool ONLINE 0 0 0 >> c5t0d0s0 ONLINE 0 0 0 >> spares >> c0t7d0 AVAIL c1t6d0 AVAIL c1t7d0 >> 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
Tommaso Boccali
2008-Jul-06 06:47 UTC
[zfs-discuss] is it possible to add a mirror device later?
> > 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 c1t7d0 ONLINE 0 0 0 spares c0t7d0 AVAIL c1t6d0 AVAIL while c5t4d0 belongs to a raiz pool: ... raidz1 ONLINE 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
Jeff Bonwick
2008-Jul-06 08:27 UTC
[zfs-discuss] is it possible to add a mirror device later?
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 > c1t7d0 ONLINE 0 0 0 > spares > c0t7d0 AVAIL > c1t6d0 AVAIL > > > while c5t4d0 belongs to a raiz pool: > > ... > raidz1 ONLINE 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 at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Johan Hartzenberg
2008-Jul-06 09:44 UTC
[zfs-discuss] is it possible to add a mirror device later?
On Sun, Jul 6, 2008 at 10:27 AM, Jeff Bonwick <Jeff.Bonwick at sun.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20080706/d841cb70/attachment.html>
Tommaso Boccali
2008-Jul-06 14:51 UTC
[zfs-discuss] is it possible to add a mirror device later?
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 <Jeff.Bonwick at sun.com> 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 >> c1t7d0 ONLINE 0 0 0 >> spares >> c0t7d0 AVAIL >> c1t6d0 AVAIL >> >> >> while c5t4d0 belongs to a raiz pool: >> >> ... >> raidz1 ONLINE 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 at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-- Tommaso Boccali INFN Pisa
Richard Elling
2008-Jul-06 17:43 UTC
[zfs-discuss] is it possible to add a mirror device later?
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 <Jeff.Bonwick at sun.com> 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 >>> c1t7d0 ONLINE 0 0 0 >>> spares >>> c0t7d0 AVAIL >>> c1t6d0 AVAIL >>> >>> >>> while c5t4d0 belongs to a raiz pool: >>> >>> ... >>> raidz1 ONLINE 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 at opensolaris.org >>> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >>> > > > >