Hello the list,

I thought that it should be easy to do a clone (not in the term of zfs) of a 
disk with zpool. This manipulation is strongly inspired by
http://www.opensolaris.org/jive/thread.jspa?messageID=135038
and 
http://www.opensolaris.org/os/community/zfs/boot/

But unfortunately this doesn't work, and we do have no clue what could be wrong

on c1d0 you have a zfs root

create a mirror of this disk:
 zpool attache rootpool c1d0 c2d0
 wait that it construct c2d0

zpool offline

#install the grub 
/usr/sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 c2d0

shut down
remove the disk c1d0 and place the disk on c2d0 in c1d0

boot in failsafe

clean the zpool
 zpool import rootpool
 zpool rootpool c1d0 #(yeah I know this look strange because
at that time we have a zpool status saying that the zpool is constitued of two 
disk c1d0 and c1d0)


# try to repair the zpool.cache
mkdir /tmp/w_zfs # w stand for write
mount -F lofs /tmp/w_zfs /etc/zfs
touch /etc/zfs/foo # to check if writable
rm /etc/zfs/foo

zpool export rootpool
zpool import rootpool

## okay we can see now that there is a /etc/zfs/zpool.cache

# lets put the new zpool.cache in the rootpool/rootfs
mkdir /tmp/rootpool
mount -F zfs rootpool/rootfs /tmp/rootpool
cp /etc/zfs/zpool.cache /tmp/rootpool/etc/zfs/

# update the bootadm
/usr/sbin/bootadm update-archive -v -R /tmp/rootpool



_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to