the disks are LUNS from zfssa, 7420, this is on a T5-4 server.
if every boot disk is carved out of the pool under primary domain, that's different and there are a few articles on google about it. All the disks are from SAN and only thing the primary domain does it to make a mpgroup with other service domain.
Goal: clone a rpool from one guest domain and use it on a different domain.
I never felt comfortable about the post below, it just wasn't clean and didn't work all the time, not the feeling I can bank on when it come to clone LUNs.
after giving it more thoughts, I thought of the appliance itself, the 7420, it is very capable and can be snapshot/clone on its own, like how I would snapshot/clone for the local disks, I just need to take a step back and do the same thing in the appliance.
1. click the "Edit" button of the LUN I want to clone in the appliance, to the snapshot tab and make a snapshot
2. after the snapshot is made, it will give an option to clone that snapshot, which will generate another LUN with the same size of the original LUN.
3. so now I have this cloned LUN, then I create another new LUN for data, and present both of them to one of the T5 servers.
4. on T5, create a domain
5. make mpgroup for both disks(LUNs) for the primary domain and the service domain.
5. also add the image disk to this domain
6. make vnets to this domain
7. bind the domain, set the auto-boot?=false
ldm set-variable auto-boot?=false domain_name
8. start the domain, and go to ok promopt
9. boot off the image disk
10. go to shell
11. we need to address the issue that devices for this domain is not matching what the rpool(cloned) has. without those steps 9-12, we will run into this error(Doc ID 1587707.1)
so we do a zpool import and see what disk is the rpool on
12. zdb -l the disk_path, e.g zdb -l /dev/rdsk/c0d2s0 (from step 11), what you see is that the string after "path:" is not the disk you see from step 11. that's the issue.
13. zpool import -f rpool, force import the rpool to address this issue, then try step 12 again, this time, the path has the right disk.
14. remote /etc/zfs/zpool/cache!
15. quit and stop the domain, and start the domain
16. now we are at the prompt with a few warnings, error, etc, first thing I do, ipadm delete-addr xxxx, make sure the IP is wiped clean,
17. re-establish the network stack
18. remove the old entries in /etc/host
19. reboot
20. make sure svcs -xv is clean
----- 11/2013 ----
1. make a snapshot on the source domain.
zfs snapshot rpool@rpool.snap1
2. send the snapshot to a NFS share, gzip it (or not).
zfs send -Rv rpool@rpool.snap1 |gzip > /nfs_mnt/rpool.snap1
3. create a new LUN, let's call it domain_x
4. present this LUN to the target server, this is our cxtxdx disk.
5.the rpool2 and existing rpool both have a BE called "solaris", we need to take care of that.
beadm list, now there should be just one "solaris"
beadm create solaris@s_snap1
beadm create -e solaris@s_snap1 solaris_orig
beadm activate solaris_orig
reboot
beadm rename solaris solaris_bk
6. make sure it has right label:# format -L vtoc -d cxtxdx
7. create another rpool, rpool2. the system is running, there is already a rpool, this is the rpool I want to replace.
# zfs create rpool2 cxtxdx
8. if the snapshot is not gzipped, then
zfs receive -Fv rpool2 < snapshot_here
if it is gziped, then
gzcat snapshot_here.gz |zfs receive -Fv rpool2
9. set bootfs
zfs set bootfs=rpool2/ROOT/solaris rpool2
10. recreate dump/swap space if needed
zfs create -V 4g rpool2/dump
zfs create -V 4g rpool2/swap
11. beadm, shows one BE called "solaris".
12. mount "solaris", beadm mount solaris /mnt
13. install boot block
installboot -F zfs /tmp/mnt/usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/cxtxdx
14. beadm unmount solaris
15. reboot
16. what I see after reboot, is that I have two BE "solaris" and "solaris_bk" have "R" flag under beadm list. most importantly, it is still boot to the old rpool, I guess I might be need to modify the boot disk through eeprom, but I thought bootfs would take care that, no?
17. ldm stop target_domain
18. remove the original rpool disk
19. boot again, from ok prompt, choose the right boot device.
20. first reboot gives me a lot of warnings, but they all went away after 2nd reboot.
reference:
http://docs.oracle.com/cd/E23824_01/html/821-1448/recover-4.html#scrolltoc
No comments:
Post a Comment