Wednesday, May 20, 2009

Import existing array to new server

After a POC (Proof of Concept) with openSolaris on an old Dell GX270 with a zfs pool "daw" I wanted to know how to link that existing pool to my new Config based on M4N78-PRO setup:

admin@dawbckup:~# zpool import daw
cannot import 'daw': pool may be in use from other system, it was last accessed by dawbkup (hostid: 0xc9e4de) on Wed May 6 16:02:36 2009
use '-f' to import anyway
admin@dawbckup:~# zpool import -f daw
cannot share 'daw/backup': iscsitgtd failed request to share
zfs set shareiscsi=on daw/backup
admin@dawbckup:/etc# iscsitadm list target -v
Target: daw/backup
iSCSI Name: iqn.1986-03.com.sun:02:aa46a269-bef7-4432-9ed2-9890738fc784
Alias: daw/backup
Connections: 0
---

Voila here it is back again. Now I can mount it again in windows and we're back in business.

admin@dawbckup:~# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
daw 149G 5.29G 144G 3% ONLINE -
rpool 20G 6.60G 13.4G 33% ONLINE -

admin@dawbckup:/etc# zfs list
NAME USED AVAIL REFER MOUNTPOINT
daw 120G 26.7G 18K /daw
daw/backup 120G 141G 5.29G -
rpool 8.89G 10.8G 78K /rpool
rpool/ROOT 4.99G 10.8G 18K legacy