QNAP TimeMachine .AppleDB folder

Are you a QNAP user? Ever got the error “The operation couldn’t be completed. (OSStatus error 2.)” out of the blue after months of smooth backup operations on your Mac OSX?

If you have tried disabling/re-enabling afp, the TimeMachine service, deleted your sparsebundle and all kind of other stuff in the hope of fixing the problem but not. Try the following to clear up metadata:

* ssh to your qnap box (in my case a slow TS412)
* cd /share/MD0_DATA/.timemachine
* rm -rf .AppleDB

Then launch your TimeMachine backup again. That should solve the issue.

FreeNAS: howto create a link aggregation when you only have 2 NICs

EDIT: The article can still be useful, but apparently, it seems it can be done without the workaround. Clear all interfaces, create your lagg in the FreeNAS shell console and associate the interfaces. Then reboot mandatory here to see the lagg appear in the first menu to be able to set its IP address.

If you’ve tried to configure LACP on your FreeNAS server (Using 9.2.1.8 here), and only have 2 NICs, you may have run into the issue whereas you can’t attribute an IP address to a lagg at the console, and that you can’t create a lagg from the web interface if any one of your two interfaces is already assigned an IP. Therefore, no way to create a lagg unless you have an extra NIC to plug in your laptop with an IP configured on a different network.

I haven’t found a way to do it with FreeNAS tools. If you have, please let me know!

Drop to your FreeNAS console shell!

Make sure your individual interfaces do not have any IP assigned. Delete previous lagg.
Modify the below info to suit your needs.

# ifconfig lagg0 create
# ifconfig lagg0 laggproto lacp laggport bce0 laggport bce1 10.11.15.24 netmask 255.255.255.0
# ifconfig bce0 up
# ifconfig bce1 up
# route add default 10.11.15.254

Your LACP should now come up. However, if you reboot, you’ll lose everything.

To persist your changes, mount your / read-write.

mount -uw /

Do not modify /etc/rc.conf directly. Instead, modify /conf/base/etc/rc.conf.
Append the following at the end of the file.

ifconfig_bce0="up"
ifconfig_bce1="up"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto lacp laggport bce0 laggport bce1"
ipv4_addrs_lagg0="10.11.15.24/24"
defaultrouter="10.11.15.254"

Reboot to make sure everything comes back as it should. Check your services also.

The FreeNAS GUI will see your lagg0 as a regular interface, and you won’t see your 2 individual interfaces anymore. Do not add another lagg from the GUI, or it will steal the physical interface and leave your lagg0 unusable.

Edit: It looks like the physical interfaces, in this case bce0 and bce1 do not re-attach to the lagg after a reboot. If someone knows why, please comment send me an email at fred @ gmail.com ! Thanks 🙂