Originally seen on mooey5775.
It’s important for sites to be backed up. But… how? With the limited physical connectivity of C.H.I.P., it’s difficult to just plug in a hard drive without a bulky powered hub. Thankfully, I have a hard drive plugged into my router. I know it can hardly be classified as a NAS, but hey, it’s something.
Anyway, my plan was to get the share mounted on my C.H.I.P. and copy valuable backups to there. Not quite offsite, but close enough for my purposes. A quick search gives me a few ideas. Basically, I need to install cifs-utils, mount the share using a quick command, add the mount to fstab to allow it to mount every time C.H.I.P. boots, and then I’m done! I run:
sudo apt-get install cifs-utils
sudo mkdir /network
sudo chown -R chip:chip /network
sudo chmod -R 777 /network
sudo mount.cifs //192.168.1.1/HomeDisk /network
Basically, I install cifs-utils using the first command, create the mount point with the second, set some permissions with the next two, and then attempt to mount it with the last. The only problem is the C.H.I.P complains about CIFS not being supported. Believe me. I’ve tried many variations of basically the same command.
So, what now? Apparently, the C.H.I.P. forum contains a thread discussing just this. Here’s the problem. C.H.I.P.’s kernel doesn’t actually have the CIFS module included, which would explain the complaints about CIFS not being supported and the CIFS module not existing. The only fix (that I can see) is to flash this user’s kernel and lose all my data unless backed up, which was the point of this venture in the first place. Maybe samba wasn’t the protocol that I should have used in the first place. Time to find other protocols to use! A quick test on my actual computer reveals that the share is accessible by FTP too! Yay!
A quick uninstallation of cifs-utils ensues, and curlftpfs is hastily installed and run:
sudo apt-get install curlftpfs
sudo curlftpfs 192.168.1.1/HomeDisk /network
…and there are no errors! There’s only one small problem. I can’t actually access the folder. The output of ls -l in my root directory spits this out:
d????????? ? ? ? ? ? network
My C.H.I.P. doesn’t even know the permissions of the network directory! What? Attempting to change ownership of the folder isn’t permitted either, even when run by root. According to various sources, I should add the allow_other tag to actually allow my network share to be accessible by other people. After unmounting the share, this should do the trick:
sudo umount /network
sudo curlftpfs -o allow_other 192.168.1.1/HomeDisk /network
And it works (although deleting folders is a bit glitchy)! After running df -h, I also realize that it’s got the size of the disk correct, but not how much is used. Oh, well. Time to add a (one line) entry into /etc/fstab!
curlftpfs#192.168.1.1/HomeDisk /network fuse allow_other,uid=1000,gid=1000,umask=0022 0 0
A quick test (sudo mount -a) verifies that it works. Anyway, I’d like to get my site backed up there if I will ever fix my brown out problem.
Oh, and by the way, it cost $1.50. The pie, I mean.