We have a system with two drives in it, part UFS, part ZFS. It''s a software mirrored system with slices 0,1,3 setup as small UFS slices, and slice 4 on each drive being the ZFS slice. One of the drives is failing and we need to replace it. I just want to make sure I have the correct order of things before I do this. This is our pool: NAME STATE READ WRITE CKSUM mainpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c0t0d0s4 ONLINE 0 0 243 c0t1d0s4 ONLINE 0 0 0 1) zpool detach mainpool c0t0d0s4 2) powerdown system, replace faulty drive 3) reboot system, setup slices to match the current setup 4) zpool add mainpool c0t0d0s4 This will add the new drive back into the mirrored pool and sync the new slice 4 back into the mirror, correct? This message posted from opensolaris.org
Matt Cohen wrote:> We have a system with two drives in it, part UFS, part ZFS. It''s a software mirrored system with slices 0,1,3 setup as small UFS slices, and slice 4 on each drive being the ZFS slice. > > One of the drives is failing and we need to replace it. > > I just want to make sure I have the correct order of things before I do this. > > This is our pool: > NAME STATE READ WRITE CKSUM > mainpool ONLINE 0 0 0 > mirror ONLINE 0 0 0 > c0t0d0s4 ONLINE 0 0 243 > c0t1d0s4 ONLINE 0 0 0 > > 1) zpool detach mainpool c0t0d0s4 > 2) powerdown system, replace faulty drive > 3) reboot system, setup slices to match the current setup > 4) zpool add mainpool c0t0d0s4^^^ I think you want to use ''zpool attach'' here to create a two-way mirror, right? Dana
Cindy.Swearingen at Sun.COM
2007-Feb-21 17:23 UTC
[zfs-discuss] Replacing a drive using ZFS
Matt, Generally, when a disk needs to be replaced, you replace the disk, use the zpool replace command, and you''re done... This is only a little more complicated in your scenario below because of the sharing the disk between ZFS and UFS. Most disks are hot-pluggable so you generally don''t need to shut down the system to replace the disk, but only you know if your disks are hot-pluggable. In addition, if the disk is shared between UFS and ZFS contains important system files, then you might need to bring the system down. However, you don''t need to use zpool detach or zpool add if you are just replacing the disk. The steps would look like this: 1. Shut down the system (if necessary) 2. Replace the faulty disk 3. Set up the slices on replacement disk as needed 4. Bring the system back up (if necessary) 5. Run this command: # zpool replace mainpool c0t0d0s4 Let us know how it goes, particularly me, since I need to know if this works as documented. :-) Thanks, Cindy Matt Cohen wrote:> We have a system with two drives in it, part UFS, part ZFS. It''s a software mirrored system with slices 0,1,3 setup as small UFS slices, and slice 4 on each drive being the ZFS slice. > > One of the drives is failing and we need to replace it. > > I just want to make sure I have the correct order of things before I do this. > > This is our pool: > NAME STATE READ WRITE CKSUM > mainpool ONLINE 0 0 0 > mirror ONLINE 0 0 0 > c0t0d0s4 ONLINE 0 0 243 > c0t1d0s4 ONLINE 0 0 0 > > 1) zpool detach mainpool c0t0d0s4 > 2) powerdown system, replace faulty drive > 3) reboot system, setup slices to match the current setup > 4) zpool add mainpool c0t0d0s4 > > This will add the new drive back into the mirrored pool and sync the new slice 4 back into the mirror, correct? > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Matt, Also, since you only have two drives and are using software mirroring for the UFS slices, you''ll need to follow the proper procedures for the software mirroring metadata replicas. See the pertinent docs for details. -- richard Cindy.Swearingen at Sun.COM wrote:> Matt, > > Generally, when a disk needs to be replaced, you replace the disk, > use the zpool replace command, and you''re done... > > This is only a little more complicated in your scenario below because > of the sharing the disk between ZFS and UFS. > > Most disks are hot-pluggable so you generally don''t need to shut down > the system to replace the disk, but only you know if your disks > are hot-pluggable. In addition, if the disk is shared between UFS > and ZFS contains important system files, then you might need > to bring the system down. > > However, you don''t need to use zpool detach or zpool add if you are > just replacing the disk. > > The steps would look like this: > > 1. Shut down the system (if necessary) > 2. Replace the faulty disk > 3. Set up the slices on replacement disk as needed > 4. Bring the system back up (if necessary) > 5. Run this command: > > # zpool replace mainpool c0t0d0s4 > > Let us know how it goes, particularly me, since I need to know if this > works as documented. :-) > > Thanks, > > Cindy > Matt Cohen wrote: >> We have a system with two drives in it, part UFS, part ZFS. It''s a >> software mirrored system with slices 0,1,3 setup as small UFS slices, >> and slice 4 on each drive being the ZFS slice. >> >> One of the drives is failing and we need to replace it. >> >> I just want to make sure I have the correct order of things before I >> do this. >> >> This is our pool: >> NAME STATE READ WRITE CKSUM >> mainpool ONLINE 0 0 0 >> mirror ONLINE 0 0 0 >> c0t0d0s4 ONLINE 0 0 243 >> c0t1d0s4 ONLINE 0 0 0 >> >> 1) zpool detach mainpool c0t0d0s4 >> 2) powerdown system, replace faulty drive >> 3) reboot system, setup slices to match the current setup >> 4) zpool add mainpool c0t0d0s4 >> >> This will add the new drive back into the mirrored pool and sync the >> new slice 4 back into the mirror, correct? >> >> >> This message posted from opensolaris.org >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Cindy.Swearingen at Sun.COM wrote:> Matt, > > Generally, when a disk needs to be replaced, you replace the disk, > use the zpool replace command, and you''re done... > > This is only a little more complicated in your scenario below because > of the sharing the disk between ZFS and UFS. > > Most disks are hot-pluggable so you generally don''t need to shut down > the system to replace the disk, but only you know if your disks > are hot-pluggable. In addition, if the disk is shared between UFS > and ZFS contains important system files, then you might need > to bring the system down. > > However, you don''t need to use zpool detach or zpool add if you are > just replacing the disk. > > The steps would look like this: > > 1. Shut down the system (if necessary) > 2. Replace the faulty disk > 3. Set up the slices on replacement disk as needed > 4. Bring the system back up (if necessary) > 5. Run this command: > > # zpool replace mainpool c0t0d0s4 > > Let us know how it goes, particularly me, since I need to know if this > works as documented. :-) > > Thanks,This works exactly as documented; I upgraded a 4 disk raidz config from 250 GB drives to 500 GB drives one at a time by shutting down, removing one of the drives, replacing it w/ a bigger drive, rebooting, typing zpool status, finding the name of the missing/ faulted drive and using that as the disk argument to zpool replace. When the 4th resilver finished, I had lots more disk space all of a sudden. - Bart -- Bart Smaalders Solaris Kernel Performance barts at cyber.eng.sun.com http://blogs.sun.com/barts
Now I have a very stupid question. I put this thread on my watch list. I''ve gotten four emails saying that the thread was updated by various people, yet there are no replies in it. How do I see the replies? This message posted from opensolaris.org