Adding virtual (exported SCSI) disks to a disk set (metaset -a) in guest domain
fails with I/O error.
-bash-3.00# ldm list-bindings -p primary | egrep -e 'VDS|vol'
VDS|name=primary-vds0
|vol=cdrom|opts=|dev=/vol/dev/dsk/c1t0d0s2
|vol=vol1|opts=|dev=/dev/dsk/c0t1d0s2
|vol=vol_slice|opts=slice|dev=/dev/rdsk/c2t15d0s6
|client=cdrom at sdudev1|vol=cdrom
|client=vdisk1 at sdudev1|vol=vol1
VDS|name=primary-vds1
|vol=lun444_vol|opts=slice|dev=/dev/rdsk/c2t0d0s2
|vol=lunefi_vol|opts=slice|dev=/dev/rdsk/c2t4d0s6
|vol=export_lun_vol0|opts=|dev=/dev/rdsk/c3t500A09818270643Ad2s2 ====device
corresponding to lun_0
|vol=export_lun_vol1|opts=|dev=/dev/rdsk/c3t500A09818270643Ad3s2
|vol=export_lun_vol2|opts=|dev=/dev/rdsk/c3t500A09818270643Ad4s2
|client=export_lun0 at sdudev1|vol=export_lun_vol0 ========== Lun_0 exported to
guest OS "sdudev1"
|client=export_lun1 at sdudev1|vol=export_lun_vol1
|client=export_lun2 at sdudev1|vol=export_lun_vol2
-bash-3.00# ldm list-bindings -p sdudev1 | grep 'VDISK'
VDISK|name=cdrom|vol=cdrom at primary-vds0|dev=disk at 0|server=primary
VDISK|name=vdisk1|vol=vol1 at primary-vds0|dev=disk at 6|server=primary
VDISK|name=export_lun0|vol=export_lun_vol0 at primary-vds1|dev=disk at
1|server=primary ======== Note the virtual device "disk at 1"
VDISK|name=export_lun1|vol=export_lun_vol1 at primary-vds1|dev=disk at
2|server=primary
VDISK|name=export_lun2|vol=export_lun_vol2 at primary-vds1|dev=disk at
3|server=primary
-bash-3.00#
On guest domain "sdudev1"
=====================================================
bash-3.00# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d1 <NETAPP-LUN-0.2 cyl 98 alt 2 hd 16 sec 128> =========
corresponding device on the guest
/virtual-devices at 100/channel-devices at 200/disk at 1===========
virtual device
1. c0d2 <NETAPP-LUN-0.2 cyl 98 alt 2 hd 16 sec 128>
/virtual-devices at 100/channel-devices at 200/disk at 2
2. c0d3 <NETAPP-LUN-0.2 cyl 98 alt 2 hd 16 sec 128>
/virtual-devices at 100/channel-devices at 200/disk at 3
3. c0d6 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/virtual-devices at 100/channel-devices at 200/disk at 6
Specify disk (enter its number):
bash-3.00# ls -l /dev/dsk/c0d1s2
lrwxrwxrwx 1 root root 62 Dec 10 09:14 /dev/dsk/c0d1s2 ->
../../devices/virtual-devices at 100/channel-devices at 200/disk at 1:c
Note that the virtual device "disk at 1" corresponds to the control domain
device that we exported.
bash-3.00# metaset
Set name = dg1, Set number = 1
Host Owner
sun197-152 No (auto)
local state database,
bash-3.00# metadb -i
flags first blk block count
a m pc luo 16 8192 /dev/dsk/c1t0d0s6
a pc luo 8208 8192 /dev/dsk/c1t0d0s6
r - replica does not have device relocation information
o - replica active prior to last mddb configuration change
u - replica is up to date
l - locator for this replica was read successfully
c - replica's location was in /etc/lvm/mddb.cf
p - replica's location was patched in kernel
m - replica is master, this is replica selected as input
W - replica has device write errors
a - replica is active, commits are occurring to this replica
M - replica had problem with master blocks
D - replica had problem with data blocks
F - replica had format problems
S - replica is too small to hold current data base
R - replica had device read errors
bash-3.00# format -d c0d1
Searching for disks...done
c1t1d0: configured with capacity of 98.00MB
selecting c0d1
[disk formatted, no defect list found]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> partition
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 98 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 15 16.00MB (16/0/0) 32768
1 swap wu 16 - 31 16.00MB (16/0/0) 32768
2 backup wu 0 - 97 98.00MB (98/0/0) 200704
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 32 - 97 66.00MB (66/0/0) 135168
7 unassigned wm 0 0 (0/0/0) 0
partition>
bash-3.00# prtvtoc /dev/rdsk/c0d1s2
* /dev/rdsk/c0d1s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 128 sectors/track
* 16 tracks/cylinder
* 2048 sectors/cylinder
* 100 cylinders
* 98 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 32768 32767
1 3 01 32768 32768 65535
2 5 01 0 200704 200703
6 4 00 65536 135168 200703
bash-3.00#
bash-3.00# metaset -s dg1 -A enable
bash-3.00# metaset -s dg1 -a c0d1
metaset: sun197-152: /dev/rdsk/c0d1s7: I/O error
Later, I tried to relabel the exported disk in the guest, which also failed,
format> label
Ready to label disk, continue? y
DIOCTL_RWCMD: I/O error
Warning: error reading backup label.
DIOCTL_RWCMD: I/O error
Warning: error reading backup label.
DIOCTL_RWCMD: I/O error
Warning: error reading backup label.
DIOCTL_RWCMD: I/O error
Warning: error reading backup label.
DIOCTL_RWCMD: I/O error
Warning: error reading backup label.
Warning: no backup labels
Label failed.
format>
--
This message posted from opensolaris.org