Moving iSCSI target to another zpool

Status
Not open for further replies.

TravisT

Patron
Joined
May 29, 2011
Messages
297
Background: I setup my zpool incorrectly and ended up with 4 striped disks instead of mirrored sets of 2 striped disks. Need to move the zvols off of those drives temporarily so I can destroy the pool and re-create. Then move the data back. Started another thread with no direction, and since then I've picked up speed in solving the problem.

So far, I've replicated one zvol snapshot using zfs send/receive over to my temporary zpool. I'm using iSCSI to an ESXi 5 box, and I've tried changing the iSCSI configs in FreeNAS to point at the temporary zpool replicated zvol, but it doesn't seem to like it. iSCSI seems to play nice if I just update the path, but if I reload iSCSI it won't startup.

Not real good on iSCSI, but I'm hoping to do the following:

1. Shut down VM
2. Snapshot original zvol
3. zfs send/receive to temp disk
4. Update iSCSI to point at temp zvol

Once all zvols are moved over and running on the temp zpool, I was going to blow away the original striped zpool and recreate it correctly, then reverse the process to move everything back.

Can't figure out what I'm doing wrong, but think it's related to iSCSI configs.

Travis
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
Has anyone done this? There seem to be really few resources on the web that explain in basic terms how to accomplish this.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I haven't done that(although I'm sure I will be in the next few months) but thinking about it I don't see why it wouldn't work exactly as the OP explained.
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
I thought so too, but not knowing much about this, it's been a learning process.

I took my least important vm and gave it a go. Everything went good until I tried updating the target. I keep getting an istgt auto size error. Found one error report here, but can't make much sense out of it. Seems that it just cleared up for the submitter.

The error isn't tied to a target, it is the zvol itself (it seems). I have multiple targets, and I've tried associating this particular device extent with multiple targets. Same error tracks to each LU. I also tried deleting the target that was being used originally with this server and re-creating. Same error. If I restart the iSCSI service, it will not restart until I remove the associated target pointing at the replicated zvol.

Here are the two datasets in question:
Code:
 ~# zfs get all Temp/media.disk1-backup
NAME                     PROPERTY              VALUE                  SOURCE
Temp/media.disk1-backup  type                  volume                 -
Temp/media.disk1-backup  creation              Mon Mar 25 10:02 2013  -
Temp/media.disk1-backup  used                  33.8G                  -
Temp/media.disk1-backup  available             1.63T                  -
Temp/media.disk1-backup  referenced            33.8G                  -
Temp/media.disk1-backup  compressratio         1.00x                  -
Temp/media.disk1-backup  reservation           none                   default
Temp/media.disk1-backup  volsize               100G                   local
Temp/media.disk1-backup  volblocksize          8K                     -
Temp/media.disk1-backup  checksum              on                     default
Temp/media.disk1-backup  compression           off                    default
Temp/media.disk1-backup  readonly              off                    default
Temp/media.disk1-backup  copies                1                      default
Temp/media.disk1-backup  refreservation        none                   default
Temp/media.disk1-backup  primarycache          all                    default
Temp/media.disk1-backup  secondarycache        all                    default
Temp/media.disk1-backup  usedbysnapshots       0                      -
Temp/media.disk1-backup  usedbydataset         33.8G                  -
Temp/media.disk1-backup  usedbychildren        0                      -
Temp/media.disk1-backup  usedbyrefreservation  0                      -
Temp/media.disk1-backup  logbias               latency                default
Temp/media.disk1-backup  dedup                 off                    inherited from Temp
Temp/media.disk1-backup  mlslabel                                     -
Temp/media.disk1-backup  sync                  standard               default
Temp/media.disk1-backup  refcompressratio      1.00x                  -
Temp/media.disk1-backup  written               0                      -

Code:
~# zfs get all raptor/media01.disk1
NAME                  PROPERTY              VALUE                  SOURCE
raptor/media01.disk1  type                  volume                 -
raptor/media01.disk1  creation              Thu Jan 17 14:35 2013  -
raptor/media01.disk1  used                  137G                   -
raptor/media01.disk1  available             2.93T                  -
raptor/media01.disk1  referenced            33.8G                  -
raptor/media01.disk1  compressratio         1.00x                  -
raptor/media01.disk1  reservation           none                   default
raptor/media01.disk1  volsize               100G                   local
raptor/media01.disk1  volblocksize          8K                     -
raptor/media01.disk1  checksum              on                     default
raptor/media01.disk1  compression           off                    default
raptor/media01.disk1  readonly              off                    default
raptor/media01.disk1  copies                1                      default
raptor/media01.disk1  refreservation        103G                   local
raptor/media01.disk1  primarycache          all                    default
raptor/media01.disk1  secondarycache        all                    default
raptor/media01.disk1  usedbysnapshots       0                      -
raptor/media01.disk1  usedbydataset         33.8G                  -
raptor/media01.disk1  usedbychildren        0                      -
raptor/media01.disk1  usedbyrefreservation  103G                   -
raptor/media01.disk1  logbias               latency                default
raptor/media01.disk1  dedup                 off                    inherited from raptor
raptor/media01.disk1  mlslabel                                     -
raptor/media01.disk1  sync                  standard               default
raptor/media01.disk1  refcompressratio      1.00x                  -
raptor/media01.disk1  written               0                      -
 
Status
Not open for further replies.
Top