devsk
2010-Aug-21 00:53 UTC
[zfs-discuss] Root pool on boot drive lost on another machine because of devids
I have a USB flash drive which boots up my opensolaris install. What happens is that whenever I move to a different machine, the root pool is lost because the devids don''t match with what''s in /etc/zfs/zpool.cache and the system just can''t find the rpool. Now, if I boot into a livecd, import that rpool, mount the FS temporarily and remove /etc/zfs/zpool.cache, and reboot, the USB drive boots fine. Is there a kernel command line option to recreate /etc/zfs/zpool.cache on every boot? Would -s put me into single user mode although it can''t find the rpool? Appreciate your help! -- This message posted from opensolaris.org
Ian Collins
2010-Aug-21 01:38 UTC
[zfs-discuss] Root pool on boot drive lost on another machine because of devids
On 08/21/10 12:53 PM, devsk wrote:> I have a USB flash drive which boots up my opensolaris install. What happens is that whenever I move to a different machine, > the root pool is lost because the devids don''t match with what''s in /etc/zfs/zpool.cache and the system just can''t find the rpool. > > Now, if I boot into a livecd, import that rpool, mount the FS temporarily and remove /etc/zfs/zpool.cache, and reboot, > the USB drive boots fine.Exporting and re-importing the pool should have the same effect.> Is there a kernel command line option to recreate /etc/zfs/zpool.cache on every boot? > >I don''t think so.> Would -s put me into single user mode although it can''t find the rpool? > >I haven''t tried that, but I doubt it. -- Ian.
devsk
2010-Aug-21 02:22 UTC
[zfs-discuss] Root pool on boot drive lost on another machine because of devids
> > > > Now, if I boot into a livecd, import that rpool, > mount the FS temporarily and remove > /etc/zfs/zpool.cache, and reboot, > > the USB drive boots fine. > > Exporting and re-importing the pool should have the > same effect.but how do I do that on the boot pool? -- This message posted from opensolaris.org
Jürgen Keil
2010-Aug-21 19:12 UTC
[zfs-discuss] Root pool on boot drive lost on another machine because of devids
> I have a USB flash drive which boots up my > opensolaris install. What happens is that whenever I > move to a different machine, > the root pool is lost because the devids don''t match > with what''s in /etc/zfs/zpool.cache and the system > just can''t find the rpool.See defect 4755 or defect 5484 https://defect.opensolaris.org/bz/show_bug.cgi?id=4755 https://defect.opensolaris.org/bz/show_bug.cgi?id=5484 When I last experimented with booting Solaris from flash memory sticks I modified scsa2usb so that it would construct a devid for the usb flash memory stick, -- This message posted from opensolaris.org
devsk
2010-Aug-22 02:06 UTC
[zfs-discuss] Root pool on boot drive lost on another machine because of devids
> > I have a USB flash drive which boots up my > > opensolaris install. What happens is that whenever > I > > move to a different machine, > > the root pool is lost because the devids don''t > match > > with what''s in /etc/zfs/zpool.cache and the system > > just can''t find the rpool. > > See defect 4755 or defect 5484 > > https://defect.opensolaris.org/bz/show_bug.cgi?id=4755 > > https://defect.opensolaris.org/bz/show_bug.cgi?id=5484 > > > When I last experimented with booting Solaris > from flash memory sticks I modified scsa2usb > so that it would construct a devid for the usb > flash memory stick,Isn''t it as simple as ''read what pool the user specified in findroot/bootfs commands, zpool export <pool> and zpool import -f <pool>'' and move on? If it wasn''t, why would removing /etc/zfs/zpool.cache using a ISO based livecd make it work every time? I can change controller for this drive freely as long as I want as long as there is no valid /etc/zfs/zpool.cache file present. BTW: in my case, its not strictly treated as removable flash drive because I am accessing the USB flash drive as a physical drive in virtualbox. So, depending on which SCSI port I add it to, it may or may not boot. -- This message posted from opensolaris.org
devsk
2010-Aug-22 02:34 UTC
[zfs-discuss] Root pool on boot drive lost on another machine because of devids
Actually, I figured it has nothing to do with /etc/zfs/zpool.cache. As part of removing that file within a LiveCD, I was basically importing and exporting the rpool. So, the only thing required is an equivalent of ''zpool import -f rpool && zpool export rpool''. I wonder why this can''t be automated. PS: I understand why grub code may not have ''zpool'' command as such but it can definitely do the equivalent. Grub does have ZFS specific code. -- This message posted from opensolaris.org