Closed bruce-arden closed 13 years ago
This doesn't sound like a bug in the Linux side to me. For the pool to operate properly and be imported under Linux we have to update the paths in the vdev to be correct for Linux. It should be Solaris's responsibility to re-update the paths to something Solaris likes, as you say this would be done as part of an export/import cycle.
If you were to create the correct path names on a Linux system via symlinks, and then export and import the pool using those names you could correct the problem. For example:
$ zpool export tank $ zpool import -d /dev/dsk/ tank
You're probably right. Seems that Solaris doesn't do a proper import of the root pool. [I also had problems with /etc/zfs/zpool.cache not being corrected when I tried changing the device names in Solaris]. I did wonder if clearing out the path when a zpool export was done would force Solaris to correct the path. But I suspect it wouldn't.
On 07/30/11 22:41, behlendorf wrote:
This doesn't sound like a bug in the Linux side to me. For the pool to operate properly and be imported under Linux we have to update the paths in the vdev to be correct for Linux. It should be Solaris's responsibility to re-update the paths to something Solaris likes, as you say this would be done as part of an export/import cycle.
If you were to create the correct path names on a Linux system via symlinks, and then export and import the pool using those names you could correct the problem. For example:
$ zfs export tank $ zfs import -d /dev/dsk/ tank
I imported the rpool pool from Solaris 11 Express in Linux and then exported it again. After rebooting solaris the device path for the pool was still /dev/sda5 when is should have been /dev/dsk/c7d0s0. Most things seemed to work ok, but zdb failed. The workarround was to create a /dev/sda5 link to /dev/dsk/c7d0s0 on Solaris:
zdb rpool
Cached configuration: version: 28 name: 'rpool' state: 0 txg: 774165 pool_guid: 16725859609585555405 hostid: 241298 hostname: '' vdev_children: 1 vdev_tree: type: 'root' id: 0 guid: 16725859609585555405 children[0]: type: 'disk' id: 0 guid: 15529492699596970864 path: '/dev/sda5' phys_path: '/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0:a' whole_disk: 0 metaslab_array: 23 metaslab_shift: 29 ashift: 9 asize: 77806174208 is_log: 0 ....
I would like to export and re-import the pool on Solaris, but can't easily as I'm booted from it.
I think this may be a bug at the Solaris end, but it may be possible to fix it at the Linux end.