SOLVED Moving Storage without creating a large snapshot

Status
Not open for further replies.

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Hi,

I'm currently looking to move my media collection from one dataset to another. I currently have an anime collection that I would like to keep separate from the family media folder. I have thought of just creating a separate subfolder and then allocating separate permissions for that. But I would like to keep my collection short, neat and organized.

So, I was wondering,
1. If I move my files from one dataset to the other, would that create a large snapshot cause I moved a large chunk of data from one dataset to the other? I know it won't if u move between folders. Just wondering if it would do for Datasets.
2. Also, if it wouldn't what program would you think be best suited for this task? - IE: Rsync, CP, Snapshot replication etc...?

I would be grateful for your help,

Thanks in advance,
Michael L.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
1. If I move my files from one dataset to the other, would that create a large snapshot cause I moved a large chunk of data from one dataset to the other? I know it won't if u move between folders. Just wondering if it would do for Datasets.
This is difficult to answer without knowing what type of snapshot setup you have configured. Do you have one snapshot that is reserve for your entire pool? Do you have per dataset snapshots?

2. Also, if it wouldn't what program would you think be best suited for this task? - IE: Rsync, CP, Snapshot replication etc...?
There are many ways to skin a cat, but for my money, I have had good success with just SSHing into the box then using the "cp" or "mv" command to move the data (with appropriate arguments such as -P to preserve permissions). Using this method, my box hovers around 80% utilization (via GUI charts) of all disks involved in the transfer.
 

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Hmm, I created recursive periodic snapshot tasks using GUI and the volume/dataset they point to is one below the root pool. So for example
Code:
Volume XYZ 
>>(DatasetA)
>>>>Dataset1
>>>>Dataset2
>>>>Dataset3

The snapshot task is pointed to Dataset A (in brackets).

hmm, if its cp vs mv then I will use mv. I heard that mv just changes pointers and doesn't move the files. I will try that.
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
mv can skip data copying only when both source and destination are within the same file system/mount point. Between different datasets it will turn into regular copy.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Moving between data sets will double your pool usage if you have the old data set snapshotted.
 

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Hmm, in that case, I will need to delete all the snapshots relating to that dataset. Is there a method to remove all snapshots from a selected dataset? This is my media collection, so I don't think I will need to keep snapshots.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Is the size of the data you plan to move large compared to the available space on the pool?
Would having two copies leave the pool at more than 80% utilization?

If not, consider not being in such a hurry to delete the old copy, at least until you're 100% sure you didn't screw anything up during the transfer. If nothing else, make a snapshot with a relatively short expiry, e.g. between 1 week and 1 month, to give you enough time to verify the results.
 
Joined
Dec 2, 2015
Messages
730
Is there a method to remove all snapshots from a selected dataset?
zfs destroy -rv <pool_name>/<dataset_name>@% will destroy all snapshots on that dataset. Before you run that command, run it with the "n" flag for a dry run, to see the list of snapshots that would be destroyed.

i.e. zfs destroy -rvn <pool_name>/<dataset_name>@%
 
Last edited:
Joined
Dec 2, 2015
Messages
730
Status
Not open for further replies.
Top