⬆️ ⬇️

Time Capsule do it yourself for 2 hours and 5000r

Let me give you a short note on how to make a Time Capsule yourself.



Task.



I have a macbook, old in modern times, but a favorite. With the growth of Aperture and iTunes databases, the backup problem has become quite acute, for which the WD mybook 500 GB and Hitachi with a 400 USB box was acquired at one time. Hitachi was used as a data disk, and WD for backup Time Machine, all connected via USB. This scheme did not suit me with an abundance of wires and a binding to the table: disconnecting from USB, I lost contact with the drives, I could not go to the kitchen with a laptop and music. I decided to make a file server that would distribute the files I need over the network, say via WiFi. Here are some problems:

')

if I distribute files using NFS or CIFS, then I will have to somehow convert the media from HFS + to ext3. As far as I know, the only way is to erase and re-mark that with 250Gb the necessary data is at least a chore.

if I distribute files via NFS or CIFS, TimeMachine will ignore these disks as objects for backup and as resources for backup.

Spotlight will not work correctly with CIFS



Of course, I can implement Time Machine with my own hands on bash, cron, and rsync, but knowing the solution to this problem makes it uninteresting. In addition, Time Machine simply works (tm) and is tightly integrated with various Apple programs. She is comfortable. The solution was prompted to me by my colleagues, I must use iSCSI, which works at the device level and sends the file or disk array from the server (called target) to the client (initiator) as a block device. For a client, such a disk is no different from a locally attached SCSI device, which solves my problems.

Special requirements.



In order to combat gadzhetaniem and kosnjumerizmom budget was determined in 5000r maximum without taking into account the cost of drives, which is cheaper than the Time Capsule several times. The solution should not have a single fan, but it is desirable that it has no moving parts at all.



Hardware part



I knew that one of my colleagues once made a wireless access point, combined with the file server with his own hands, but something went wrong and the computer went to the closet. As a result, for the symbolic money, I got an old fanless VIA Epia with a VIA Samuel-2 processor in a good package and 128 megabytes of RAM for it. Of course, you should buy an Intel D301GLY, the price of which in Moscow is 1500r, Mini ITX case (another 1500-2000r) and DDR II memory (about 1000r more). The remaining money can be invested in a WiFi card and flash, from which the operating system will be loaded. I just took a USB flash drive, which I didn’t use often, and my WiFi router was distributed by Asus WL-500W router. If there is no router, then you can use a free PCI slot for a network card with several ports, and hang up WiFi on USB or use Apple Airport Express, which will bring us very close to the Time Capsule form factor.



I note that even with the router, even the more expensive Gigabit LinkSys and hard disk, the whole system is cheaper than the original Time Capsul and more functional, though larger in size.



You can also use Ausus EEEPC or just an old laptop as a platform.



The software part.



As an operating system, Debian Etch was used in a minimal configuration and build essential for building a server. For Linux, there is an iSCSI-target implementation, that is, a server, iscsitarget.sourceforge.net . From the downloads section, you need to download the archive, since there is no ready-made assembly, unpack it, run make && make install. Everything passes without errors, in fact, the server is quite ready to work.



The iSCSI-target configuration file is located in /etc/ietd.conf. The only lines that play a fundamental role at the testing stage of our system are the name of the resource, which generally can be any, and the record of the form Lun 0 Path = / dev / sda, where / dev / sda is the device that we are going to give. The Macintosh client will be a globalSAN iSCSI initiator , which is completely free. For Windiws, there is also a free Microsoft iSCSI software initiator . Both programs have an obvious interface: you need to enter the server's IP on the 1st tab and select Lun by the name on the second, after which another 1 hard disk will appear in the system, which you can partition, format or use already existing partitions.



Since all my computers are in the 1st LAN without access from the outside, I did not do channel encryption and authorization, although iSCSI supports CHAP, and iSCSI itself can be encapsulated in IPSec, if you want to work with your disks, say from afar.



Performance and results.



What can I say? Even my frankly weak and old VIA Epia is top-ranked with network performance, the disk speed is just under 100 megabits per second. Disk caching takes place both on the client side and on the server side, so more RAM on the server is better. Aperture has become much faster to work with the collection, more precisely, its work has ceased to affect the response of the notebook itself. Time Machine immediately recognized its old disk and synchronized backup. Now I can walk around the house with my laptop without losing touch with my drives.

Source: https://habr.com/ru/post/27006/



All Articles