Accessing an old, populated hard drive with a NAS?

6

2

Trying to brush up on my general understanding of hard drives and partitions...

I have an old SATA hard drive with a load of stuff on it. As far as I'm aware it wasn't the OS's boot drive before I yanked it out of its bay and sold the computer. The fact that it wasn't used to boot the OS means it can be accessed via another OS on another machine (need clarification on this?).

I've recently bought a Synology NAS. Is it possible for me to spin the said old hard drive within the NAS, and grab some old files off of it (before I plonk my WD Red's in there more permanently?).

I've not attempted it yet, but I don't want to spend hours tiptoeing around an unfamiliar system if it simply can't be done.

One worry is that the NAS will ask me to format the drive before installing...

Further Clarification

After a bit of soul searching I can sum up the question better:

Is it possible to put an old hard drive into a Synology NAS without formatting it? Or does the Synology OS (I imagine: some flavour of Linux) require a formatting procedure in order to mount the drive to the network?

The fact that most OS's are able to at least read from multiple filesystems (Fat32/NTFS/HFS+), surely means it would be possible to just mount a disk to the network through the Synology NAS? I only need to temporarily grab some stuff from the disk, not make use of the rich feature set offered by the NAS.

shennan

Posted 2014-02-25T13:43:30.767

Reputation: 163

Answers

1

The easiest way to read the disk is to attach it to your regular machine (Desktop, Laptop, does not matter). There are too many things to consider when trying to access the disk from within the NAS and to be sure that it does not modify the data in any way.

The fact that it wasn't used to boot the OS means it can be accessed via another OS on another machine (need clarification on this?)

The fact, that a machine uses a disk to read it's boot data from it does not matter at all. All you need to access the data on the disk is .. the disk. (This is true for any storage medium)

The data is put onto the disk in a structured manner. This is usually called "the filesystem". If you know the filesystem you can extract the data, allthough slowly. If OS xyz knows how to read from the filesystem it can extract the data. If your Synology NAS knows the filesystem of the disk in question AND is able to mount it .. then your NAS will read the data.

akira

Posted 2014-02-25T13:43:30.767

Reputation: 52 754

I don't own a desktop machine: hence needing to use the NAS. The reason I mentioned that the disk was not used to boot an OS is that I figured these disks (or partitions) sandboxed the folder structure with their OS (cough Windows). Is that not true? Anyway, is there not a way I can use the NAS to access the disk? – shennan – 2014-02-25T16:33:35.927

what machine do you use to access the nas? – akira – 2014-02-25T16:54:32.790

I use a hipster book pro retina... As I said, I haven't set up the NAS with my brand spanking new WD Red's yet because I wanted to perform a rescue of old data from this old hard drive (not damaged/broken as far as I know) before I get settled in. Any advice on best way to do this without having to spend any more money? – shennan – 2014-02-25T17:03:27.403

replace "desktop" with "your computer". MacBook, desktop, does not matter. install a virtual machine (VMware Fusion, virtual machine) to it and then you can toy around with a OS that has the Filesystem drivers you need. – akira – 2014-02-25T17:07:05.123

Ok, I don't think I made my question clear enough. My apologies. What I'm essentially asking is: by just popping an old hard drive (one that has already been populated with files from a Windows machine two years previously) into a NAS, am I able to access it through my connecting machine? My worry is that the NAS operating system will ask me to format the drive before it can hook it up to the network? (Thanks for your time so far). – shennan – 2014-02-25T17:11:09.803

that depends on the nas. consult the manual of it. attaching the old disk to your usual machine will sidestep the problem of eventual formatting. the fsystem on the old disk might be one of ext3/4, xfs (maybe inside a lvm) or some ufs2 partition, depends on the old nas. – akira – 2014-02-25T17:15:05.603

Have upvoted your answer (with a slight hesitence), but decided not to accept it as I don't feel it's particularly clear for the uninitiated. What confuses me is the fact that most OS's are able to format a drive to multiple filesystems. Windows can format a drive to Fat32, NTFS etc. OSX has Fat32, HFS+ etc. Why, then, would a Linux system not be able to read from these filesystems? Especially as Linux kernels have been noted to read both NTFS/Fat32. I think this answer needs developing. – shennan – 2014-02-25T18:18:19.200

