Discussion:
sata hot plug problem (ahci?) + openindiana crash
(too old to reply)
Matthieu Paindavoine
2012-05-22 19:01:30 UTC
Permalink
Hello,

I've trying to insert a sata hd in an enclosure, but it doesn't seem to be recognized by the os.

Low and behold, I used '#> cfgadm -al', and only usb devices come up, nothing sata related.

I have several sata hard drive in that machine, all of them contributing to a zpool which work perfectly fine.

So I don't know why they are not showing up with cfgadm?

I read a bit about the topic, and it seems to depend on ahci being available.

I ran '#> dmesg | grep -i ahci' and nothing showed up


The motherboard is msi 890FXA-GD70, and I went in the bios:
integrated peripherals -> on-chip ATA devices -> RAID Mode : {IDE, RAID, AHCI} and switched from IDE to AHCI

I then restarted the machine. I got the booting screen for about 5 sec, and then the machine reboots.
I switched back from AHCI to IDE, and this time the machine booted fine.

So.... I'd like to know what needs to be done to be able to swap sata drive in that machine...

Thanks,

Matthieu
Pablo Oddera
2012-05-22 19:23:09 UTC
Permalink
Hi there,

I have been on the same spot. Some Motherboards that have more than 4 SATA
ports, with less than 5 disks there is no problem but if you want to use
the fifth port you need to choose AHCI or RAID in order to make it
work.Also, check for errors on the dmesg. I had tons of problems with IDE
mode and Openindiana as i installed the OS on AHCI mode. I have to change
the config every time that my BIOS gets cleared.

Best regards


On Tue, May 22, 2012 at 4:01 PM, Matthieu Paindavoine <***@yahoo.fr>wrote:

> Hello,
>
> I've trying to insert a sata hd in an enclosure, but it doesn't seem to be
> recognized by the os.
>
> Low and behold, I used '#> cfgadm -al', and only usb devices come up,
> nothing sata related.
>
> I have several sata hard drive in that machine, all of them contributing
> to a zpool which work perfectly fine.
>
> So I don't know why they are not showing up with cfgadm?
>
> I read a bit about the topic, and it seems to depend on ahci being
> available.
>
> I ran '#> dmesg | grep -i ahci' and nothing showed up
>
>
> The motherboard is msi 890FXA-GD70, and I went in the bios:
> integrated peripherals -> on-chip ATA devices -> RAID Mode : {IDE, RAID,
> AHCI} and switched from IDE to AHCI
>
> I then restarted the machine. I got the booting screen for about 5 sec,
> and then the machine reboots.
> I switched back from AHCI to IDE, and this time the machine booted fine.
>
> So.... I'd like to know what needs to be done to be able to swap sata
> drive in that machine...
>
> Thanks,
>
> Matthieu
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-***@openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
>
Jim Klimov
2012-05-22 19:29:21 UTC
Permalink
2012-05-22 23:01, Matthieu Paindavoine wrote:
> Hello,
>
> I've trying to insert a sata hd in an enclosure, but it doesn't seem to be recognized by the os.
>
> Low and behold, I used '#> cfgadm -al', and only usb devices come up, nothing sata related.
>
> I have several sata hard drive in that machine, all of them contributing to a zpool which work perfectly fine.

Well, if your disks were indeed used by the BIOS in IDE mode,
the SATA driver is not used, and you'd likely see the pci-ide
driver names like "cmdk" in your other disk names.

AFAIK the disks should be recognized automagically upon boot,
and if not - try running "devfsadm -Cv" to detect devices
and add/remove the links in /dev dir.


>... and switched from IDE to AHCI
> I then restarted the machine. I got the booting screen for about 5 sec, and then the machine reboots.
> I switched back from AHCI to IDE, and this time the machine booted fine.
>
> So.... I'd like to know what needs to be done to be able to swap sata drive in that machine...

