Page 2 of 2

Re: How to add a new disk(SATA/SCSI Type) in solaris 10 x86 On Oracle VirtualBox?

PostPosted: 18. Dec 2018, 07:17
by sunwizard
@stes
Hello, stes.

I checked your answer and completed the test a little before.
In conclusion, thanks to you, I have solved everything.

:D :D :D :D :D :D

After I saw the command below you mentioned, I changed the test sequence a bit.:
Code: Select all   Expand viewCollapse view
prtconf -v|sed -n '/bootpath/,/value/p'
        name='bootpath' type=string items=1
            value='/pci@0,0/pci8086,2829@d/disk@1,0:b'


I rebooted the system again before forced to fail the first disk and checked bootpath.:
Code: Select all   Expand viewCollapse view
bash-3.2# prtconf -v|sed -n '/bootpath/,/value/p'
        name='bootpath' type=string items=1
            value='/pseudo/md@0:0,10,blk'


After that, I forced to fail the first disk and removed metadb/metadevices information of failed disk.:
Code: Select all   Expand viewCollapse view
bash-3.2# metadb
        flags           first blk       block count
      Wm  p  l          16              8192            /dev/dsk/c0t0d0s3
     a    p  luo        16              8192            /dev/dsk/c0t1d0s3
bash-3.2# metastat d10
d10: Mirror
    Submirror 0: d11
      State: Needs maintenance
    Submirror 1: d12
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 37592100 blocks (17 GB)

d11: Submirror of d10
    State: Needs maintenance
    Invoke: metareplace d10 c0t0d0s0 <new device>
    Size: 37592100 blocks (17 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s0          0     No     Maintenance   Yes

d12: Submirror of d10
    State: Okay
    Size: 37592100 blocks (17 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t1d0s0          0     No            Okay   Yes

Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SATA_____VBOX_HARDDISK____VB2d132386-0d678dd0
c0t1d0   Yes    id1,sd@SATA_____VBOX_HARDDISK____VBeb4e8a41-54b5747e

bash-3.2# metadb -f -d c0t0d0s3
bash-3.2# metadetach -f d10 d11
d10: submirror d11 is detached
bash-3.2# metadetach -f d20 d21
d20: submirror d21 is detached

bash-3.2# metaclear d11 d21
d11: Concat/Stripe is cleared
d21: Concat/Stripe is cleared

bash-3.2# cfgadm -al | grep 'sata0/[01]\>'
sata0/0                        sata-port    empty        unconfigured ok
sata0/1::dsk/c0t1d0            disk         connected    configured   ok


And... I added a new disk at the same port. The results were as follows.:
Code: Select all   Expand viewCollapse view
bash-3.2# cfgadm -al | grep 'sata0/[01]\>'
sata0/0                        disk         connected    unconfigured unknown
sata0/1::dsk/c0t1d0            disk         connected    configured   ok

bash-3.2# cfgadm -c configure sata0/0
bash-3.2# cfgadm -al | grep 'sata0/[01]\>'
sata0/0::dsk/c0t0d0            disk         connected    configured   ok
sata0/1::dsk/c0t1d0            disk         connected    configured   ok

bash-3.2# echo | format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <ATA    -VBOX HARDDISK  -1.0  cyl 2608 alt 2 hd 255 sec 63>
          /pci@0,0/pci8086,2829@d/disk@0,0
       1. c0t1d0 <ATA    -VBOX HARDDISK  -1.0  cyl 2607 alt 2 hd 255 sec 63>
          /pci@0,0/pci8086,2829@d/disk@1,0
Specify disk (enter its number): Specify disk (enter its number):


Great!! Your advice I have completed everything. Of course, on Solaris 11.4, too.

Thank you, guy. :D