Adding a new drive to replace a whole set of disks, how to move the data

Status
Not open for further replies.

jbdimanche

Cadet
Joined
Jun 9, 2012
Messages
4
Hello all,

I am extremely a file system noob, but have been reading and trying to learn. I have a question for you experts out there and want your advice. Note that I use a stripe method because I don't need anything fancy and just basically need an online storage to keep all my videos and backup files.

I currently have a system using FreeNAS 8.2.0 BETA3 with a ZFS Raid0 (stripe) pool that consists of 3 drives amounting to roughly 2TB (1 x 1TB and 2 x 500GB). I bought a 3TB drive, that I want to insert into the NAS and move all the data from one to the other so that I can delete the 3 drive pool and remove the 2 x 500GB drives.

Basically my question is, is there any way to move the data from one volume to the other and all the shares related?

If not, what would be the fastest way to copy from one volume to the other? I am able to set up the new drive as a new volume and copy things that way, but as you can imagine going across the network and back out the network is quite slow. Or would this just be better achieved by just using a shell to the NAS and doing a unix copy from old to new mount points?

Thank you for any assistance or ideas that you might be able to provide.
 

peterh

Patron
Joined
Oct 19, 2011
Messages
315
The best and fastees way is to do what you alredy know :
- install the 3TB drive, create a pool and volume
- start a shell on the NAS and copy
( cp -a olddir newdir ) or
pax -rw olddir newdir
 

jbdimanche

Cadet
Joined
Jun 9, 2012
Messages
4
Thank you for the reply. Yes, I ended up installing the drive, and doing a copy over. Went fast enough, and renaming the mount points and shares was easy, not sure why I was so hesitant about it in the first place since I'm extremely comfortable in a unix environment. Guess I was just getting confused with LVM pools where you can tell the LVM to move the data off the drives you wanted to extract.
 

jlray

Cadet
Joined
Jul 3, 2012
Messages
9
Thank you for the reply. Yes, I ended up installing the drive, and doing a copy over. Went fast enough, and renaming the mount points and shares was easy, not sure why I was so hesitant about it in the first place since I'm extremely comfortable in a unix environment. Guess I was just getting confused with LVM pools where you can tell the LVM to move the data off the drives you wanted to extract.

What about some hidden files for share control? Did you copy them as well? This is what bothers me. I've read somewhere that there are hidden folders and files that use to lock/unlock files for share.
 

peterh

Patron
Joined
Oct 19, 2011
Messages
315
if ( pax -r -w -p e <from> <to> ) to copy everything is copied.
( there is no hidden files that unix utilites cannot copy)
 

jlray

Cadet
Joined
Jul 3, 2012
Messages
9
if ( pax -r -w -p e <from> <to> ) to copy everything is copied.
( there is no hidden files that unix utilites cannot copy)

Will copying or moving these files mess up with the sharing?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
Will copying or moving these files mess up with the sharing?
Copying, no. Moving, if you move a folder that was shared yes. Otherwise no.
 

jlray

Cadet
Joined
Jul 3, 2012
Messages
9
Copying, no. Moving, if you move a folder that was shared yes. Otherwise no.

So the best practice to move a folder is
1. stop/delete the share.
2. move the folder.
3. create share pointing to new location
 
Status
Not open for further replies.
Top