DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2014-10-27 13:06:53

Buzzcut
Member
Registered: 2014-10-27
Posts: 5

Connecting 3 TB drive via USB, not seen on DNS-320

Hi all,

I've got a single 3TB drive in the NAS, running ffp and am running weekly backups to a USB 3TB drive via rsync.  It's all working fine but only if I format the USB drive as a standard MBR 2TB partition (the other 800gb is unallocated in windows), if I format as GPT with the full 3TB then the drive never gets mounted using "df" on the NAS.

I'm only using about 1.2TB at the moment so don't really need more than the 2TB I'm currently using, but sooner or later I'll need the full 3TB.

Has anyone got any tips/commands etc. on how to get the full 3TB mounted and showing on the NAS? 

Thanks,

Dan

Offline

 

#2 2014-10-29 11:38:20

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Connecting 3 TB drive via USB, not seen on DNS-320

Have you looked at dmesg, after inserting the 3TB disk, with MBR and GPT partition table?

Offline

 

#3 2014-10-29 13:09:39

Buzzcut
Member
Registered: 2014-10-27
Posts: 5

Re: Connecting 3 TB drive via USB, not seen on DNS-320

Thanks for the reply...

BUT..I'm taking a step back from that issue for the moment, that will come later.  Before I get to that I need to dump 1.2TB from one 3TB drive to another, I was using an old 3TB drive in the NAS that was running very hot but have just bought a 3TB WD Red drive that runs miles cooler.

So..

I followed this post http://dns323.kood.org/forum/viewtopic.php?id=7435 which seemed to have a great solution, suggested by yourself, but it didn't seems to work for me.  Clonezilla also failed by the way.

I connected both drives to my PC via SATA, booted a live Ubuntu disk, used "df" to find the correct source and target,  deleted all partitions from the target using fdisk.  When I followed the instructions I expected that only 1.2TB of data would transfer, instead the copying kept going for the full 3TB (which took all night at 97MB/s).  When it had finished copying I stuck the new drive back in the NAS but was greeted by the "Choose RIAD type/format disk" screen instead of seeing my files.

One thing I just realised I didn't do was to use GParted to increase the partition size, would this have an effect?  I'm also thinking that I should've just formatted the destination as NTFS/GPT rather than deleted all the partitions.  The thing that really confused me was why it copied all 3TB rather than just the 1.2TB of data that was on the drive (maybe that's just how dd works?).

I did all this just as I left for work this morning so didn't really get a chance to check the data on the drive.  I'll have another look when I get home tonight.

Thanks,

Dan

Last edited by Buzzcut (2014-10-29 15:59:24)

Offline

 

#4 2014-10-29 21:10:42

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Connecting 3 TB drive via USB, not seen on DNS-320

It's not clear to me what you actually did. I didn't give any instructions in that thread?

Anyway, dd is a lowlevel (lower is almost impossible) copy tool. It will copy a source file to a destination file. No more, no less. Because in linux everything is a file, even if it isn't, you can also use it to copy disks. In your case the command would have been:

Code:

dd if=/dev/sdb of=/dev/sdc bs=32M

providing your source disk is sdb, and the destination is sdc. The bs=32M is to specify the block size. Without it it will copy blocks of 512B, which is inefficient for modern disks.
This way a binary copy of the whole disk is made, including partition table to and non-used space. So yes, it will copy the whole 3TB.

Offline

 

#5 2014-10-29 22:37:54

Buzzcut
Member
Registered: 2014-10-27
Posts: 5

Re: Connecting 3 TB drive via USB, not seen on DNS-320

Hi,

Sorry I should've been clearer.  I did this after connecting both 3TB drives.

=================

sudo fdisk -l

sudo dd if=/dev/sdc of=/dev/sdb bs=4096 conv=notrunc,noerror,sync

To see how the progress is going I typed

pgrep -l '^dd$'

to get the process number. Then typed the following to get the progress...

sudo kill -USR1 3093

The process finished without error in about 10 hours

=================

If I connect the original then everything appears normally in my NAS, the files are all there.  If I connect the cloned drive then I'm pushed to the "Format Drive" page.

I reconnected both drives to my PC again, ran Ubuntu from the disk and used Gparted to check them out.  They're completely identical!  The ONLY thing I could see that was different was the different UUID on the Swap partitions, the other 3 partitions were the same size with the same UUID and label.  I could also browse both sets of files using the file manager.

It seems that that something is different on the cloned drive but I don't know what....very strange.  I wonder if the block size I used had any effect?

I'm just wondering, would I have to create an initial GPT partition called "Volume_1" (as that's what the NAS creates) before I use the dd command, I'm thinking no as dd copies bit-for-bit and should create all those volume labels in the copying process.

I've got a feeling I'm very close but can't really think of how to get the NAS recognising the cloned drive.

Thanks...Dan

Offline

 

#6 2014-10-30 14:07:30

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Connecting 3 TB drive via USB, not seen on DNS-320

Long shot. Does the clone have a different number of sectors? Maybe the NAS checks for relative partition sizes, which might give a different result if the disks are not *exactly* as big. If that is true, you'll have to find the script, to find out how you should resize the partitions.

Buzzcut wrote:

I wonder if the block size I used had any effect?

No. Yes. It had impact on the copying speed, but not on the final result.

I'm just wondering, would I have to create an initial GPT partition called "Volume_1" (as that's what the NAS creates) before I use the dd command, I'm thinking no as dd copies bit-for-bit and should create all those volume labels in the copying process.

That's right. The partition table is on the disk, so it's overwritten.

Offline

 

#7 2014-10-31 13:54:27

Buzzcut
Member
Registered: 2014-10-27
Posts: 5

Re: Connecting 3 TB drive via USB, not seen on DNS-320

Well, all partitions are all the same size according to Gparted...I think I'm going to give up on that route.

I've decided to do the following.

- Format the new drive in the NAS
- Connect both drives to the PC running Ubuntu
- Use rsync to copy the data across to the new drive (running now at about 100MB/s)
- Format the old drive to NTFS (on Windows/Ubuntu/Nas, not sure yet)
- Connect drives to PC again and use rsync to copy the data back to the old drive

THEN I'll be back to my original question of how do I get the NAS to recognise the USB 3TB GPT NTFS partition.  Maybe I'll try to get the empty external USB recognised before I copy the data in the last step, at least I won't be wasting another 5 hours.

I just wish the original dd copy had worked, oh well!

Thanks for the suggestions so far anyway.

Dan

Offline

 

#8 2014-11-03 12:40:48

Buzzcut
Member
Registered: 2014-10-27
Posts: 5

Re: Connecting 3 TB drive via USB, not seen on DNS-320

Time to put this one to bed as everything is now working.

- The data is now on the new WD Red
- The USB drive (the old drive in the NAS) was automounted as a 3TB EXT
- rsync is crond once a day to do the backup
- The NAS also sends me an email when the backup starts and finishes, complete with a tail output of the activity and the times

Thanks for the help, I've learnt more about linux in the past week than I have in the past 5 years!

Dan

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB