Sun

Stopping a SATA drive on OpenIndiana.

I want to spin down SATA disks in one pool and in our own software switch writing to the other pool.

I have two zfs pools: data1 and data2 each with two drives in the pool.
I want to write to data1, offline it, continue writing to data2 pull both disks out of data1 replace them with two new disks.
Then I want to do the inverse for the other pool... that is write to one, offline and replace the disks out of the other, back and forth.

In IRIX I can "scsicontol -i some-parameters stop" and then walk over an pull the drive out of the JBOD.

I can in OpenIndiana:

Code: Select all

zpool offline data1 c1t2d0


But as soon as I attempt to offline the 2nd disk in the pool it says it can't because obviously there is nothing left in the mirror.
I want to pull both drives out without any pool destroy commands or the like.
I want to sneaker net the drives across the city by a non technical person.

Also I can not stop the SATA disks.
cfgadm only picks up the entire raid controller (which we are using as a JBODs).
cfgadm -c unconfigure c1t2d0 comes back with some thing to the effect of not knowing what the device is...

I hope this makes sense.

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

Twitter @PymbleSoftware
Current Apps (iOS) -> https://itunes.apple.com/au/artist/pymb ... d553990081
(Android) https://play.google.com/store/apps/deve ... +Ltd&hl=en
(Onyx2) Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
(0300s) Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
I'm not 100% clear on what you want to do, but if you want to pull a pool after it's written to,

Code: Select all

zpool export data1

which will sync everything and "offline" all devices within it.

As far as hot-unplugging disks, I do this for scsi disks with

Code: Select all

cfgadm -x remove_device c3::c1t2d0

This quiesces the scsi bus (c3) after confirmation and automatically unconfigures the disk after asking "has the operation succeeded?" I'd imagine the process is similar for SATA disks. Remember to do 'cfgadm -al' to show the disks attached to each controller and not just the controller.

After plugging in new disks, issue

Code: Select all

devfsadm

which will re-scan the buses and attach the appropriate disk driver (sd in the case of scsi disks), then

Code: Select all

zpool import

to list what zpools exist on the new disks you inserted.

I think this is what you were asking about.
:Fuel: :O2: HP C8000, IBM RS/6000 43p 150, and lots of Suns in my collection
gkl wrote: I'm not 100% clear on what you want to do, but if you want to pull a pool after it's written to,

Code: Select all

zpool export data1

which will sync everything and "offline" all devices within it.


Perfect. Thanks.

gkl wrote: As far as hot-unplugging disks, I do this for scsi disks with

Code: Select all

cfgadm -x remove_device c3::c1t2d0

This quiesces the scsi bus (c3) after confirmation and automatically unconfigures the disk after asking "has the operation succeeded?"

After plugging in new disks, issue

Code: Select all

devfsadm

which will re-scan the buses and attach the appropriate disk driver (sd in the case of scsi disks), then

Code: Select all

zpool import

to list what zpools exist on the new disks you inserted.

I think this is what you were asking about.


This shows up in prtconf as pci-ide and "Intel 82801JI", "4 + 2 port SATA" and googling around leads me to believe that it is hot plug able.

the cfgadm command above reports:

Code: Select all

cfgadm: Attachment point not found.


cfgadm command by itself gives something like:

Code: Select all

Ap_Id               Type            Receptacle       Occupant          Condition
c1                   scsi-bus        connected       configured        unknown


I'll poke around in prtconf or whatever and see if I can get more info.

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

Twitter @PymbleSoftware
Current Apps (iOS) -> https://itunes.apple.com/au/artist/pymb ... d553990081
(Android) https://play.google.com/store/apps/deve ... +Ltd&hl=en
(Onyx2) Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
(0300s) Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
PymbleSoftware wrote: the cfgadm command above reports:

Code: Select all

cfgadm: Attachment point not found.


I edited my post right after I posted it--try issuing 'cfgadm -al' to show the disks attached to each attachment point (controller). Then cfgadm -x remove_device on the full ctlr::dsk/cXtXdX *should* prove more fruitful
:Fuel: :O2: HP C8000, IBM RS/6000 43p 150, and lots of Suns in my collection
gkl wrote:
PymbleSoftware wrote: the cfgadm command above reports:

Code: Select all

cfgadm: Attachment point not found.


I edited my post right after I posted it--try issuing 'cfgadm -al' to show the disks attached to each attachment point (controller). Then cfgadm -x remove_device on the full ctlr::dsk/cXtXdX *should* prove more fruitful


Thanks. :D


Code: Select all

root@cal-prod:~# cfgadm -al
Ap_Id                          Type         Receptacle   Occupant     Condition
c1                             scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0                 disk         connected    configured   unknown
c1::dsk/c1t1d0                 disk         connected    configured   unknown
c1::dsk/c1t2d0                 disk         connected    configured   unknown
c1::dsk/c1t3d0                 disk         connected    configured   unknown
c1::dsk/c1t4d0                 disk         connected    configured   unknown
c1::dsk/c1t5d0                 disk         connected    configured   unknown


:oops:

Code: Select all

cfgadm -x remove_device c1::dsk/c1t2d0
Removing SCSI device: /devices/pci@0,0/pci8086,340e@7/pci1000,9261@0/sd@2,0
This operation will suspend activity on SCSI bus: c1
Continue (yes/no)? yes
cfgadm: Hardware specific failure: SCSI bus quiesce failed: Operation not supported


Maybe this hardware can not hot swap after all.

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

Twitter @PymbleSoftware
Current Apps (iOS) -> https://itunes.apple.com/au/artist/pymb ... d553990081
(Android) https://play.google.com/store/apps/deve ... +Ltd&hl=en
(Onyx2) Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
(0300s) Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
It's worth noting that the disk has to support hot-swapping, in addition to the controller.
Admittedly, I've never tried any of this on SATA/SAS disks/controllers, and in fact the only reason I know about the -x remove_device option is because I stumbled upon this site

http://developers.sun.com/solaris/devel ... -text.html

which lists commands not in the manual pages. If you do figure out a way to do this with SATA, please do let the rest of us know.

I guess in a pinch, exporting the zpool will automatically sync everything, and you could just hard-yank the disk out, followed by devfsadm -C to tie up the dangling /dev entries. You may even be able to cfgadm -cunconfigure c1::dsk/c1t2d0, which is what the -x remove_device option essentially does anyway.
:Fuel: :O2: HP C8000, IBM RS/6000 43p 150, and lots of Suns in my collection
Thanks all. I've been given another controller.
But I have other duties to perform.

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

Twitter @PymbleSoftware
Current Apps (iOS) -> https://itunes.apple.com/au/artist/pymb ... d553990081
(Android) https://play.google.com/store/apps/deve ... +Ltd&hl=en
(Onyx2) Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
(0300s) Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware