Hi Greg,

I afraid it is not possible to export individual slices. Don't know on
account of metadevices, should work, zvols work and these should be
rather similar IMHO.

Regards,
Petr

On 12 April 2011 12:52, Greg Earle <[email protected]> wrote:
> "Long-time listener, first time caller ... "
>
> [Forgive me for the long post, it's mostly illustrative command outputs.]
>
> On a T-5120 with 4 disks, I'm trying to use the 2nd set of disks (2x300 GB)
> in one of my client LDoms:
>
> ----------------------------------------------------------------------
> miplt5120:1:623 [/root] # format
> Searching for disks...done
>
>
> AVAILABLE DISK SELECTIONS:
>       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
>          /pci@0/pci@0/pci@2/scsi@0/sd@0,0
>       1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
>          /pci@0/pci@0/pci@2/scsi@0/sd@1,0
>       2. c1t2d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
>          /pci@0/pci@0/pci@2/scsi@0/sd@2,0
>       3. c1t3d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
>          /pci@0/pci@0/pci@2/scsi@0/sd@3,0
> ----------------------------------------------------------------------
>
> Disks 2 and 3 are partitioned identically:
>
> ----------------------------------------------------------------------
> Part      Tag    Flag     Cylinders         Size            Blocks
>  0 unassigned    wm       1 - 16777      100.00GB    (16777/0/0) 209712500
>  1 unassigned    wm   16778 - 33555      100.00GB    (16778/0/0) 209725000
>  2     backup    wu       0 - 46872      279.38GB    (46873/0/0) 585912500
>  3 unassigned    wm   33556 - 41944       50.00GB    (8389/0/0)  104862500
>  4 unassigned    wm   41945 - 46810       29.00GB    (4866/0/0)   60825000
>  5 unassigned    wm       0                0         (0/0/0)             0
>  6 unassigned    wm       0                0         (0/0/0)             0
>  7 unassigned    wm   46811 - 46872      378.42MB    (62/0/0)       775000
> ----------------------------------------------------------------------
>
> Here's how I'm exporting into the client LDom:
>
>  - c1t2d0s0 + c1t3d0s0 (d1); c1t2d0s3 + c1t3d0s3 (d1); and c1t2d0s4 +
> c1t3d0s4 (d3) are all configured as 3 mirrored metadevices in Solaris Volume
> Manager and then exported
>
>  - c1t2d0s1 and c1t3d0s1 are exported as 2 separate "raw" slices
>
>  - c1t2d0s7 and c1t3d0s7 are used for the SVM metadb databases
>
> ----------------------------------------------------------------------
> devsuncontrol1:1:637 [/root] # ldm list-bindings primary
>
> [...]
>
> VDS
>    NAME             VOLUME         OPTIONS          MPGROUP        DEVICE
>    primary-vds0     dvd_vol
> /dev/rdsk/c0t0d0s2
>
> [...]
>
>                     c1t2d0s1       slice
> /dev/dsk/c1t2d0s1
>                     c1t3d0s1       slice
> /dev/dsk/c1t3d0s1
>                     db-dev-metadevice-d2
> /dev/md/dsk/d2
>                     db-dev-metadevice-d3
> /dev/md/dsk/d3
>                     db-dev-metadevice-d1
> /dev/md/dsk/d1
>
>        CLIENT                      VOLUME
> [...]
>        vdisk0@db-dev           db-dev-vol0
>        vdisk1@db-dev           c1t2d0s1
>        vdisk2@db-dev           c1t3d0s1
>        vdisk4@db-dev           db-dev-metadevice-d2
>        vdisk5@db-dev           db-dev-metadevice-d3
>        vdisk3@db-dev           db-dev-metadevice-d1
>
> ----------------------------------------------------------------------
>
> This is for a database LDom; the idea is to create a mirrored ZFS zpool from
> the 2 slices (for use by the database backups) and to create 3 UFS
> filesystems on top of the 3 exported SVM metadevices for the actual
> database.
>
> The exported vdisks/slices are all seen just fine in the client LDom:
>
> ----------------------------------------------------------------------
> db-dev:1:82 [/] # format
> Searching for disks...done
>
>
> AVAILABLE DISK SELECTIONS:
>       0. c0d0 <SUN-DiskImage-20GB cyl 566 alt 2 hd 96 sec 768>
>          /virtual-devices@100/channel-devices@200/disk@0       <=== system
> (v)disk
>
>       1. c0d2 <SUN-DiskSlice-100GB cyl 16780 alt 2 hd 20 sec 625>
>          /virtual-devices@100/channel-devices@200/disk@2
>       2. c0d3 <SUN-DiskSlice-100GB cyl 16780 alt 2 hd 20 sec 625>
>          /virtual-devices@100/channel-devices@200/disk@3
>
>       3. c0d4 <SUN-DiskImage-99GB cyl 2842 alt 2 hd 96 sec 768>
>          /virtual-devices@100/channel-devices@200/disk@4
>       4. c0d5 <SUN-DiskImage-50GB cyl 1420 alt 2 hd 96 sec 768>
>          /virtual-devices@100/channel-devices@200/disk@5
>       5. c0d6 <SUN-DiskImage-29GB cyl 822 alt 2 hd 96 sec 768>
>          /virtual-devices@100/channel-devices@200/disk@6
> ----------------------------------------------------------------------
>
> But if I try to access either the exported slices or the 3 vdisks, I get
> "I/O error":
>
> ----------------------------------------------------------------------
> db-dev:1:83 [/] # newfs -m 3 -i 2048 /dev/dsk/c0d4s0
> /dev/rdsk/c0d4s0: I/O error
> db-dev:1:84 [/] # newfs -m 3 -i 2048 /dev/dsk/c0d5s0
> /dev/rdsk/c0d5s0: I/O error
> db-dev:1:85 [/] # newfs -m 3 -i 2048 /dev/dsk/c0d6s0
> /dev/rdsk/c0d6s0: I/O error
>
> db-dev:1:86 [/] # dd if=/dev/rdsk/c0d4s0 ibs=512 count=1
> dd: /dev/rdsk/c0d4s0: open: I/O error
> db-dev:1:87 [/] # dd if=/dev/rdsk/c0d5s0 ibs=512 count=1
> dd: /dev/rdsk/c0d5s0: open: I/O error
> db-dev:1:88 [/] # dd if=/dev/rdsk/c0d6s0 ibs=512 count=1
> dd: /dev/rdsk/c0d6s0: open: I/O error
>
> db-dev:1:89 [/] # zpool create -m /export/db_backups dbdump mirror c0d2s0
> c0d3s0
> cannot create 'dbdump': one or more devices is currently unavailable
> db-dev:1:90 [/] # zpool create -m /export/db_backups dbdump c0d2s0
> cannot create 'dbdump': one or more devices is currently unavailable
> db-dev:1:91 [/] # zpool create -m /export/db_backups dbdump c0d3s0
> cannot create 'dbdump': I/O error
>
> db-dev:1:92 [/] # dd if=/dev/rdsk/c0d3s0 ibs=8k count=3 | strings -
> K+*4
> version
> name
> dbdump
> state
> pool_guid
> hostid
> hostname
> db-dev
> top_guid
> guid
> vdev_tree
> type
> disk
> guid
> path
> 3+0 records in
> 48+0 records out
> /dev/dsk/c0d3s0
> phys_path
> 1/virtual-devices@100/channel-devices@200/disk@3:a
> whole_disk
> metaslab_array
> metaslab_shift
> ashift
> asize
> is_log
> create_txg
>
> ----------------------------------------------------------------------
>
> I don't get it.  I'm using slice 0 (starting at cylinder 1) in both the
> control LDom as well as when I try to reference the vdisks in the client
> LDom, but I still get "I/O error".  I can't even access the exported SVM
> mirrored metadevices at the raw disk level.
>
> 1 of the 3 metadevices in the control LDom is still doing a resync, but the
> other 2 aren't and of course the slices have nothing to do with that.
>
> Am I overlooking something obvious?
>
> Thanks in advance,
>
>        - Greg
>
> _______________________________________________
> ldoms-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/ldoms-discuss
>
_______________________________________________
ldoms-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/ldoms-discuss

Reply via email to