september 15, 2007

Well, originally, I was not going to hack my D-Link DNS-323 -- even though it is uber-hackable because of the underlying Linux OS (Linux mookienas #32 Tue Jan 23 17:11:52 CST 2007 armv5tejl unknown ). Ever since I got the box, I have been struggling to get it to work using smb/cifs mounts with rsync. And really, that is the primary thing that I want the box to do: Be a backup server for all the boxes in my house using rsync. Because of some inane (Microsoft) limitations of smb/cifs, rsync really does not work that well when used with a cifs mount. For instance, "Another common cause involves sending files to an Microsoft filesystem: if the file's modified time is an odd value but the receiving filesystem can only even values, then rsync will re-transfer too many files. You can avoid this by specifying the --modify-window=1 option." That one caused me a lot of headaches because my Powerbook continually tried to retransfer half of the files it had. Ugh. Another one is filename length limitations. When I rsync'd to an smb mount, I couldn't rsync some files because their filenames were too long. Ugh, again -- it seemed like an arbitrary limitation slapped on top of ext2. So, I figured I could either return the damned thing and be disappointed; or I could at least try to hack it before I returned it. If things worked out, I could keep it. There's a healthy community of people hacking away at the DNS-323 and where there's a healthy community...There's prebuilt hacks to make life easier. Fonz has created a pretty nice package for the DNS-323, just tar xvzf the file onto the main volume, reboot and bam you're set: telnet, rsync, ssh, nfs, lighttp and even php if you choose to add that on. The DNS-323 itself is a pretty beefy box for this stuff, so I guess I'll keep mine "hacked". I have reformatted the drives to take them out of the Linux md RAID1 configuration and put them into a two drive configuration. I figure I will rsync from all machines to the main volume. Then I will use a script to keep versions (using hard links) on the second volume. That way I don't have to deal with Linux md and also have snapshots of my data for the last few hours and days. Oh, and apparently the box runs a bit faster with no RAID drives and I'll truly have 1TB of storage on the box. Here's some notes for myself on how I got things running. Peruse if you please.

echo "root::0:0:99999:7:::" >>/etc/shadow
uid = root gid = root #auth users = * #secrets file = /mnt/HD_a2/fun_plug.d/etc/rsyncd.secrets #strict modes = false hosts allow = [vol1] path = /mnt/HD_a2 read only = no [vol2] path = /mnt/HD_b2 read only = no