I've run into a strange replication issue between 2 FreeNAS boxes. Details of their config are below:
SAN1
FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
1x 1GB NIC for Management
1x 1GB NIC for iSCSI
ZFS Pool:
1 ZFS Pool with two 3TB mirrored (2 way mirror) vdevs
2 zvols (1.07TB and 2.05TB)
SAN2
FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
1x 1GB NIC for Management
1x 1GB NIC for iSCSI
ZFS Pool:
1 ZFS Pool with two 3TB mirrored (2 way mirror) vdevs
2 zvols (1.07TB and 2.05TB)
The configuration for both (and the hardware) is pretty much identical (save unique things like IP, Public Key, etc). They each have 2 zvols "native" to them, with one of those zvols replicated to the other SAN. So, one of SAN1's zvols gets sent over to SAN2, and one of SAN2's zvols gets sent over to SAN1. At first blush, replication seems to be working fine. With mostly empty zvols, a periodic snapshot task is created, followed by a replication task for both boxes. The empty zvols are replicated over just fine. I can see the most recent snapshot of the partner SAN appear on the "Pull" side, and I can see the zvol added to the filesystem under the Active Volumes page as well as zfs list (from SSH). An initial test with a few hundred MB of data on one zvol (just as a simple test) and replication continues to work. The periodic snapshots are sent over (from both sides) just fine. However, once I moved over the roughly 500GB of data targeted for one of the zvols on SAN1, during the next snapshot/replication interval I received a "broken pipe" error. Further up the logs it noted that there was a "mismatch after replication" of the first snapshot vs the new snapshot. That was in the direction of SAN1 to SAN2. The SAN2 to SAN1 replication continues to work, but it has virtually no data on it. Unfortunately, I did not save that specific log detail as I figured it had something to do with such a huge difference in data from the first snapshot to the next. So, I deleted the replication task, the periodic snapshot task, all of the snapshots for that zvol on the Push side, the snapshots on the Pull side, as well as the replicated zvol itself on the Pull side (so a fresh start, in essence).
After that, I recreated the periodic snapshot task on the Push side, along with the replication task and waited for it to kick off. This replication attempt failed as well, and the errors in the message log (/var/log/messages) are below:
So, I get the initial broken pipe error, followed by the dataset is busy cannot create device links on the subsequent attempts error. That error pattern seems to be repeat itself several times until I stop the replication (I have more of that log if needed). Thinking that perhaps its having a problem sending the initial FS stream over with whatever ZFS send | receive command FreeNAS' script is using, I figured I would try a manual push. So, using the Oracle documentation as reference (noting the difference to myself of a full send to create the FS vs an incremental send), I issued this command from an SSH session on the Push server:
zfs send V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0808-2w | ssh 10.80.1.50 zfs recv V3T-7k-STA3-2MRx2/0E1PRDvDR01-100
V3T-7k-STA3-2MRx2 is the Push pool name (as well as the Pull pool) and 0E1PRDvDR01-100 is the zvol name with about 500GB of data on it. If it matters, that is setup as a device extent for an iSCSI LUN with a VMFS5 datastore on it. The initial, successful, replication (from SAN1 to SAN2) had the datastore on it but not the 500GB of data.
Trying the manual push of the FS, if I check the Pull end, I can see the zvol being created in the pool by using zfs list. Re-running zfs list command I can see the zvol size increase as time goes on (at a pretty steady pace, at that). However, before it finishes I get another broken pipe error (on the Push end), but not much more detail than that in the messages log:
The Push IP and Pull IP are on different subnets with a router between them. They are, however, currently at the same physical site (for this initial seeding). To eliminate the router as an issue, I tried a manual push using 2 IPs on the same network on the iSCSI NICs (same switch). This resulted in the same error as above. Just to clarify, the zvol replication going from SAN2 to SAN1 has continued to function w/o issue, but again it does not have any data on it.
Any suggestions that anyone can offer would be greatly appreciated. For that matter, if there are any other logs in particular I can look at to glean more details about the issue that would be quite helpful as well. Thank you.
SAN1
FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
1x 1GB NIC for Management
1x 1GB NIC for iSCSI
ZFS Pool:
1 ZFS Pool with two 3TB mirrored (2 way mirror) vdevs
2 zvols (1.07TB and 2.05TB)
SAN2
FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
1x 1GB NIC for Management
1x 1GB NIC for iSCSI
ZFS Pool:
1 ZFS Pool with two 3TB mirrored (2 way mirror) vdevs
2 zvols (1.07TB and 2.05TB)
The configuration for both (and the hardware) is pretty much identical (save unique things like IP, Public Key, etc). They each have 2 zvols "native" to them, with one of those zvols replicated to the other SAN. So, one of SAN1's zvols gets sent over to SAN2, and one of SAN2's zvols gets sent over to SAN1. At first blush, replication seems to be working fine. With mostly empty zvols, a periodic snapshot task is created, followed by a replication task for both boxes. The empty zvols are replicated over just fine. I can see the most recent snapshot of the partner SAN appear on the "Pull" side, and I can see the zvol added to the filesystem under the Active Volumes page as well as zfs list (from SSH). An initial test with a few hundred MB of data on one zvol (just as a simple test) and replication continues to work. The periodic snapshots are sent over (from both sides) just fine. However, once I moved over the roughly 500GB of data targeted for one of the zvols on SAN1, during the next snapshot/replication interval I received a "broken pipe" error. Further up the logs it noted that there was a "mismatch after replication" of the first snapshot vs the new snapshot. That was in the direction of SAN1 to SAN2. The SAN2 to SAN1 replication continues to work, but it has virtually no data on it. Unfortunately, I did not save that specific log detail as I figured it had something to do with such a huge difference in data from the first snapshot to the next. So, I deleted the replication task, the periodic snapshot task, all of the snapshots for that zvol on the Push side, the snapshots on the Pull side, as well as the replicated zvol itself on the Pull side (so a fresh start, in essence).
After that, I recreated the periodic snapshot task on the Push side, along with the replication task and waited for it to kick off. This replication attempt failed as well, and the errors in the message log (/var/log/messages) are below:
Code:
Aug 30 00:00:01 0E1-PRD-SAN01P autosnap.py: [tools.autosnap:42] Popen()ing: /sbin/zfs snapshot -o freenas:state=NEW V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w Aug 30 00:00:02 0E1-PRD-SAN01P autorepl.py: [tools.autorepl:241] Destroying remote V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 Aug 30 00:00:02 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:49] Executing: /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 /sbin/zfs destroy -rRf V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 Aug 30 00:00:02 0E1-PRD-SAN01P common.pipesubr: cannot open 'V3T-7k-STA3-2MRx2/0E1PRDvDR01-100': dataset does not exist Aug 30 00:00:02 0E1-PRD-SAN01P autorepl.py: [tools.autorepl:247] Creating V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 on remote system Aug 30 00:00:02 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:49] Executing: /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 /sbin/zfs create -o readonly=on -p V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 Aug 30 00:00:03 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:49] Executing: (/sbin/zfs send -R V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w | /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 "/sbin/zfs receive -F -d V3T-7k-STA3-2MRx2 && echo Succeeded.") > /tmp/repl-6189 2>&1 Aug 30 00:39:02 0E1-PRD-SAN01P kernel: pid 6245 (zfs), uid 0: exited on signal 6 Aug 30 00:39:02 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:42] Popen()ing: /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 "zfs list -Hr -o name -S creation -t snapshot -d 1 V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 | head -n 1 | cut -d@ -f2" Aug 30 00:39:03 0E1-PRD-SAN01P autorepl.py: [tools.autorepl:307] Replication of V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w failed with warning: cannot send 'V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w': Broken pipe internal error: Broken pipe Abort trap Aug 30 00:40:02 0E1-PRD-SAN01P autorepl.py: [tools.autorepl:241] Destroying remote V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 Aug 30 00:40:02 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:49] Executing: /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 /sbin/zfs destroy -rRf V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 Aug 30 00:40:02 0E1-PRD-SAN01P common.pipesubr: cannot destroy 'V3T-7k-STA3-2MRx2/0E1PRDvDR01-100': dataset is busy Aug 30 00:40:02 0E1-PRD-SAN01P autorepl.py: [tools.autorepl:247] Creating V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 on remote system Aug 30 00:40:02 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:49] Executing: /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 /sbin/zfs create -o readonly=on -p V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 Aug 30 00:40:02 0E1-PRD-SAN01P common.pipesubr: cannot create 'V3T-7k-STA3-2MRx2/0E1PRDvDR01-100': dataset already exists Aug 30 00:40:02 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:49] Executing: (/sbin/zfs send -R V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w | /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 "/sbin/zfs receive -F -d V3T-7k-STA3-2MRx2 && echo Succeeded.") > /tmp/repl-6661 2>&1 Aug 30 00:40:02 0E1-PRD-SAN01P kernel: pid 6693 (zfs), uid 0: exited on signal 6 Aug 30 00:40:02 0E1-PRD-SAN01P autorepl.py: [common.pipesubr:42] Popen()ing: /usr/bin/ssh -i /data/ssh/replication -o BatchMode=yes -o StrictHostKeyChecking=yes -q -p 22 10.80.1.52 "zfs list -Hr -o name -S creation -t snapshot -d 1 V3T-7k-STA3-2MRx2/0E1PRDvDR01-100 | head -n 1 | cut -d@ -f2" Aug 30 00:40:03 0E1-PRD-SAN01P autorepl.py: [tools.autorepl:307] Replication of V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w failed with cannot receive new filesystem stream: dataset is busy cannot create device links for 'V3T-7k-STA3-2MRx2/0E1PRDvDR01-100': dataset is busy warning: cannot send 'V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w': Broken pipe internal error: Broken pipe Abort trap
So, I get the initial broken pipe error, followed by the dataset is busy cannot create device links on the subsequent attempts error. That error pattern seems to be repeat itself several times until I stop the replication (I have more of that log if needed). Thinking that perhaps its having a problem sending the initial FS stream over with whatever ZFS send | receive command FreeNAS' script is using, I figured I would try a manual push. So, using the Oracle documentation as reference (noting the difference to myself of a full send to create the FS vs an incremental send), I issued this command from an SSH session on the Push server:
zfs send V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0808-2w | ssh 10.80.1.50 zfs recv V3T-7k-STA3-2MRx2/0E1PRDvDR01-100
V3T-7k-STA3-2MRx2 is the Push pool name (as well as the Pull pool) and 0E1PRDvDR01-100 is the zvol name with about 500GB of data on it. If it matters, that is setup as a device extent for an iSCSI LUN with a VMFS5 datastore on it. The initial, successful, replication (from SAN1 to SAN2) had the datastore on it but not the 500GB of data.
Trying the manual push of the FS, if I check the Pull end, I can see the zvol being created in the pool by using zfs list. Re-running zfs list command I can see the zvol size increase as time goes on (at a pretty steady pace, at that). However, before it finishes I get another broken pipe error (on the Push end), but not much more detail than that in the messages log:
Code:
Aug 30 05:06:57 0E1-PRD-SAN01P autorepl.py: [tools.autorepl:307] Replication of V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w failed with warning: cannot send 'V3T-7k-STA3-2MRx2/0E1PRDvDR01-100@auto-20120830.0000-2w': Broken pipe internal error: Broken pipe Abort trap
The Push IP and Pull IP are on different subnets with a router between them. They are, however, currently at the same physical site (for this initial seeding). To eliminate the router as an issue, I tried a manual push using 2 IPs on the same network on the iSCSI NICs (same switch). This resulted in the same error as above. Just to clarify, the zvol replication going from SAN2 to SAN1 has continued to function w/o issue, but again it does not have any data on it.
Any suggestions that anyone can offer would be greatly appreciated. For that matter, if there are any other logs in particular I can look at to glean more details about the issue that would be quite helpful as well. Thank you.