How to clean up orphaned SATA disk on omniosce?

danswartz

2[H]4U
Joined
Feb 25, 2011
Messages
3,715
So I just finished migrating from Linux ZFS back to omniosce. Everything is working fine, except I had a brain cramp and forgot to pull the sata ssd that had centos8 installed. Solarish OS don't by default hot-plug sata disks, so now the format command shows:

AVAILABLE DISK SELECTIONS:
0. c0t5000C5002E3AA680d0 <ATA-ST32000644NS-GG15-1.82TB>
/scsi_vhci/disk@g5000c5002e3aa680
1. c0t5000C5002E38E0EBd0 <ATA-ST32000644NS-GG15-1.82TB>
/scsi_vhci/disk@g5000c5002e38e0eb
2. c0t5000C50041BD3E87d0 <SEAGATE-ST1000NM0001-0002-931.51GB>
/scsi_vhci/disk@g5000c50041bd3e87
3. c0t5000C50055E9A7A3d0 <SEAGATE-ST1000NM0001-A003-931.51GB>
/scsi_vhci/disk@g5000c50055e9a7a3
4. c0t5000C50055E99CDFd0 <SEAGATE-ST1000NM0001-A003-931.51GB>
/scsi_vhci/disk@g5000c50055e99cdf
5. c0t5000C50056ED546Fd0 <SEAGATE-ST1000NM0001-0002-931.51GB>
/scsi_vhci/disk@g5000c50056ed546f
6. c0t5000C500302A54CFd0 <SEAGATE-ST960FM0003-0007-894.25GB>
/scsi_vhci/disk@g5000c500302a54cf
7. c0t5000C500302A5213d0 <SEAGATE-ST960FM0003-0007-894.25GB>
/scsi_vhci/disk@g5000c500302a5213
8. c0t5000C500412EE41Fd0 <SEAGATE-ST1000NM0001-PN04-931.51GB>
/scsi_vhci/disk@g5000c500412ee41f
9. c0t5000C500426C6F73d0 <SEAGATE-ST1000NM0001-0002-931.51GB>
/scsi_vhci/disk@g5000c500426c6f73
10. c0t5000C50057575FE3d0 <SEAGATE-ST1000NM0001-0002-931.51GB>
/scsi_vhci/disk@g5000c50057575fe3
11. c0t5000C5005621857Bd0 <SEAGATE-ST1000NM0001-0002-931.51GB>
/scsi_vhci/disk@g5000c5005621857b
12. c0t50025385500E3F63d0 <drive type unknown> <==== WHOOPS!!!
/scsi_vhci/disk@g50025385500e3f63
13. c2t4d0 <ATA-SuperMicro SSD-SOB20R-29.50GB>
/pci@0,0/pci15d9,834@1f,2/disk@4,0
14. c2t5d0 <ATA-SuperMicro SSD-SOB20R-29.50GB>
/pci@0,0/pci15d9,834@1f,2/disk@5,0
15. c5t5000CCA04DB0D739d0 <LENOVO-X-HUSMM1620ASS20-K4C7-186.31GB>
/pci@0,0/pci8086,6f08@3/pci1000,30a0@0/iport@f0/disk@w5000cca04db0d739

devfsadm -Cv doesn't help here. My 12 vsphere guests are now on a datastore on this server, so a reboot is not convenient. Nothing bad happening that I can see, but my OCD doesn't like this. Any hints/tips welcome :)
 
Last edited:
Format lists all connected disks (unlike iostat that is an inventory since reboot).
Hotplug means that you can hot remove/add a disk. If you call then format after a few seconds it shows only connected disks-

see also the comment from OmniOS in /etc/system.d/_omnios:system:defaults

* The traditional (and essentially entirely brain dead) cfgadm(1M)-centric
* model of hotpluggin' appears to be basically unnecessary. This tunable
* enables the system to create device nodes for newly inserted devices
* automatically. See: usr/src/uts/common/io/sata/impl/sata.c:97
*
set sata:sata_auto_online=1

If hotplug is not enabled, a reboot is usally required to enable.

not sure if a hot setting works similar to (hot change resilver setting)
'echo zfs_resilver_min_time_ms/W0t5000|mdb -kw'

display changed setting
'echo zfs_resilver_min_time_ms/D|mdb -k'
 
Last edited:
that's what I was afraid of, thanks :) I do have also 2 2TB sata drives in a mirror for backups, so it would be nice to have hotplug work. I'll schedule downtime to fix this.

EDIT: very weird. Looking at the config file now:

set sata:sata_auto_online=1 <=== already enabled? Maybe I have the sata ports misconfigured in the bios. Gonna have to check that when I reboot.
 
Last edited:
This is puzzling. Looking at the appliance tuning screen, it says:

*set sata:sata_auto_online=1 (do not set in OmniOS 151030+)

omnios-r151038v

is this wrong?
 
Very mysterious. Sata hotplus was enabled in the bios. Rebooted omnios, and the orphaned drive is gone. Still concerned about that hotplug setting that napp-it says should NOT be set.
 
Earlier versions of napp-it default tuning enabled sata hotplug in /etc/system. As OmniOS added this as a default in 151030, this tuning (and a lower timeout for disk reads) is no longer needed in napp-it. If you additionally add this as a napp-it tuning option you get a message during boot that this setting was done twice without any other side effect.
 
Last edited:
Sata AHCI hotplug is not as troublefree as LSI/ BroadCom HBA hotplug.
I also have seen situations where it does not work as expected.
 
yea. if I had extra ports on my SAS controller, i'd move them there. i think i have a fan-out cable - need to check.
 
Back
Top