Hi all, I have a D1000 storage array that''s set up in a split bus config. For various reason we only have access to one SCSI cable for the time being, but the intent is to set up the array as ZFS mirrored devices. That is, the intent is that we''ll have a ZFS pool created from 3 pairs of mirrored disks, where each half of the mirror is on different "sides" of the D1000 (so that we also have controller redundancy). Looking through the ZFS manual, it looks like I can create a non- redundant pool using one side of the D1000, then later mirror the disks when the other cable is available. Something like this: zpool create dpool c1t0d0 c1t1d0 c1t2d0 And then later, when the other cable is installed: zpool attach dpool c1t0d0 c2t0d0 zpool attach dpool c1t1d0 c2t1d0 zpool attach dpool c1t2d0 c2t2d0 Which would be the same as initially configuring the pool like this: zpool create dpool mirror c1t0d0 c2t0d0 mirror c1t1d0 c2t1d0 mirror c1t2d0 c2t2d0 Is that correct? -- Rich Teer, SCSA, SCNA, SCSECA URLs: http://www.rite-group.com/rich http://www.linkedin.com/in/richteer
> > zpool create dpool c1t0d0 c1t1d0 c1t2d0yep> And then later, when the other cable is installed: > > zpool attach dpool c1t0d0 c2t0d0 > zpool attach dpool c1t1d0 c2t1d0 > zpool attach dpool c1t2d0 c2t2d0That is sort of the way I do things also : # zpool status pool: fibre0 state: ONLINE status: The pool is formatted using an older on-disk format. The pool can still be used, but some features are unavailable. action: Upgrade the pool using ''zpool upgrade''. Once this is done, the pool will no longer be accessible on older software versions. scrub: resilver completed after 1h35m with 0 errors on Tue Mar 24 18:23:20 2009 config: NAME STATE READ WRITE CKSUM fibre0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c2t16d0 ONLINE 0 0 0 c5t0d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c5t1d0 ONLINE 0 0 0 c2t17d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c5t2d0 ONLINE 0 0 0 c2t18d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c2t20d0 ONLINE 0 0 0 c5t4d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c2t21d0 ONLINE 0 0 0 c5t6d0 ONLINE 0 0 0 spares c2t22d0 AVAIL errors: No known data errors You noticed that the man page is not too clear on that eh? zpool attach [-f] pool device new_device Attaches new_device to an existing zpool device. The existing device cannot be part of a raidz configuration. If device is not currently part of a mirrored configura- tion, device automatically transforms into a two-way mirror of device and new_device. If device is part of a two-way mirror, attaching new_device creates a three-way mirror, and so on. In either case, new_device begins to resilver immediately. so yeah, you have it. Want to go for bonus points? Try to read into that man page to figure out how to add a hot spare *after* you are all mirrored up. -- Dennis Clarke
On Fri, 29 May 2009, Rich Teer wrote:> zpool attach dpool c1t0d0 c2t0d0 > zpool attach dpool c1t1d0 c2t1d0 > zpool attach dpool c1t2d0 c2t2d0These should all be "zpool add dpool mirror {disk1} {disk2}", but yes. I recommend trying this out using files instead of disks beforehand so you get a feel for how it works. Adding a vdev (i.e. disk, mirror, raidz) to a pool extends the pool and starts striping. Attaching a disk is done to another disk to create a mirror. It''s easy to confuse the two because they both start with a (seriously). Regards, markm
On Fri, 29 May 2009, Dennis Clarke wrote: Dennis! Good to hear from you! I hope things are well in Dennis-land.> so yeah, you have it. > > Want to go for bonus points? Try to read into that man page to figure out > how to add a hot spare *after* you are all mirrored up.Excellent! We will be using hot spares (one per "side"), but I''ll have a close look at the docs later. Thanks for the quick help, everyone! -- Rich Teer, SCSA, SCNA, SCSECA URLs: http://www.rite-group.com/rich http://www.linkedin.com/in/richteer
Cindy.Swearingen at Sun.COM
2009-May-29 15:58 UTC
[zfs-discuss] Quick adding devices question
Hi Rich, Yes, your zpool syntax is correct. I just tested what I think is your final configuration. Cindy # zpool create dpool c1t0d0 c1t1d0 c1t2d0 # zpool attach dpool c1t1d0 c1t3d0 # zpool attach dpool c1t0d0 c1t4d0 # zpool attach dpool c1t2d0 c1t5d0 # zpool status dpool pool: dpool state: ONLINE scrub: resilver completed after 0h0m with 0 errors on Fri May 29 10:00:12 2009 config: NAME STATE READ WRITE CKSUM dpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t0d0 ONLINE 0 0 0 c1t4d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t1d0 ONLINE 0 0 0 c1t3d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 c1t5d0 ONLINE 0 0 0 34.5K resilvered errors: No known data errors Rich Teer wrote:> Hi all, > > I have a D1000 storage array that''s set up in a split bus config. > For various reason we only have access to one SCSI cable for the > time being, but the intent is to set up the array as ZFS mirrored > devices. That is, the intent is that we''ll have a ZFS pool created > from 3 pairs of mirrored disks, where each half of the mirror is > on different "sides" of the D1000 (so that we also have controller > redundancy). > > Looking through the ZFS manual, it looks like I can create a non- > redundant pool using one side of the D1000, then later mirror the > disks when the other cable is available. Something like this: > > zpool create dpool c1t0d0 c1t1d0 c1t2d0 > > And then later, when the other cable is installed: > > zpool attach dpool c1t0d0 c2t0d0 > zpool attach dpool c1t1d0 c2t1d0 > zpool attach dpool c1t2d0 c2t2d0 > > Which would be the same as initially configuring the pool like this: > > zpool create dpool mirror c1t0d0 c2t0d0 mirror c1t1d0 c2t1d0 mirror c1t2d0 c2t2d0 > > Is that correct? >
On Fri, 29 May 2009, Cindy.Swearingen at Sun.COM wrote:> Hi Rich, > > Yes, your zpool syntax is correct. > > I just tested what I think is your final > configuration.Great (gotta love ZFS)! Many thanks, -- Rich Teer, SCSA, SCNA, SCSECA URLs: http://www.rite-group.com/rich http://www.linkedin.com/in/richteer