This usually means that your root/boot disk was also changed
from IDE to AHCI, and this does interrupt the boot procedure.
The lowlevel issue is that the driver and device names for
disks change, rendering invalid those names used in the rpool
config carried over to the miniroot image (boot_archive).

There are workarounds, likely posted in archives of zfs-discuss
list and many other sources. If I google anything good up, I'll
post a link here :)

HTH,
//Jim Klimov
Jim Klimov
2012-05-22 19:36:44 UTC
Permalink
2012-05-22 23:29, Jim Klimov wrote:
> There are workarounds, likely posted in archives of zfs-discuss
> list and many other sources. If I google anything good up, I'll
> post a link here :)

What do you know? I posted some myself, and found those first ;)

* 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

* Alternately, see a different procedure here:
http://permalink.gmane.org/gmane.os.solaris.opensolaris.zfs/46864
Matthieu Paindavoine
2012-05-22 20:12:47 UTC
Permalink
Hello,

Thanks Jim for your answer. It certainly answered the question about the crash.

I did not follow your solution though, as I just choose to simply reinstall OpenIndiana, it's so fast, and I didn't have anything on the machine yet.
I can see my drives with cfgadm -a sata.
I can not yet see a newly inserted plugged HD, but this might be a hardware issue, I'll have to run some test with other drives, other bays...

Thanks again,

Matthieu



________________________________
De : Jim Klimov <***@cos.ru>
À : Discussion list for OpenIndiana <openindiana-***@openindiana.org>
Envoyé le : Mardi 22 mai 2012 21h36
Objet : Re: [OpenIndiana-discuss] sata hot plug problem (ahci?) + openindiana crash

2012-05-22 23:29, Jim Klimov wrote:
> There are workarounds, likely posted in archives of zfs-discuss
> list and many other sources. If I google anything good up, I'll
> post a link here :)

What do you know? I posted some myself, and found those first ;)

* 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

* Alternately, see a different procedure here:
  http://permalink.gmane.org/gmane.os.solaris.opensolaris.zfs/46864
Alex Lam S.L.
2012-05-22 20:36:37 UTC
Permalink
Hi there,

I have a server with a 3-way mirror pool which I can hot-swap the 3rd
HDD as an off-site backup.

I have to issue additional commands before and after physically
swapping the HDDs, which I can't recall exactly right now but Google
points to the following:

http://www.xenorg.com/?p=3
http://docs.oracle.com/cd/E23824_01/html/821-1459/devconfig2-25.html#gentextid-4085


HTH,
Alex.



On Tue, May 22, 2012 at 9:12 PM, Matthieu Paindavoine <***@yahoo.fr> wrote:
> Hello,
>
> Thanks Jim for your answer. It certainly answered the question about the crash.
>
> I did not follow your solution though, as I just choose to simply reinstall OpenIndiana, it's so fast, and I didn't have anything on the machine yet.
> I can see my drives with cfgadm -a sata.
> I can not yet see a newly inserted plugged HD, but this might be a hardware issue, I'll have to run some test with other drives, other bays...
>
> Thanks again,
>
> Matthieu
>
>
>
> ________________________________
>  De : Jim Klimov <***@cos.ru>
> À : Discussion list for OpenIndiana <openindiana-***@openindiana.org>
> Envoyé le : Mardi 22 mai 2012 21h36
> Objet : Re: [OpenIndiana-discuss] sata hot plug problem (ahci?) + openindiana crash
>
> 2012-05-22 23:29, Jim Klimov wrote:
>> There are workarounds, likely posted in archives of zfs-discuss
>> list and many other sources. If I google anything good up, I'll
>> post a link here :)
>
> What do you know? I posted some myself, and found those first ;)
>
> * 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
>
> * Alternately, see a different procedure here:
>   http://permalink.gmane.org/gmane.os.solaris.opensolaris.zfs/46864
>
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-***@openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-***@openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
Bill Sommerfeld
2012-05-22 20:38:37 UTC
Permalink
On 05/22/12 13:12, Matthieu Paindavoine wrote:
> I did not follow your solution though, as I just choose to simply reinstall OpenIndiana, it's so fast, and I didn't have anything on the machine yet.
> I can see my drives with cfgadm -a sata.
> I can not yet see a newly inserted plugged HD, but this might be a hardware issue, I'll have to run some test with other drives, other bays...

