Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Moving a share to a new disk

Featured Replies

I have currently have a disk that is dedicated to backups (disk4).  It is in the array and shared as a single disk share (in other words "include disk4").

I now need more space so I need to replace it with a larger disk.

The current backup disk is disk4, shared as Backup1 "Included disks: disk4".  The current root directory "/mnt/disk4" contains the following directories:

Backup1/

appdataBackup/

isos/

 

I don't know where the isos share came from. I don't remember creating it.

 

The new disk is disk10.  To copy all the files from disk4 to disk10, I will use this command:

 

rsync -avX /mnt/disk4/  /mnt/disk10/

 

Then I will delete all the files on disk4.

 

The I will change the Shares definitions as shown below:

 

appdata: excluded disks: disk10  use cache disk: prefer

appdatabackup: included disk: disk10 

Backup1: included disks: disk10

domains: excluded disks: disk10  use cache disk: prefer

isos: excluded disks: disk10  use cache disk: Yes  (note: this is really moving isos to disk10)

system: excluded disks: disk10  use cache disk: prefer

Videos:  excluded disks: disk10  use cache disk: prefer

 

Does this all seem right?  The rsync will create "Backup1" and appdatabackup at the root level of disk10.  What about isos?

Is there anything special about the order of copying and changing the Share definitions that would cause problems? 

 

Thanks in advance.

  • Community Expert
3 hours ago, CaptainTivo said:

I don't know where the isos share came from. I don't remember creating it.

It's a system share.

 

3 hours ago, CaptainTivo said:

The rsync will create "Backup1" and appdatabackup at the root level of disk10.  What about isos?

It will create all folders that exist on disk4, you can move the isos folder to cache with the mover before running rsync

  • Author

Thanks.  I did that.  Now only Backup1 and appdatabackup on disk4.

One thing: here is the order:

 

1. copy Backup1 and appdatabackup to disk10

2. delete Backup1 and appdatabackup from disk4

3. What happens to the shares "Backup1" and "appdatabackup" now?  Should I delete the shares using the Shares tab or should I simply change the settings to "include disks: disk10" ?

That is really the crux of my problem:  what is the procedure to "move" a share from one disk to another?

 

Thanks.

 

  • Community Expert
10 minutes ago, CaptainTivo said:

Should I delete the shares using the Shares tab or should I simply change the settings to "include disks: disk10" ?

You can just change the include settings, you can't delete the share since files from that share will exist on another disk.

  • Author
14 hours ago, johnnie.black said:

You can just change the include settings, you can't delete the share since files from that share will exist on another disk.

Hmm.  How does unRaid know this?  From it's point of view, the directory named Backup1 is on disk4.  After I copy and then delete this directory, the share should be empty, right?  Even though there is now a directory named Backup1 on disk10.  I'm very confused as to the mechanism used to enforce the shares.  What if I simply renamed Backup1 to Backup2?  Would the share still be there?  If so, would it be empty?  For me, this is one of the most confusing things about unRaid.  In all I have read, I have found no complete description of how this works.

 

  • Author

Yet another question:

Currently Backup1 is set to be the name of a share that resides solely on disk4.

When I copy Backup1 to disk10, two copies will then exist.  Am I guaranteed that any reference to Backup1 will go to disk4 and not disk10?

I ask because I have read elsewhere that simply creating a directory at the root level of a disk in the array will create a share.

Again, very confusing.  It is actually well-defined?

A data share is created for any top-level directory that exists on any of the disks in the array (including any cache drive).

 

if more than one disk has a top-level directory of the same name, the contents are merged together when viewing them vis the data share.

 

if files with duplicate path names on different disks exist in a share, then the file to be displayed will be searched in the order, cache disk then data disk in drive number order.  [Note, it is a bad idea to have such duplicates and you should avoid them so as it will lead to confusion about which is the ‘master’ version .... such duplicates usually only occur if you manually copy (rather then move) files between disks.]

 

The include/exclude setting only affects where new files are written;  they have no effect on the location of existing file.  So for example if you have files in a share on disk 4 and you add disk 4 to the exclude list, those files will still show in the share on disk 4, but any new files will be written to a disk other then disk4.

  • Author
51 minutes ago, remotevisitor said:

A data share is created for any top-level directory that exists on any of the disks in the array (including any cache drive).

 

if more than one disk has a top-level directory of the same name, the contents are merged together when viewing them vis the data share.

 

if files with duplicate path names on different disks exist in a share, then the file to be displayed will be searched in the order, cache disk then data disk in drive number order.  [Note, it is a bad idea to have such duplicates and you should avoid them so as it will lead to confusion about which is the ‘master’ version .... such duplicates usually only occur if you manually copy (rather then move) files between disks.]

 

The include/exclude setting only affects where new files are written;  they have no effect on the location of existing file.  So for example if you have files in a share on disk 4 and you add disk 4 to the exclude list, those files will still show in the share on disk 4, but any new files will be written to a disk other then disk4.

Thank you.  I have read some of this before, but, of course, it could have been for a different version of unRaid.

Is this information documented in Limetech docs or did you acquire it in through other means?  If so, where.

Thanks again.

 

So, here is my version of a safe way to "move" a share which has only one disk included:

1.  disable all writes to the share.  This would have to be done outside unRaid.  That is, kill/pause all processes that would write new files or update existing ones on the share.  This is necessary to prevented either "missing" a file as when rsync has already processed a given directory and another programs writes into that directory,

2. rsync from disk to disk.  During the copy unRaid will direct all reads to the current disk share.

3. after the rsync is complete there are now two disks with the same top level directories.  Use the "Shares" tab to modify the definition of the share to include only the new disk.  

4. delete all files from the original disk.  If a read occurs during this period, it will either succeed in reading from the original or from the the new copy on the new disk.

5. done.  All directories and files are now on the new disk and it is defined as the single disk in the share.

At this point, the old disk can be removed or used for a new or existing share.

 

Comments?

Edited by CaptainTivo
added procedure to move share from one disk to another

I’m afraid it is some time since I last read the official documentation so I cannot say how explicit it is in describing this.   Certainly the order that the disks are currently searched I have learnt when Tom responded to a posting in the forum.

 

What you describe will certainly work fine.

 

Another way would be to use the Unbalence plugin to copy the files between disks for you ... it effectively generates the necessary rsync command for you and deletes the files that are transferred.    It will prevent you hitting the "Data share / Disk share" problem ...

 

Never copy files between a Data share and a Disk share (or vice versa)!  This will result in the copied files being zero length.

 

Data share to another Data share is fine, and so is Disk share to Disk share.

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.