Your NAS (the old and the new) don't use Fat*, NTFS or HFS+. They use something that comes at a low license fee (as in "free") and then they use something like CIFS (or AFP) to allow other machines to write / read via network (hence the term "network attached storage"). The disk is unlikely to be formatted with eith Fat (which is not good enough for a server filesystem anyway) or NTFS (which would need a reimplantation of NTFS) or HFS+ (which is not good enough for a server filesystem either). To your machines the filesystem is transparent, but underneath it will use something native to the OS – akira – 2014-02-25T18:28:52.097

No, the Synology OS formats to ext4, but in my mind that's academic. Here we have a machine (the NAS). It has a CPU. It has a fan. It has SATA connectors. It has a Linux OS installed. It's essentially a system like any other. The ability to mount hard drives straight onto the network is irrelevant in this example. I simply need to get the data off the disk. How is it that an OS cannot *read* from a proprietary filesystem like NTFS/Fat32? If I were to plug an external hard drive with a (fs of Fat32) via the USB port, the NAS wouldn't kick up a fuss there... Do you see my point? – shennan – 2014-02-25T18:53:14.563

You missed my points. As I said: consult the manual of your new NAS to see what you can do via their usual Webinterface. The old disk might contain any FS that is used by either Linux or any *BSD variant, depends what the old NAS used as the OS. Or stop wasting (your) time by trying to bend your current NAS and just plug the disk into your usual machine and access the disk via a Virtual machine. You might be lucky and the new NAS will do as you whish. You might be unlucky. In any case: You will have more control with a virtual machine. End of story. – akira – 2014-02-25T19:25:41.537

The manual of your new NAS will state what it will do with a disk that you attach to the RAID-slots (even when the OS is only using a software RAID). All pure speculation: read the manual. – akira – 2014-02-25T19:28:50.083

Yes, I have already searched the manual and there is no mention of my user-case. If I had a machine with a 3.5 Sata bay, then I would obviously had connected it by now and I would stop wasting my (and everyone else's) time by asking this question. With a search I have found that it is possible to read an NTFS filesystem with the Synology, but it is unsupported and you need to do it via the terminal (using Linux mount commands). The Synology branded OS will not officially recognise the drive until it is formatted to ext. – shennan – 2014-02-25T19:37:57.850

So, last try: If I buy a 3.5 SATA Enclosure, will I be able to use the drive with my machine without formatting it?

– shennan – 2014-02-25T19:38:31.917

yes. you just need the right fs drivers. and this is best accomplished by using a virtual machine with a Linux rescue disc. – akira – 2014-02-25T20:27:51.813

f you can access the nas with ssh or something similar and have some unix skills you might be able to mount the disk in your new nas. but there is no guarantee that it won't do auto magic. unlikely but not 100%. the fs on the old disk is most likely not ntfs, but a native Linux / Bsd fs. – akira – 2014-02-25T21:02:08.423

mhh, sorry, i misread your question: the old disk is from an older machine (desktop, laptop etc), not from an older nas? yeah, than it's more likely to have the native fs of the OS from that old machine. if that OS was windows than ntfs is obviously a valid guess. – akira – 2014-02-25T21:03:58.910

I'm 99% it's NTFS. Which is why I reckon it's doable, because I figured Linux-like systems would have *read-only* access to NTFS filesystems. But *read-only* is all I need. The issue, though, is that I need to install the Synology OS onto a working drive before I can even use any of the command line features (obviously), so I'm just going to jog the whole thing on and purchase an enclosure. – shennan – 2014-02-25T21:33:46.690

I've decided to accept this as it's the closest thing to a valid answer. For anyone who comes by this thread, I did decide to buy a hard drive enclosure for the simple purpose of grabbing the old data. Lesson learnt: using a NAS to extract data off of an old hard drive is no easy feat. – shennan – 2014-02-27T22:14:50.433

@shennan: to help future readers i suggest we cut back this discussion to the essentials. – akira – 2014-02-28T06:29:36.243

I completely agree. In fact, I'm not sure if the discussion is at all needed. If you could summarize the discussion in your answer, we can just delete the whole conversation. – shennan – 2014-02-28T10:11:09.327

14

Just stumbled upon this questions while trying to solve the same issue. Here's what helped me:

Apparently, DSM does not offer a way to mount a volume from HDD without adding it to NAS. So, there's no option to have it available inside of web interface or shared via network--at least with default packages.

However, Synology is a full featured Linux computer, which allows you to do whatever you're pleased to once you connect to the shell. So, you need to:

Step 1: enable telnet access via Control Panel --> System->Terminal & SNMP->Terminal-> Check "Enable Telnet Service"

Then, you need to connect as a root via any telnet client. For me this worked this way from Mac's Terminal command line:

Step 2:

telnet 192.168.1.21
Synology login: root
Password: *your admin password*

Then you need to mount the volume. You need to find out what is it, so this is the command to help:

Step 3:

parted /dev/sdd

I got 4-bay 414play, and "sdd" is for 4th bay. "sda" is for 1st, "sdb" is for 2nd, so you get the idea. Then it will show something like this:

GNU Parted 3.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) 

