NASLite Network Attached Storage

www.serverelements.com
Task-specific simplicity with low hardware requirements.
It is currently Sat May 24, 2025 2:13 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Using rsync to copy.
PostPosted: Fri Aug 08, 2008 4:48 am 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
I wanted to test this out to copy data off my NASLite-2 CDD to a ubuntu server. On the ubuntu server I typed this:

Code:
root@green:/usr/share/disk-0# rsync -avn 192.168.2.80:/Disk-0 /usr/share/disk-0
ssh: connect to host 192.168.2.80 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at io.c(454) [receiver=2.6.9]
root@green:/usr/share/disk-0#


Why did it not work? I can only think I don't have Disk-0 on NASLite-2 CDD that is 192.168.2.80 set right.

On the NASLite-2 CDD it says "3 - RSYNC [ RO ]" Read Only I guess. The rsync command should of just read from it.

-Raymond Day


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Fri Aug 08, 2008 9:52 am 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
I like to test if this works for when NASLite M2 comes out. To copy the files over to it from my NASLite-2 CDD.

I seen you can turn rsync on and it's set for read only in my NASLite-2 CDD. So it should work. I guess I have to use port 21 not 22 like rsync is using. I don't know how to change the port if that is why it's not working.

-Raymond Day


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Fri Aug 08, 2008 6:44 pm 
Offline

Joined: Sun Jul 09, 2006 10:26 am
Posts: 428
Location: UK
Hi Raymond,

using rsync within naslite is only a matter of setting the IP, disk to be mirrored, and time.

Remote
192.168.1.50/Disk-2/20

local
/Disk-2/20


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sun Aug 10, 2008 8:43 am 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
Thanks to gaiden I found out what he was talking about.

I did not know NASLite had the rsync so you could do it from the menu.

I wanted to test this. I set up a new temp NASLite-2 HDD and wanted to test copying all the files I have on my NASLite-2 CDD.

So I telnet to my NASLite-2 CDD one I went to:

3 - Storage Configuration
0 - Disk-0, IDE-0-0-0-0
9 - Mirror to Disk-0 [ 192.168.2.168/Disk-0/8 ]

I was looking on the new one that is 192.168.2.168 and never seen any files copied to it. I was changing the last hour time on it like 3 times thinking I had the time wrong. But then when I checked my CDD one all the files were gone! A long MIRRORLOG.TXT was there saying all the folders and files it were deleted, 190GB of files!

I should of set it to RO only on it! I got mixed up. Have to set up the Mirror on the NASLite you want to send the files too. Now I know that.

I don't know how to turn off this Mirror now? I pressed 9 and type NONE in there but that don't work. How do you set it back to NONE?

It's good thing I still have all them files I copied to a Ubuntu server with scp copy. But I chmod them all to 777 because I could not save to the folders.

I guess I will have to set up the NASLite-2 CDD hard drive on the Ubuntu server now to copy the files back to it. But what chmod number should they be with NASLite-2?

It be neat if I could find the Ubuntu Mirror type command or rsync that would work with NASLite.

-Raymond Day


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sun Aug 10, 2008 10:59 am 
Offline

Joined: Sun Jul 09, 2006 10:26 am
Posts: 428
Location: UK
Hi Raymond,

Sorry to hear that you deleted your files, I did explain in the pm that you have to go to the HD you want the copy made to. easy mistake to make.
lucky u had a backup.. good idea.

To remove the mirror go to the drive where you have it setup and enter the mirror options.
press 9 mirror to Disk-1 then dont enter anything and press enter again, it will ask you if you want to disable mirroring, select y. the mirror should now say NONE.
Now you have to save the config and reboot.


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sun Aug 10, 2008 11:45 am 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
Thank you Gaiden.

I thought I did just press Enter on a blank line but it just does nothing then. The mirror stays there. Maybe I did it wong some how.

I had to take both systems down again to copy this back. The Ubuntu server I could use and just hook the empty NASLite-2 CDD IDE hard drive on it.

All I had to do was mount and scp copy the files back to it like this:

