SATA in OpenIndiana oi_147

I’m happy. Finally, I’m running a kernel which correctly supports hot plug of AHCI SATA2 devices. See the demo below.

 # zpool import
 pool: backup
 id: 53109282349614151
 state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
 some features will not be available without an explicit 'zpool upgrade'.
config:

 backup      ONLINE
 c8t2d0s0    ONLINE

# cfgadm -a sata
Ap_Id                          Type         Receptacle   Occupant     Condition
sata4/0::dsk/c8t0d0            disk         connected    configured   ok
sata4/1::dsk/c8t1d0            disk         connected    configured   ok
sata4/2::dsk/c8t2d0            disk         connected    configured   ok
sata4/3::dsk/c8t3d0            disk         connected    configured   ok
sata4/4                        sata-port    empty        unconfigured ok
sata4/5                        sata-port    empty        unconfigured ok

# cfgadm -c unconfigure sata4/2
Unconfigure the device at: /devices/pci@0,0/pci1458,b002@11:2
This operation will suspend activity on the SATA device
Continue (yes/no)? yes

# cfgadm -c disconnect sata4/2
Disconnect the port: /devices/pci@0,0/pci1458,b002@11:2
This operation will disable activity on the SATA port
Continue (yes/no)? yes

# cfgadm -a sata
Ap_Id                          Type         Receptacle   Occupant     Condition
sata4/0::dsk/c8t0d0            disk         connected    configured   ok
sata4/1::dsk/c8t1d0            disk         connected    configured   ok
sata4/2                        sata-port    disconnected unconfigured unknown
sata4/3::dsk/c8t3d0            disk         connected    configured   ok
sata4/4                        sata-port    empty        unconfigured ok
sata4/5                        sata-port    empty        unconfigured ok

Now, hot swap the disks here, and continue:

# cfgadm -c connect sata4/2
Activate the port: /devices/pci@0,0/pci1458,b002@11:2
This operation will enable activity on the SATA port
Continue (yes/no)? yes

# cfgadm -a sata
Ap_Id                          Type         Receptacle   Occupant     Condition
sata4/0::dsk/c8t0d0            disk         connected    configured   ok
sata4/1::dsk/c8t1d0            disk         connected    configured   ok
sata4/2                        disk         connected    unconfigured unknown
sata4/3::dsk/c8t3d0            disk         connected    configured   ok
sata4/4                        sata-port    empty        unconfigured ok
sata4/5                        sata-port    empty        unconfigured ok

# cfgadm -c configure sata4/2

# cfgadm -a sata
Ap_Id                          Type         Receptacle   Occupant     Condition
sata4/0::dsk/c8t0d0            disk         connected    configured   ok
sata4/1::dsk/c8t1d0            disk         connected    configured   ok
sata4/2::dsk/c8t2d0            disk         connected    configured   ok
sata4/3::dsk/c8t3d0            disk         connected    configured   ok
sata4/4                        sata-port    empty        unconfigured ok
sata4/5                        sata-port    empty        unconfigured ok

Verify that the disk is readable:

# format -Me /dev/rdsk/c8t2d0s2
Inquiry:
00 00 03 02 1f 00 00 02 41 54 41 20 20 20 20 20     ........ATA
57 44 43 20 57 44 31 30 45 41 44 53 2d 30 30 4c     WDC WD10EADS-00L
31 41 30                                            1A0
selecting /dev/rdsk/c8t2d0s2
[disk formatted]
...
format> q

# zpool import
 pool: backup
 id: 53109282349614151
 state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
 some features will not be available without an explicit 'zpool upgrade'.
config:

 backup      ONLINE
 c8t2d0s0    ONLINE
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: