Paul van der Zwan
2012-Oct-14 18:33 UTC
[zfs-discuss] Fixing device names after disk shuffle
I moved some disk around on my Openindiana system and now the names that are shown by zpool status no longer match the names format shows: $ zpool status pool: datapool state: ONLINE scan: scrub repaired 0 in 7h58m with 0 errors on Wed Oct 3 01:13:47 2012 config: NAME STATE READ WRITE CKSUM datapool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c4t1d0 ONLINE 0 0 0 c5t3d0 ONLINE 0 0 0 logs c5t2d0p5 ONLINE 0 0 0 errors: No known data errors pool: homepool state: ONLINE scan: scrub repaired 0 in 0h56m with 0 errors on Tue Oct 9 16:56:54 2012 config: NAME STATE READ WRITE CKSUM homepool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c5t0d0s0 ONLINE 0 0 0 c5t1d0s0 ONLINE 0 0 0 logs c5t2d0p6 ONLINE 0 0 0 errors: No known data errors pool: rpool state: ONLINE scan: scrub repaired 0 in 0h2m with 0 errors on Sun Oct 14 15:56:09 2012 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c5t2d0s0 ONLINE 0 0 0 errors: No known data errors $ sudo format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c5t0d0 <ATA-WDCWD1001FALS-0-0K05 cyl 60797 alt 2 hd 255 sec 126> /pci at 0,0/pci8086,28 at 1f,2/disk at 0,0 1. c5t1d0 <ATA-WDC WD1001FALS-0-0K05 cyl 60797 alt 2 hd 255 sec 126> /pci at 0,0/pci8086,28 at 1f,2/disk at 1,0 2. c5t2d0 <ATA-Hitachi HDS72202-A28A-1.82TB> /pci at 0,0/pci8086,28 at 1f,2/disk at 2,0 3. c5t3d0 <ATA-SAMSUNG HD204UI-0001-1.82TB> /pci at 0,0/pci8086,28 at 1f,2/disk at 3,0 4. c7t1d0 <ATA-SAMSUNGSSD830-3B1Q cyl 18621 alt 2 hd 224 sec 56> /pci at 0,0/pci8086,3a40 at 1c/pci1095,7132 at 0/disk at 1,0 5. c8t0d0 <Hitachi-HDT721010SLA360- -931.51GB> /pci at 0,0/pci8086,28 at 1d,7/storage at 2/disk at 0,0 Specify disk (enter its number): ^D What was c5t2 is now c7t1 and what was c4t1 is now c5t2. Everything seems to be working fine, it''s just a bit confusing. How can I ''fix'' this ? Delete /etc/zfs/zpool.cache and reboot ? TIA Paul
Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)
2012-Oct-14 18:56 UTC
[zfs-discuss] Fixing device names after disk shuffle
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Paul van der Zwan > > What was c5t2 is now c7t1 and what was c4t1 is now c5t2. > Everything seems to be working fine, it''s just a bit confusing.That ... Doesn''t make any sense. Did you reshuffle these while the system was powered on or something? sudo devfsadm -Cv sudo zpool export datapool sudo zpool export homepool sudo zpool import -a sudo reboot -p The normal behavior is: During the import, or during the reboot when the filesystem gets mounted, zfs searches the available devices in the system for components of a pool. I don''t see any way the devices reported by "zpool status" wouldn''t match the devices reported by "format." Unless, as you say, it''s somehow overridden by the cache file.
Paul van der Zwan
2012-Oct-14 19:00 UTC
[zfs-discuss] Fixing device names after disk shuffle
On 14 Oct 2012, at 20:56 , "Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)" <opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote:>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >> bounces at opensolaris.org] On Behalf Of Paul van der Zwan >> >> What was c5t2 is now c7t1 and what was c4t1 is now c5t2. >> Everything seems to be working fine, it''s just a bit confusing. > > That ... Doesn''t make any sense. Did you reshuffle these while the system was powered on or something? >No hot-swappable devices so it was just a SATA cable swap while the system was down.> sudo devfsadm -Cv > sudo zpool export datapool > sudo zpool export homepool > sudo zpool import -a > sudo reboot -p >Hmm would have to try that in single user mode as those pools contain my homedirs and some shared FS''s.> The normal behavior is: During the import, or during the reboot when the filesystem gets mounted, zfs searches the available devices in the system for components of a pool. I don''t see any way the devices reported by "zpool status" wouldn''t match the devices reported by "format." Unless, as you say, it''s somehow overridden by the cache file. > >It surprised me as well as it seems to be working fine. Tried a scrub of rpool and that went without a problem. Paul