如何让 TimeMachine 在 Netgear ReadyShare 移动硬盘上工作?

后来购买了Netgear WNDR 4300,突然发现这个路由器本身就支持 Time Machine 时光机备份。但是,无论是在3700上还是在4300上面,根本的问题在于:HFS+这种文件系统不能突然断电,如果突然断电了以前的备份基本就没有用了,严重的硬盘打不开,轻的原来所有备份失效。因此,如果想让 Time Machine 一直有效,一个基本的前提条件就是移动硬盘的持续供电!所以,这个方案基本上就不要折腾了。

看到 iued 同学的文章《网件WNDR4300 设置Time Machine》提到的小米路由器,基本上就更不靠谱了:原生不支持 HFS+。


 

在 TimeMachine 中,默认情况下不会出现网络存储,需要解决的就是如何能够让 Time machine 中出现,从而实现 TimeMachine 的自动备份。

第一个阶段,找到一篇非常详细的文章,《HOW TO GET NETGEAR READYSHARE TO WORK WITH TIME MACHINE AND MOUNTAIN LION (MAVERICKS TOO!)》,作者写的非常详细,有详细的步骤与配图。可惜由于在其中一个关键步骤,制作 sparse bundle disk image,由于操作失误,一直不能实现,放弃了。

readyshare_finalresult

第二个阶段,还是没有放弃啊,一个偶然的机会发现,用 NAS 备份 Time Machine 的文章,《用普通NAS代替苹果Time Machine 功能实现MAC的时间机器功能》、《在Mac上使用网络驱动器做TimeMachine备份》,找到了原始介绍非常详细的一篇文章《Time Machine on a network drive》。根据文章,实验了一圈,最后还是失败了,但是,我明白 sparse bundle disk image 的制作可以通过其他的方式实现,给了我启发。

第三个阶段,我又打开第一阶段的那篇文章,看过之后,我大概明白了,根本的原理是TimeMachine是建立在苹果独有的协议之上的,那么就需要利用苹果的 Sparse bundle disk image 构建一个虚拟的存储,Time Machine 就可以顺利地在上面工作。几个关键步骤如下:

  1. 格式化移动硬盘,我理解这个格式没有太多要求,只要支持 Netgear 的格式就行。我用的是苹果的 HFS+J 格式,我测试了一下,通过 Win7也可以访问。
  2. 关键的步骤:创建支持 TimeMachine 的映像,也就是 Sparse bundle disk image,把它存在本地,或者直接存储在你存储设备Readyshare 上,具体要求如下:
    Name: Whatever you prefer. I call mine “TimeCapsule” for consistency.
    Size: Whatever fits best on your system. I use the “Custom” option and make it close to my full drive space.
    Format: Mac OSX Extended (Journaled)
    Encryption: Whatever you prefer
    Partitions: Single Partition – Apple Partition Map
    Image Format: sparse bundle disk image
  3. 拷贝到 Readyshare 上,然后双击这个 image 文件,大概几分钟,奇迹出现了,你会发现在你的Devices 中出现了“TimeCapsule”。到 /Volume 中查看一下是不是出现了,如果是,你这一步就成功了。

  4. 执行一个 TimeMachine 目标位置,sudo tmutil setdestination /Volumes/TimeCapsule ,输入Mac 的管理员密码,接下来打开 TimeMachine 就可以正常用了。

 

衷心感谢作者的奉献精深,敬佩、感恩!

作者原文如下:

HOW TO GET NETGEAR READYSHARE TO WORK WITH TIME MACHINE AND MOUNTAIN LION (MAVERICKS TOO!)

ReadyShare Final Result

Note: I just upgraded to OSX Mavericks (10.9) and the ReadyShare drive is still readable and functional in Time Machine. You shouldn’t run into any trouble if you decide to upgrade.

Over the weekend I purchased a Netgear DGND3700v2 DSL Modem / Router (N600) and discovered that there was a great feature called ReadyShare. This allowed you to plug a USB drive into it and have it shared across all your computers in the network (music, photos, backup, etc.) However, their documentation to get it to work with OSX’s Time Machine backup tool wasn’t working. After some digging and tweaking, I managed to make it work.

TL;DR (For those of you that want the quick fix);

Use Fat32 partitions for all your partitions since the router will be able to read them. From there, create a sparse bundled disc image on the partition for your Time Machine backup. Mount it, and then set that to be your Time Machine backup source.

The Setup

I’m running a MacBookPro with Mountain Lion (OSX 10.8.3). I have a Netgear DGND3700v2 DSL Modem / Router (N600) with firmware version 1.1.00.12_1.00.12NA and a Western Digital Elements 1.5 TB Drive. Getting things to work for you may vary slightly based on drive/hardware, but I this approach should work.

Formatting the Drive