mount /dev/sda1 /root/naslite
scp -rp /usr/share/disk-0/* /root/naslite

Now that I mounted it I can open the file MIRROR I can see it's a chmod of 0400 that's why can't read it in NASLite. I can see it has the mirror command in it. I was thinking to delete that file then it would change it to NONE but I will do what you said Gaiden. I hope that works.

Before I started to copy I chmod all the files back to 744.

I guess it will take close to 2 hours to copy it from a SATA drive to a IDE drive.

Going to set it to RO then so it can't wright to it. I should of done this before. But I thought I had the mirror command right.

It's to bad the rsync from Ubuntu to NASLite will not work. It just wants to sent to port 22 not port 873 like NASLite uses. Even when I put in a port number in the rsync command like --port=873 it comes back with error on port 22 still.

I just hope this is the last time I have to take the PC's down and hook up the hard drives to them to copy.

-Raymond Day


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sun Aug 10, 2008 12:07 pm 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
O I just did that and it does ask
Quote:
Do you wish to disable Disk-0 mirroring?
I think I was just pressing enter and not Y to disable mirroring.

Thanks again Gaiden.

-Raymond Day


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sun Aug 10, 2008 12:26 pm 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
It took about a hour to copy.

But I seen the NASLite-2 CDD is in ext2. I all ways thought it was in ext3. Is ext3 better?

O I think I have to run the
Quote:
APPLY JOURNAL TO DISK-0 FILESYSTEM
It should say Apply ext3 to disk-0. Something like that. I would of know what it ment better then. If that is what this does?

-Raymond Day


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sun Aug 10, 2008 12:54 pm 
Offline

Joined: Sun Jul 09, 2006 10:26 am
Posts: 428
Location: UK
Hi Raymond,

apply the journal

Some reading 4 you.
http://en.wikipedia.org/wiki/Ext3


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sat Aug 16, 2008 3:41 am 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
After all this time no on could say on here what command to use to copy with rsync from the NASLite to a Linux box.

With help from a person that uses rsync a lot. He showed me how to use it. So with this one line command it started to copy every thing in Disk-0 !

Code:
rsync -av 192.168.2.80::Disk-0 .


This will copy every thing to the folder you did the command in.

He showed me how you can list all the folders it shares out with a command like this:

Code:
rsync 192.168.2.80::
Or could put it's name like this
Code:
rsync NASLite::
He said because the NASLite is a server you use the two ":".

It looks like you can't use the name but only the IP.

You can list the folders like this:

Code:
rsync 192.168.2.80::Disk-0/


Then if you just want to copy a folder like this:

Code:
rsync -av 192.168.2.80::Disk-0/test .


Or if you just want to test what it will do add a -n in like this:

Code:
rsync -avn 192.168.2.80::Disk-0/test .


That would copy every thing in test folder on the NASLite to the folder your in when you type the rsync command. Or they call it the mirror in NASLite.

A big thank you to Brian who told me how to use this in email. But he don't have a NASLite.

-Raymond Day


Last edited by Raymond Day on Sun Aug 17, 2008 5:49 am, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sat Aug 16, 2008 10:22 am 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
After the rsync copy of about 190 GB of data it tells about it like this:

Quote:
sent 156667 bytes received 222688568362 bytes 9388028.29 bytes/sec
total size is 222660876370 speedup is 1.00


I am very happy found out the rsync right command that works witht the NASLite!

-Raymond Day


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Sat Aug 16, 2008 4:15 pm 
Offline

Joined: Sat Nov 19, 2005 6:39 pm
Posts: 633
Location: California
Thank you, Raymond, for posting back and sharing what you have learned ... very useful to me, and -- I think -- for others in the future :D

:) Georg


Top
 Profile  
 
 Post subject: Re: Using rsync to copy.
PostPosted: Wed Dec 03, 2008 12:43 am 
Offline

Joined: Mon Sep 11, 2006 10:38 am
Posts: 231
Location: Belleville MI
They should put in this:

9 - Mirror to Disk-0 from

Or:

9 - Mirror to this Disk-0 from

That's just adding the word from to it.

Then it would be hard to mix it up. It be neat to have a way to say mirror it now too not at the next hour.

-Raymond Day


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group