ZFS Migration from NFSv4 to iSCSI

I want to migrate from NFSv4 over to iSCSI, I have setup Target as per https://www.freebsd.org/doc/handbook/network-iscsi.html and it all works, the problem I have is I want to use my existing data stored under zroot/usr/home.

Here is my layout
Code:
#gpart show
=>  34  62533229  ada0  GPT  (30G)
34  6  - free -  (3.0K)
40  58720256  1  freebsd-zfs  (28G)
58720296  3812960  2  freebsd-zfs  (1.8G)
62533256  7  - free -  (3.5K)

=>  34  3907029101  ada1  GPT  (1.8T)
34  6  - free -  (3.0K)
40  128  1  freebsd-boot  (64K)
168  8388608  2  freebsd-swap  (4.0G)
8388776  3898640352  3  freebsd-zfs  (1.8T)
3907029128  7  - free -  (3.5K)

=>  34  3907029101  ada2  GPT  (1.8T)
34  6  - free -  (3.0K)
40  128  1  freebsd-boot  (64K)
168  8388608  2  freebsd-swap  (4.0G)
8388776  3898640352  3  freebsd-zfs  (1.8T)
3907029128  7  - free -  (3.5K)
Code:
#zfs list
NAME  USED  AVAIL  REFER  MOUNTPOINT
zroot  1.44T  327G  144K  none
zroot/iscsi  103G  430G  120K  -
zroot/root  3.07G  327G  2.59G  /
zroot/tmp  40.2M  327G  39.9M  /tmp
zroot/usr  1.32T  327G  11.6G  /usr
zroot/usr/home  1.30T  327G  1.00T  /usr/home
zroot/var  3.95G  327G  3.62G  /var
Code:
#zpool status
pool: zroot
state: ONLINE
scan: resilvered 716G in 2h13m with 0 errors on Sun Apr 27 21:54:34 2014
config:

NAME  STATE  READ WRITE CKSUM
zroot  ONLINE  0  0  0
mirror-0  ONLINE  0  0  0
gpt/disk1  ONLINE  0  0  0
gpt/disk0  ONLINE  0  0  0
logs
gpt/log  ONLINE  0  0  0
cache
gpt/cache  ONLINE  0  0  0

errors: No known data errors
/etc/ctl.conf
Code:
target iqn.2013-06.beast:target0 {
auth-group no-authentication
portal-group pg0

lun 0 {
device-id "beast-iSCSI"
path zvol/zroot/iscsi
size 100G
}
}
I did zfs create -V 100G zroot/iscsi just for the test in order to have lun 0 vzol device /dev/zvol/zroot/iscsi to use but what I really want is to use data stored inside /usr/home/some_folder_below. What options do I got here, what is the recommended way of doing this?
 
You'll have to copy your data any way. The only question is -- how. If file system you are going to use on iSCSI is supported by FreeBSD, then you can shutdown iSCSI, mount zvol locally and copy the data. If destination file system is not supported, then the only way is to copy with the client.
 
Right, I created a sparse volume and format with ext4, unfortunately I coudn't mount this partition with write support so copy must be done on the client side.
 
Back
Top