Here you need to type command "print". This shows you the list of partitions:

print
Model: WDC WD10EACS-00ZJB0 (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name                  Flags
 1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot
 2      210MB   1000GB  1000GB  hfs+         Bookshelf

(parted) 

Next thing, type "quit", and it will quit. Don't do anything else, it might have adverse consequences ;) as "parted" is actually for messing around with partition table.

So, now you got list of volumes on your hard drive, and next thing you can do is to mount it.

Step 4:

mount -t hfsplus /dev/sdd2 /volumeUSB1/

Choose the partition suitable for you (/dev/sdd2), and choose right file system--they all been shown on previous step. Now, do this...

Step 5:

ls -la /volumeUSB1/

...and see the magic (assuming all above has worked). To copy it to your NAS volume, figure out where to put it on your network shared folders. I.e. if you want to put files to default "NetBackup" folder, do this:

Step 6:

cp -r /volumeUSB1/ /volume1/NetBackup/

The "-r" flag means recursive. It will take some time, it won't be interactive--soo just watch files appearing in web interface until it's done.

Hope this would help.

P.S. And don't forget to turn telnet access off, it's not so secure.

Pavel Khr

Posted 2014-02-25T13:43:30.767

Reputation: 141

1Shared from elsewhere: if the partition is NTFS, use a command like "ntfs-3g /dev/NTFS_VOLUME /tmp/DESTINATION" to mount it. – Syzygy – 2017-12-05T21:08:49.263

2

I am now exactly in the same situation: I want to use a few old hard drives, which happen to be of the same size, to set up a RAID in my newly bought Synology DS414 NAS. The data on the first HDD could be deleted, so I just installed and formatted it. However with other HDDs I need to move data from them to the NAS first.

One of the hard drives is in the form of an external 3.5" USB2/eSATA hard drive. I've opened the casing and took the HDD out. Now I have a USB/eSATA cage and can use it to connect both 2.5 and 3.5 inch disks to my laptop or to the NAS.

Connection to NAS is like this: Notebook → WiFi → Gigabit Ethernet/WiFi router → PowerLine adapter → Fast Ethernet → DS 414.

I've done some experimenting.

  1. HDD in the cage connected with eSATA cable to my laptop. NAS is accessed via Windows file explorer on the notebook. File copying goes at the speed of 6 MB/s.
  2. HDD connected to NAS via USB2. NAS is accessed via Windows file explorer on the notebook. Files are moved in Windows, from HDD to NAS (both can be seen under Network>DS414). Speed: 2.2 MB/s.
  3. Same connection, files are moved using DSM File Station. Speed: 24 MB/s.
  4. Took the HDD and inserted it into the NAS. DS414 refused to see its content, so I could only format it.

I did not try: connecting NAS to the router (to achieve Gigabit Ethernet speed + eSATA). However, in my experience, Windows is very slow in copying hundreds of files just because it somehow addresses them one after another. It takes forever even if the files are small.

Summary: in my case, copying via USB2 using Synology operating system, was the fastest way to move files from a populated HDD to the NAS.

texnic

Posted 2014-02-25T13:43:30.767

Reputation: 448