zfsonlinux / pkg-zfs

Native ZFS packaging for Debian and Ubuntu
https://launchpad.net/~zfs-native/+archive/daily
308 stars 55 forks source link

Pool is imported with diskdevice instead of by-id on reboot #148

Closed geirra closed 8 years ago

geirra commented 9 years ago

Have tried the following. Remove zpool.cache Deleted pool and reimported (pool was created by using by-id)

This is the pool at creation or reimport zpool status pool: storage state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM storage ONLINE 0 0 0 raidz2-0 ONLINE 0 0 0 ata-HGST_HDS724040ALE640_PK1331XXXXXXXX ONLINE 0 0 0 ata-HGST_HDS724040ALE640_PK1331XXXXXXXY ONLINE 0 0 0 ata-HGST_HDS724040ALE640_PK1331XXXXXXYY ONLINE 0 0 0 ata-Hitachi_HDS724040ALE640_PK1331XXXXXXXX ONLINE 0 0 0 ata-Hitachi_HDS724040ALE640_PK1331XXXXXXXY ONLINE 0 0 0 ata-Hitachi_HDS724040ALE640_PK1331XXXXXXYY ONLINE 0 0 0 ata-Hitachi_HDS724040ALE640_PK1331XXXXXYYY ONLINE 0 0 0 ata-Hitachi_HDS724040ALE640_PK1331XXXXYYYY ONLINE 0 0 0

After reboot its gets imported as

pool: storage state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM storage ONLINE 0 0 0 raidz2-0 ONLINE 0 0 0 sdg ONLINE 0 0 0 sde ONLINE 0 0 0 sdf ONLINE 0 0 0 sdd ONLINE 0 0 0 sdc ONLINE 0 0 0 sdb ONLINE 0 0 0 sdi ONLINE 0 0 0 sdh ONLINE 0 0 0

From what i gather importing the disks using disk name is considered bad practice vs using by-id name.

-Updated info

CPUs: 1 Memory: 16GB VM/Hypervisor: yes (but running on iron) ECC mem: no Distribution: Ubuntu 14.04 Kernel version: Linux fil 3.16.0-34-generic #45~14.04.1-Ubuntu SMP Tue Mar 24 11:14:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux SPL/ZFS source: Packages from PPA (https://launchpad.net/~zfs-native) SPL/ZFS version: dmesg | grep -E 'SPL:|ZFS:' [ 2.338833] SPL: Loaded module v0.6.4-2~trusty [ 2.358843] ZFS: Loaded module v0.6.4-3~trusty, ZFS pool version 5000, ZFS filesystem version 5 [ 64.084818] SPL: using hostid 0x007f0101 Short description: Disks imported by diskdevice instad of disk-id

zdb: storage: version: 5000 name: 'storage' state: 0 txg: 4 pool_guid: 10651928931896616 errata: 0 hostid: 8323329 hostname: 'masked' vdev_children: 1 vdev_tree: type: 'root' id: 0 guid: 10651928931896616 create_txg: 4 children[0]: type: 'raidz' id: 0 guid: 6206784922298847442 nparity: 2 metaslab_array: 33 metaslab_shift: 38 ashift: 12 asize: 32006175981568 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 5350350561745241272 path: '/dev/disk/by-id/ata-HGST_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 13819188082991599353 path: '/dev/disk/by-id/ata-HGST_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 children[2]: type: 'disk' id: 2 guid: 13435672553750544163 path: '/dev/disk/by-id/ata-HGST_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 children[3]: type: 'disk' id: 3 guid: 5327327719127122639 path: '/dev/disk/by-id/ata-Hitachi_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 children[4]: type: 'disk' id: 4 guid: 11921870858093540916 path: '/dev/disk/by-id/ata-Hitachi_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 children[5]: type: 'disk' id: 5 guid: 445657529086902751 path: '/dev/disk/by-id/ata-Hitachi_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 children[6]: type: 'disk' id: 6 guid: 552681828934652674 path: '/dev/disk/by-id/ata-Hitachi_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 children[7]: type: 'disk' id: 7 guid: 14902838656318218952 path: '/dev/disk/by-id/ata-Hitachi_HDS724040ALE640_PK1331xxxxxxx-part1' whole_disk: 1 create_txg: 4 features_for_read:

FransUrbo commented 9 years ago

What distribution (and the version) is this?

FransUrbo commented 9 years ago

Please read http://zfsonlinux.org/faq.html#HowDoIReportProblems

geirra commented 9 years ago

Updated first post with the usefull info from the faq, hopefully its there now ?

dajhorn commented 9 years ago

@jeey2k, reimport using zpool import -d /dev/disk/by-id storage to resolve this cosmetic glitch. The zdb shows a good pool configuration with proper path names.

If the storage pool was ever recreated on this computer without clearing the media, then this might not work.

geirra commented 9 years ago

@dajhorn I have actually done this several times, but the cosmetic glitch reappears at reboot.

thehomerepot commented 8 years ago

FYI, I'm seeing this same issue. ZDB shows that my pool was imported with the correct paths (in my case vdev) but zpool status shows the sd(x) path.

Exporting and importing corrects the cosmetic issue.

Any current plans to fix this?

dajhorn commented 8 years ago

@rflagler, bugs that are specific to Ubuntu should go here now:

The PPA will not be getting any new fixes outside of the ZoL mainline. As such, I will close this ticket.