The first step is to format the drive. According to the documentation, the router is supposed to be able to support OSX Extented (Journaled) partitions, but I could never get them to show up. According to some various discussion threads, the AFP protocol changed somewhere in Lion and there’s still no support since Netgear does some custom interaction with the shares. However, ReadyShare DOES support Fat32 and we can make this work on OSX.

The first step is to plug in your USB drive and backup any data you may want to keep on your USB drive. We have to repartition the drive, and you’ll lose everything. Next launch the Disk Utility tool, select the USB drive, and click the “Partition” tab.

Change the drop down from “Current” to whatever partition scheme you want (I’m using two). Change the drive formats to be “MS-DOS (Fat32)” and verify that they are being created using the “Master Boot Record” scheme (under options).

One other important note, and this comes from Fernando who commented below:

One very important thing I did not see in the instructions is to make sure the backup image has the option to “Ignore ownership on this volume” set to OFF or unchecked. Apple warns that using Time Machine on a disk with the option turned on can result in the backups missing some user settings. My guess is that the average person is likely to go on without noticing this until it is too late. (!!)

ReadyShare Drive Partition Setup

ReadyShare Drive Partition Options

Once your options are set. Click the “Apply” button to repartition the drive. This make take a little time based on the size of the drive.

Creating the Time Machine Image

Time Machine requires an OSX Extended (Journaled) partition in order to function properly. While we don’t have a drive in this format, I discovered (immense HT to Frank over in the Netgear forums) that we can create a disk image in this format and have Time Machine backup on to that.

Close the Disk Utility program and open it back up again. Click the “New Image” icon. In the window that opens up to specify where to save the image to, make sure you specify the proper partition again. You can name the image whatever you want. In addition, we want our disk image to have the following settings:

  • Name: Whatever you prefer. I call mine “TimeMachine” for consistency.
  • Size: Whatever fits best on your system. I use the “Custom” option and make it close to my full drive space.
  • Format: Mac OSX Extended (Journaled)
  • Encryption: Whatever you prefer
  • Partitions: Single Partition – Apple Partition Map
  • Image Format: sparse bundle disk image

Ready Share Disk Image Settings

Once all the settings are in place, click the “Create” button and wait for the process to finish.

Now you can eject your drive and plug it into the router to finish off the process.

Verify ReadyShare Drives

After plugging in the drive to your router. Launch the router admin tool (http://routerlogin.net), select the “Advanced” tab, expand the “USB Storage” section, and click the “Advanced Settings” link.

Ready Share USB Settings

From here we want to verify that we can see both of our drives listed. If not, you can use the “Create Network Folder” option and add the necessary folders.

Ready Share Settings

Our final step is to map up Time Machine.

Mapping Time Machine Backup Location

Now that we have our drives available in ReadyShare, we need to connect them to the server and setup our mappings. From Finder, select Go -> Connect to Server and enter the address smb://readyshare and click “Connect”.  After connecting, select the drive your Time Machine image is on (or both in my case since I’m sharing music on my WinBackup drive) and click connect.

Ready Share Connect

By default, your Time Machine image will not have been mounted. We need to do this. Open up the drive that your Time Machine partition is on and double click on the .sparsebundle file that is there. After a minute you will see that your image has been mounted

Ready Share Mount Image

Finally, we need to select this image for our Time Machine backups. We do this through the Terminal window. Open up a new terminal, and enter the following commands:

1
2
cd /Volumes
ls

If all is still working smoothly, you’ll see your Time Machine image listed

Ready Share Terminal List

Now enter the command (we need to do this as room) to do our mapping

1
sudo tmutil setdestination /Volumes/[Your Image Name]

Note: If you’re using OSX 10.7 (Lion) the command appears to be:

1
sudo tmutil setdestination -p /Volumes/[Your Image Name]

Note: If you’re using OSX 10.6 (Snow Leopard) and below the process seems to be a lot trickier. The best documentation I’ve been able to find to date is this one. Please let me know if you find better.

If there’s no errors, you have success! You can even verify things in Time Machine itself.

ReadyShare Terminal Mapping

ReadyShare Time Machine Settings

And you’re all set! Now you can run your Time Machine backups and leave your drive on the network. I find this particularly helpful since sometimes I’m working upstairs or down in my office, and don’t want to drag the USB drive with me. Plus I can share the MP3 collection across my virtual machines and other Windows machines in the house.

ReadyShare Final Result

Final Notes

You’ll want to do make sure that your drives/images are remounted upon login to make sure Time Machine continues to function. To do this, read this followup post, since it was a little more involved than I initially thought.

I’ve been told that you can use EXT 2 formatted drives and they play really nice with the router, but you’re going to need something like MacFUSE installed to properly handle the drive.

You could potentially use your Windows partitions in NTFS by reformatting them again on a Windows machine, but I’m not going to risk it for the time being. 8^D

Hope this helps!

About 大千世界