I have created some threads here about possible bugs in ZFS or bugs in ZFS beadm (the PC reboots when I try too boot - why? bug in beadm??). But now it seems that maybe there is no problems with ZFS. I will update my threads with "SOLVED" tag when/if I find the solution. Here is my problem: I have an 1.5TB disk with OpenSolaris (b134, b151a) using non AHCI. I then changed to AHCI in BIOS, which results in severe problems: I can not boot the system. I suspect the problem is because I changed to AHCI. Now I have changed back to non AHCI, but still I can not boot the PC. Solaris gives an error message. How can I solve this? So this is what I have done: 1) 1.5TB disk worked fine with non AHCI 2) Switched to AHCI 3) Computer refuses to boot. There is an error message. 4) Switched back to non AHCI, booted from LiveCD and tried to import rpool. This resulted in an immediate reboot. 5) Computer refuses now to boot when I try any OpenSolaris entry in GRUB. Shows the same error message as in 3). However, WinXP boots fine though. Now I have a new problem on the same theme. A) Bought a Vertex 3, 240GB and turned on AHCI B) Installed S11E, everything went fine. C) Later I tried to repair the problematic 1.5TB disk above, so I switched off AHCI. D) While using non AHCI, I booted off from liveCD S11E, and by mistake imported the Vertex 3 rpool. E) Now I can not boot from my Vertex 3, even if I switch on AHCI. It is the same error message as in 3) and 5) above. To summarize: So the problems boils down to this: Z) Solaris installs using AHCI X) Switch to non AHCI Y) Boot from LiveCD S11E and import the rpool W) Turn back AHCI, and now Solaris refuses to boot. Why? And vice versa: ZZ) Solaris installs non AHCI XX) Switch to AHCI YY) Boot from LiveCD S11E and import the rpool WW) Turn off AHCI, and now Solaris refuses to boot. Why? -- This message posted from opensolaris.org
Edward Ned Harvey
2011-Jul-05 13:03 UTC
[zfs-discuss] Changed to AHCI, can not access disk???
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Orvar Korvar > > Here is my problem: > I have an 1.5TB disk with OpenSolaris (b134, b151a) using non AHCI. > I then changed to AHCI in BIOS, which results in severe problems: I cannot> boot the system. > > I suspect the problem is because I changed to AHCI.This is normal, no matter what OS you have. It''s the hardware. If you start using a disk in non-AHCI mode, you must always continue to use it in non-AHCI mode. If you switch, it will make the old data inaccessible. Just change it back in BIOS and you''ll have your data back. Then backup your data, change to AHCI mode (because it''s supposed to perform better) and restore your data.
Fajar A. Nugraha
2011-Jul-05 13:11 UTC
[zfs-discuss] Changed to AHCI, can not access disk???
On Tue, Jul 5, 2011 at 8:03 PM, Edward Ned Harvey <opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote:>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >> bounces at opensolaris.org] On Behalf Of Orvar Korvar >> >> Here is my problem: >> I have an 1.5TB disk with OpenSolaris (b134, b151a) using non AHCI. >> I then changed to AHCI in BIOS, which results in severe problems: I can > not >> boot the system. >> >> I suspect the problem is because I changed to AHCI. > > This is normal, no matter what OS you have. ?It''s the hardware. > > If you start using a disk in non-AHCI mode, you must always continue to use > it in non-AHCI mode. ?If you switch, it will make the old data inaccessible.Really? old data inaccessible? These two links seem to say that the data is there, and it''s only a matter whether the correct drivers are loaded or not: http://en.wikipedia.org/wiki/Ahci http://support.microsoft.com/kb/922976 So the question is, does similar workaround exists for (open)solaris? -- Fajar
Ok, so I switch back and then I have my data back? But, it does not work. Because, meanwhile I switched, I tried to "zpool import" which messed up the drive. Then I switched back, but my data is still not accessible. Earlier, when I switched, I did not do a "zpool import" and when I switched back, I could access all my data. But now I have done a "zpool import" while I switched - which messes up things. If I have done "zpool import" while switched, can I get back my rpool, when I switch back? ----- Original Message ---- From: Edward Ned Harvey <opensolarisisdeadlongliveopensolaris at nedharvey.com> To: Orvar Korvar <knatte_fnatte_tjatte at yahoo.com>; zfs-discuss at opensolaris.org Sent: Tue, July 5, 2011 3:03:50 PM Subject: RE: [zfs-discuss] Changed to AHCI, can not access disk???> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Orvar Korvar > > Here is my problem: > I have an 1.5TB disk with OpenSolaris (b134, b151a) using non AHCI. > I then changed to AHCI in BIOS, which results in severe problems: I cannot> boot the system. > > I suspect the problem is because I changed to AHCI.This is normal, no matter what OS you have. It''s the hardware. If you start using a disk in non-AHCI mode, you must always continue to use it in non-AHCI mode. If you switch, it will make the old data inaccessible. Just change it back in BIOS and you''ll have your data back. Then backup your data, change to AHCI mode (because it''s supposed to perform better) and restore your data.
2011-07-05 17:11, Fajar A. Nugraha ?????:> On Tue, Jul 5, 2011 at 8:03 PM, Edward Ned Harvey > <opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote: >>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >>> bounces at opensolaris.org] On Behalf Of Orvar Korvar >>> >>> Here is my problem: >>> I have an 1.5TB disk with OpenSolaris (b134, b151a) using non AHCI. >>> I then changed to AHCI in BIOS, which results in severe problems: I can >> not >>> boot the system. >>> >>> I suspect the problem is because I changed to AHCI. >> This is normal, no matter what OS you have. It''s the hardware. >> >> If you start using a disk in non-AHCI mode, you must always continue to use >> it in non-AHCI mode. If you switch, it will make the old data inaccessible. > Really? old data inaccessible?Kind of. You can not access it now, right? ;)> So the question is, does similar workaround exists for (open)solaris?One of the ways is to have Solaris remap the boot devices. When you change the boot device paths, and this includes switching the access mode in BIOS (the controller number and driver would probably change), Solaris would give you a panic during boot and restart. See this list or the internet for how to boot Solaris with KDB (kernel debugger) and/or verbose mode - this should keep the computer from rebooting and allow you to read the strings on the screen, along the lines: zfs/vfs can''t mount the root, panic, tried device paths /pci/something. If that''s the case, you can return the BIOS to the mode where Solaris boots okay, and try to fix up the EEPROM - rather its x86 emulation in file /boot/solaris/bootenv.rc - which stores "hardware configuration". For an easy solution you can try to comment away the line like (if it is there in the first place): setprop bootpath /pci at 7b,0/pci1022,7458 at 11/pci1000,3060 at 2/sd at 3,0:a Otherwise you may have to discover and insert the correct line by using the livecd/installcd or the failsafe boot mode (Solaris 10/SXCE) while and running "devfsadm -Cv" in order for it to generate new disk/slice paths. Then you can use "ls -la /dev/dsk" and see what PCI paths are assigned (possibly this would lead you to /devices/ first, though). There is another possible solution: boot from livecd while in AHCI mode, and import/export the rpool. This may change the device names/links in the ZFS pool header, helping to "rename" them to the new controller numbers... Good luck! ;)
On Tue, Jul 5, 2011 at 9:11 AM, Fajar A. Nugraha <work at fajar.net> wrote:> On Tue, Jul 5, 2011 at 8:03 PM, Edward Ned Harvey > <opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote: >>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >>> bounces at opensolaris.org] On Behalf Of Orvar Korvar >>> >>> Here is my problem: >>> I have an 1.5TB disk with OpenSolaris (b134, b151a) using non AHCI. >>> I then changed to AHCI in BIOS, which results in severe problems: I can >> not >>> boot the system. >>> >>> I suspect the problem is because I changed to AHCI. >> >> This is normal, no matter what OS you have. ?It''s the hardware. >> >> If you start using a disk in non-AHCI mode, you must always continue to use >> it in non-AHCI mode. ?If you switch, it will make the old data inaccessible. > > Really? old data inaccessible?While I agree that you should not change the controller mode with data behind it, I did do that on a Supermicro system running OpenSuSE and Linux LVM mirrors with no issues. I suspect because Linux both loads the AHCI drivers in the "mini-root" (to use a Sun term :-) and that the LVM layer uses a private region on disk to identify the device (much like both SLVM and ZFS). -- {--------1---------2---------3---------4---------5---------6---------7---------} Paul Kraus -> Senior Systems Architect, Garnet River ( http://www.garnetriver.com/ ) -> Sound Coordinator, Schenectady Light Opera Company ( http://www.sloctheater.org/ ) -> Technical Advisor, RPI Players
2011-07-05 19:21, Paul Kraus wrote:> While I agree that you should not change the controller mode with data > behind it, I did do that on a Supermicro system running OpenSuSE and > Linux LVM mirrors with no issues. I suspect because Linux both loads > the AHCI drivers in the "mini-root" (to use a Sun term :-) and that > the LVM layer uses a private region on disk to identify the device > (much like both SLVM and ZFS).Good point about the miniroot. One more possible solution (component) would be this: 1) Set your root disk to AHCI or whatever you need 2) Boot from livecd 3) Import your rpool and mount the root filesystem into /a for example 4) Update device links: # devfsadm -r /a -Cv 5) Update the miniroot # bootadm update-archive -R /a 6) Export the rpool 7) Reboot and hope this helps ;) //Jim
I have already formatted one disk, so I can not try this anymore. (But, importing the zpool with the name "rpool" and exporting the rpool again, was successful. I can now use the disk as usual. But this did not work on the other disk, so I formatted it) -- This message posted from opensolaris.org
On 2011-Jul-05 21:03:50 +0800, Edward Ned Harvey <opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote:>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >> bounces at opensolaris.org] On Behalf Of Orvar Korvar...>> I suspect the problem is because I changed to AHCI. > >This is normal, no matter what OS you have. It''s the hardware.Switching to AHCI changes the device interface presented to the kernel and you need a different device driver to access the data. As long as your OS supports AHCI (and that is true of any OS that supports ZFS) then you will still be able to access the disks - though the actual path to the disk or disk device name will change.>If you start using a disk in non-AHCI mode, you must always continue to use >it in non-AHCI mode. If you switch, it will make the old data inaccessible.Only if your OS is broken. The data is equally accessible in either mode. ZFS makes it easier to switch modes because it doesn''t care about the actual device name - at worst, you will need an export and import. -- Peter Jeremy -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110706/00c4e45c/attachment.bin>
Daniel Carosone
2011-Jul-07 01:06 UTC
[zfs-discuss] Changed to AHCI, can not access disk???
On Tue, Jul 05, 2011 at 09:03:50AM -0400, Edward Ned Harvey wrote:> > I suspect the problem is because I changed to AHCI. > > This is normal, no matter what OS you have. It''s the hardware.That is simply false.> If you start using a disk in non-AHCI mode, you must always continue to use > it in non-AHCI mode. If you switch, it will make the old data inaccessible.Utterly not true. Even in this case, the problem is not access to the data. The problem is with booting from the device / mounting as root, because solaris (and windows) embed device name/path information into configuration data critical for booting. Even these OS''s will be able to access data disks via either controller mode/type if the boot time issue is removed. Other operating systems that don''t depend on embedded device path information in the boot sequence can switch easily between IDE/AHCI modes for boot disks, or indeed between other controller types (different scsi controllers, booting native vs as a VM, moving disks between boxes, etc). The fact that Solaris fails to tolerate this is a bug. In addition to other problems, this bug manifests when trying to use removable usb sticks as boot media/rpool, because usb device names are constructed based on port and topology in some cases. I have also been bitten by it in the past when rearranging controllers into different slots.> Just change it back in BIOS and you''ll have your data back. Then backup > your data, change to AHCI mode (because it''s supposed to perform better) and > restore your data.In this case, the recorded device path has probably been mangled, and will need to be repaired before the pool is bootable again. The pool should, however, be accessible as data from an independent boot. -- Dan. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 194 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110707/c84080cf/attachment.bin>