I've seen irregular behavior with sata hot plug recently on oi_151a3

what I've observed so far is that a hot plug and configure into a port that's
initially empty at boot seems to work ok, as does a unconfigure and unplug.

Once you've unplugged once, a second hot plug operation into the same port
appears to succeed, but I/O to that disk hangs; the disk is stable after a reboot.

I haven't had a chance to dig into this further. My experience was with a
SuperMicro X8SAX motherboard.

- Bill
Russell Hansen
2012-05-22 23:40:18 UTC
Permalink
When attaching a new SATA disk to AHCI you need to run devfsadm -Cv. Followed by cfgadm -al to verify your disks attached.

Optionally, you could add the following to /etc/system

set sata:sata_auto_online=1

You will need to reboot after making the change to /etc/system

-Russ

________________________________________
From: Matthieu Paindavoine [***@yahoo.fr]
Sent: Tuesday, May 22, 2012 1:12 PM
To: Discussion list for OpenIndiana
Subject: [OpenIndiana-discuss] Re : sata hot plug problem (ahci?) + openindiana crash

Hello,

Thanks Jim for your answer. It certainly answered the question about the crash.

I did not follow your solution though, as I just choose to simply reinstall OpenIndiana, it's so fast, and I didn't have anything on the machine yet.
I can see my drives with cfgadm -a sata.
I can not yet see a newly inserted plugged HD, but this might be a hardware issue, I'll have to run some test with other drives, other bays...

Thanks again,

Matthieu



________________________________
De : Jim Klimov <***@cos.ru>
À : Discussion list for OpenIndiana <openindiana-***@openindiana.org>
Envoyé le : Mardi 22 mai 2012 21h36
Objet : Re: [OpenIndiana-discuss] sata hot plug problem (ahci?) + openindiana crash

2012-05-22 23:29, Jim Klimov wrote:
> There are workarounds, likely posted in archives of zfs-discuss
> list and many other sources. If I google anything good up, I'll
> post a link here :)

What do you know? I posted some myself, and found those first ;)

* 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

* Alternately, see a different procedure here:
http://permalink.gmane.org/gmane.os.solaris.opensolaris.zfs/46864
Richard Elling
2012-05-23 04:00:22 UTC
Permalink
On May 22, 2012, at 12:36 PM, Jim Klimov wrote:
> 2012-05-22 23:29, Jim Klimov wrote:
>> There are workarounds, likely posted in archives of zfs-discuss
>> list and many other sources. If I google anything good up, I'll
>> post a link here :)
>
> What do you know? I posted some myself, and found those first ;)
>
> * One more possible solution (component) would be this:

This procedure is far too complex. Let's edit it...

>
> 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

zpool import -R /mnt rpool

> 4) Update device links:
> # devfsadm -r /a -Cv

#4 is not required

> 5) Update the miniroot
> # bootadm update-archive -R /a

#5 is not required

> 6) Export the rpool

#6 is not required

> 7) Reboot and hope this helps ;)

4) Reboot and be happy, there is no doubt this will help.
-- richard

--
ZFS Performance and Training
***@RichardElling.com
+1-760-896-4422
Jim Klimov
2012-05-23 09:37:14 UTC
Permalink
2012-05-23 8:00, Richard Elling wrote:
> This procedure is far too complex. Let's edit it...

Thanks... that seemed far too easy ;)

As a side note, it is then possible to augment GRUB to be
able to import and export an rpool and thus help IDE-SATA
migrations?

//Jim
Richard Elling
2012-05-23 23:50:20 UTC
Permalink
On May 23, 2012, at 2:37 AM, Jim Klimov wrote:

