Edward Ned Harvey
2011-Jul-22 20:50 UTC
[zfs-discuss] add device to mirror rpool in sol11exp
In my new oracle server, sol11exp, it''s using multipath device names... Presently I have two disks attached: (I removed the other 10 disks for now, because these device names are so confusing. This way I can focus on *just* the OS disks.) 0. c0t5000C5003424396Bd0 <SEAGATE-ST32000SSSUN2.0-0514 cyl 3260 alt 2 hd 255 sec 252> /scsi_vhci/disk at g5000c5003424396b 1. c0t5000C5002637311Fd0 <SEAGATE-ST32000SSSUN2.0T-0514-1.82TB> /scsi_vhci/disk at g5000c5002637311f Disk 0 is the one where the OS is installed. During installation, I opted to install the OS into a partition. Now I''m trying to replicate the fdisk partition tables (and partition slice tables) onto the second disk... And after that''s done, I''ll start mirroring the rpool slice to the new disk rpool slice. But I haven''t been able to get that far yet... I tried everything I can think of inside the "format" and "fdisk" commands, but can''t get the second disk fdisk to come out quite the same as the first disk. So now I''m thinking I''ll just use dd to copy the first meg from the first disk to the second disk... Unfortunately there is no "d0" device name for these two disks... I''m able to make the "d0" appear on the second disk, just by adding the second disk to a zpool... 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 at 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*. I am failing to find any way to make the "d0" device appear on the first disk... because the first disk is already in use. Can anybody here tell me how to make the device appear? Or, can anybody tell me some magic "fdisk" command that will copy this partition table from the 1st to 2nd disk? I''ve tried everything I can think of, and not getting any closer... Thanks... The solution I''m currently looking at, without any help appearing on this thread... I''ll ignore the first disk and create whatever partition tables I like on the 2nd disk. Then use zfs send to copy the first disk onto second. Then boot from the second. Wipe out the first, using the same settings I manually created on the 2nd. And then finally mirror the 1st to the 2nd. (Yuk.) There must be a better way to replicate the partition tables. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110722/3a534852/attachment.html>
On 07/23/11 08:50 AM, Edward Ned Harvey wrote:> > In my new oracle server, sol11exp, it''s using multipath device > names... Presently I have two disks attached: (I removed the other > 10 disks for now, because these device names are so confusing. This > way I can focus on **just** the OS disks.) > > 0. c0t5000C5003424396Bd0 <SEAGATE-ST32000SSSUN2.0-0514 cyl 3260 > alt 2 hd 255 sec 252> > > /scsi_vhci/disk at g5000c5003424396b > > 1. c0t5000C5002637311Fd0 <SEAGATE-ST32000SSSUN2.0T-0514-1.82TB> > > /scsi_vhci/disk at g5000c5002637311f >Does the second disk have an SMI label? The usual way to copy the partition table is prtvtoc /dev/rdsk/<source> | fmthard -s - /dev/rdsk/<dest> This will fail harmlessly if the dest drive has an EFI label. -- Ian.
Edward Ned Harvey
2011-Jul-23 13:51 UTC
[zfs-discuss] add device to mirror rpool in sol11exp
> From: Edward Ned Harvey > [mailto:opensolarisisdeadlongliveopensolaris at nedharvey.com] > > Disk 0 is the one where the OS is installed.? During installation, I > opted to install the OS into a partition.? Now I''m trying to replicate > the fdisk partition tables (and partition slice tables) onto the second > disk...? And after that''s done, I''ll start mirroring the rpool slice to > the new disk rpool slice.? But I haven''t been able to get that far > yet...Got it. firstdisk=c0t5000C5003424396Bd0 seconddisk=c0t5000C5002637311Fd0 sudo fdisk -W fdisk-partition-table-backup.txt /dev/rdsk/${firstdisk}p0 sudo fdisk -F fdisk-partition-table-backup.txt /dev/rdsk/${seconddisk}p0 sudo prtvtoc /dev/rdsk/${firstdisk}s2 > partition-slice-table-backup.txt sudo fmthard -s partition-slice-table-backup.txt /dev/rdsk/${seconddisk}s2 sudo format -e Select second disk, label, SMI (not EFI) sudo zpool attach -f rpool ${firstdisk}s0 ${seconddisk}s0
Edward Ned Harvey
2011-Jul-23 14:04 UTC
[zfs-discuss] add device to mirror rpool in sol11exp
> From: Edward Ned Harvey > [mailto:opensolarisisdeadlongliveopensolaris at nedharvey.com] > > sudo zpool attach -f rpool ${firstdisk}s0 ${seconddisk}s0I assume this is still important too: sudo installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/${seconddisk}s0
Maybe Matching Threads
- cannot set property for ''rpool'': property ''bootfs'' not supported on EFI labeled devices
- Error message with fbt::copen:entry probe
- expand zfs for OpenSolaris running inside vm
- How to bind the oracle 9i data file to zfs volumes
- zfs: zvols minor #''s changing and causing probs w/ volumes