On Fri, Jul 22, 2011 at 7:23 PM, Edward Ned Harvey
<opensolarisisdeadlongliveopensola...@nedharvey.com> wrote:
>> From: Peter Tribble [mailto:peter.trib...@gmail.com]
>> Sent: Friday, July 22, 2011 8:38 AM
>>
>> That often happens. It shouldn't matter. If the d0 node doesn't exist,
>> then
>> telling zfs to use it as a vdev will usually force it to be created.
>
> For the 2nd disk, that works.
>        sudo ls -l /dev/rdsk/c0t5000C5002637311Fd0
>        ls: cannot access /dev/rdsk/c0t5000C5002637311Fd0: No such file or
> directory
>
>        sudo zpool create junk c0t5000C5002637311Fd0
>        sudo ls -l /dev/rdsk/c0t5000C5002637311Fd0
>        lrwxrwxrwx 1 root root 53 2011-07-22 14:01
> /dev/rdsk/c0t5000C5002637311Fd0 ->
> ../../devices/scsi_vhci/disk@g5000c5002637311f:wd,raw
>
> However, the goal is to replicate the partition tables from the first disk
> to the second disk.  Which means (as far as I can tell) that the d0 must
> exist for the first disk too... In order to have a device to copy *from*.

The d0 device node is completely irrelevant to that.

To replicate the disk, you need to use fdisk to copy the partition
table. That uses
the ...p0 device. Assuming identical drives it should be:

fdisk -W outfile /dev/rdsk/c*disk1*p0

to save the partition table from the first disk, and

fdisk -F outfile /dev/rdsk/c*disk2*p0

to write it to the second.

Then to copy the solaris slice information use s2:

prtvtoc /dev/rdsk/c*disk1*s2 | fmthard -s - /dev/rdsk/c*disk2*s2

If the 2nd disk has an EFI label on, then you need to go into format -e
and relabel it with an SMI label.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to