Kind of a newbie question here -- or I haven''t been able to find great search terms for this... Does ZFS recognize zpool members based on drive serial number or some other unique, drive-associated ID? Or is it based off the drive''s location (c0t0d0, etc). I''m wondering because I have a zpool set up across a bunch of drives and I am planning to move those drives to another port on the controller potentially changing their location -- as well as the location of my "boot" zpool (two disks). Will ZFS detect this and be smart about it or do I need to do something like a zfs export ahead of time? What about for the root pool? Thanks, Ray
On Tue, Mar 23, 2010 at 2:00 PM, Ray Van Dolson <rvandolson at esri.com> wrote:> Kind of a newbie question here -- or I haven''t been able to find great > search terms for this... > > Does ZFS recognize zpool members based on drive serial number or some > other unique, drive-associated ID? Or is it based off the drive''s > location (c0t0d0, etc). >ZFS makes uses of labels and will detect your drives even if you move them around. You can check that with ''zdb -l /dev/rdsk/cXtXdXs0''> > I''m wondering because I have a zpool set up across a bunch of drives > and I am planning to move those drives to another port on the > controller potentially changing their location -- as well as the > location of my "boot" zpool (two disks). > > Will ZFS detect this and be smart about it or do I need to do something > like a zfs export ahead of time? What about for the root pool? >No need. Same goes for the rpool, you only need to make sure your system will boot from the correct disk. -- Giovanni -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100323/54ec43b4/attachment.html>
On Tue, March 23, 2010 12:00, Ray Van Dolson wrote:> Kind of a newbie question here -- or I haven''t been able to find great > search terms for this... > > Does ZFS recognize zpool members based on drive serial number or some > other unique, drive-associated ID? Or is it based off the drive''s > location (c0t0d0, etc). > > I''m wondering because I have a zpool set up across a bunch of drives > and I am planning to move those drives to another port on the > controller potentially changing their location -- as well as the > location of my "boot" zpool (two disks). > > Will ZFS detect this and be smart about it or do I need to do something > like a zfs export ahead of time? What about for the root pool?ZFS recognizes disks based on various ZFS special blocks written to them. It also keeps a cache file on where things have been lately. If you export a ZFS pool, swap the physical drives around, and import it, everything should be fine. If you don''t export first, you may have to give it a bit of help. And there are pathological cases where for example you don''t have a link in the /dev/dsk directory which can cause a default import to not find all the pieces of a pool. -- David Dyer-Bennet, dd-b at dd-b.net; http://dd-b.net/ Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/ Photos: http://dd-b.net/photography/gallery/ Dragaera: http://dragaera.info
> On Tue, March 23, 2010 12:00, Ray Van Dolson wrote: > ZFS recognizes disks based on various ZFS special > blocks written to them. > It also keeps a cache file on where things have been > lately. If you > export a ZFS pool, swap the physical drives around, > and import it, > everything should be fine. If you don''t export > first, you may have to > give it a bit of help. And there are pathological > cases where for example > you don''t have a link in the /dev/dsk directory which > can cause a default > import to not find all the pieces of a pool.Indeed. Before I wised up and bought an HBA for my RAIDZ2 array instead of using randomly-assorted SATA controllers, I tried rearranging some disks without exporting the pool first. I almost had a heart attack when the system came up reporting "corrupted data" on the drives that had been switched. As it turned out, I just needed to export and re-import the pool, and it was fine after that. Needless to say, when the HBA went in, I made sure to export the pool FIRST. -- This message posted from opensolaris.org
On Wed, Mar 24, 2010 at 10:47:27AM -0700, Russ Price wrote:> > On Tue, March 23, 2010 12:00, Ray Van Dolson wrote: > > ZFS recognizes disks based on various ZFS special > > blocks written to them. > > It also keeps a cache file on where things have been > > lately. If you > > export a ZFS pool, swap the physical drives around, > > and import it, > > everything should be fine. If you don''t export > > first, you may have to > > give it a bit of help. And there are pathological > > cases where for example > > you don''t have a link in the /dev/dsk directory which > > can cause a default > > import to not find all the pieces of a pool. > > Indeed. Before I wised up and bought an HBA for my RAIDZ2 array > instead of using randomly-assorted SATA controllers, I tried > rearranging some disks without exporting the pool first. I almost had > a heart attack when the system came up reporting "corrupted data" on > the drives that had been switched. As it turned out, I just needed to > export and re-import the pool, and it was fine after that. Needless > to say, when the HBA went in, I made sure to export the pool FIRST.In my limited testing (with an HBA based system), I''ve been able to move drives around without exporting first... but sounds like good practice just to export anyways to be on the safe side. :) Thanks, Ray