> 2012-05-23 8:00, Richard Elling wrote:
>> This procedure is far too complex. Let's edit it...
>
> Thanks... that seemed far too easy ;)
>
> As a side note, it is then possible to augment GRUB to be
> able to import and export an rpool and thus help IDE-SATA
> migrations?

Go for it.

This is not a common operation and is expected to only be done once per system,
sorta like changing BIOS settings.
-- richard

--
ZFS Performance and Training
***@RichardElling.com
+1-760-896-4422
Jim Klimov
2012-05-24 03:31:41 UTC
Permalink
2012-05-24 3:50, Richard Elling wrote:
>> As a side note, it is then possible to augment GRUB to be
>> able to import and export an rpool and thus help IDE-SATA
>> migrations?
>
> Go for it.

Huh... wait a couple of years, please. I'm better with
generating ideas, than with long-term commitments for
polished code, you do know :(

> This is not a common operation and is expected to only be done once per
> system,
> sorta like changing BIOS settings.

One would guess so. But do you notice how often this comes
up and people mostly opt to reinstall OpenIndiana instead
of applying a trivial fix (which requires a bootable media
like LiveCD - which could be replaced by GRUB or theoretical
revival of failsafe-boot)...

//Jim
Richard Elling
2012-05-29 05:40:43 UTC
Permalink
On May 23, 2012, at 8:31 PM, Jim Klimov wrote:

> 2012-05-24 3:50, Richard Elling wrote:
>>> As a side note, it is then possible to augment GRUB to be
>>> able to import and export an rpool and thus help IDE-SATA
>>> migrations?
>>
>> Go for it.
>
> Huh... wait a couple of years, please. I'm better with
> generating ideas, than with long-term commitments for
> polished code, you do know :(
>
>> This is not a common operation and is expected to only be done once per
>> system,
>> sorta like changing BIOS settings.
>
> One would guess so. But do you notice how often this comes
> up and people mostly opt to reinstall OpenIndiana instead
> of applying a trivial fix (which requires a bootable media
> like LiveCD - which could be replaced by GRUB or theoretical
> revival of failsafe-boot)...

Not very often. If you read Oracle's docs, they only recommend a reinstall.
-- richard

--
ZFS Performance and Training
***@RichardElling.com
+1-760-896-4422
Jason Matthews
2012-05-22 21:40:28 UTC
Permalink
Let me get this straight...

You installed the OS on the disk with the BIOS set to IDE. Later, you
changed the BIOS to AHCI and the system crashes when booting. Is that about
right?



j.
Richard Elling
2012-05-23 03:57:28 UTC
Permalink
On May 22, 2012, at 2:40 PM, Jason Matthews wrote:

> Let me get this straight...
>
> You installed the OS on the disk with the BIOS set to IDE. Later, you
> changed the BIOS to AHCI and the system crashes when booting. Is that about
> right?


Since the OS is not yet running, I don't consider it to be an OS crash.
-- richard

--
ZFS Performance and Training
***@RichardElling.com
+1-760-896-4422
Matthieu Paindavoine
2012-05-23 07:54:44 UTC
Permalink
Yes, that's correct, little did i know.

Later I switched the BIOS to AHCI, and reinstalled, and it works fine (as in I can see the disks listed with 'cfgadm -a sata'. I cannot yet hot plug a disk (it's not visible with that command), but it may be a hardware issue.

Matthieu



________________________________
De : Jason Matthews <***@broken.net>
À : 'Discussion list for OpenIndiana' <openindiana-***@openindiana.org>
Envoyé le : Mardi 22 mai 2012 23h40
Objet : Re: [OpenIndiana-discuss] sata hot plug problem (ahci?) + openindianacrash




Let me get this straight...

You installed the OS on the disk with the BIOS set to IDE. Later, you
changed the BIOS to AHCI and the system crashes when booting. Is that about
right?



j.
Continue reading on narkive:
Loading...