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 data from one disk to another in order to shrink unraid [SOLVED]

Featured Replies

I was thinking of using this command

 

rsync --progress -avh /mnt/disk1/ /mnt/disk5/

 

Would it maintain the file date or create a new file with a new date on the target disk?

 

I really want to preserve the file date, if at all possible.

You use –t to preserve modification time. -r is recursive (copy directories). Suggests this:

 

rsync -avrth --progress //mnt/disk1/ //mnt/disk5/

 

I assume that you are using Disk shares only? If you are using User shares this is not a good solution.

The script will also only copy data, files will still remain on disk1.

Also test everything first with --dry-run so you know it’s working.

 

Some reading: https://download.samba.org/pub/rsync/rsync.html

  • Author

I believe I am using disk shares only. Not sure what user shares are. I only have kept a single user, root, on the server.

A User share can span several disks but a Disk share is assigned to a single disk (has nothing to do with user accounts).

User_shares.png.4822082c88aa4e79e36cc9b962a90076.png

  • Author

Then I have plenty of user shares. Why would this be a problem? Basically I setup an unraid folder on each drive, and I place movies and tv series in two subfolders. Once each disk fills up, I move to the next one and maintain the same directory structure.

I am planning to copy the data across, delete it so I can free up the drive, and then remove the drive and recalculate parity.

I just tested it on a directory with just a couple of files and it did copy the data across, maintaining the same data that was in the other drive.

So what issues will I encounter by using this command, with the shares I have?

 

With the setup you describe you should be fine. Some have their individual folders split over several disks so if you have a folder with several files (movie, subtitles, posters etc) they can actually be located on different disks.

  • Author

Thanks for confirming. How do I make sure that all the file transferred ok before I delete the original?

Also is there a command to delete the only directory on disk5, once the copying is done or shall I just use a windows machine to delete the directory?

Thanks

You can use Windows to delete all folders and files and once your user share (the top level folder) is empty you can delete it in User Shares (unRAID GUI).

 

rsync can be setup to verify files during copy and probably verify afterwards as well. Haven’t done it myself so try Google it.

  • Author

Testing with:

rsync -rvnc //mnt/disk5/ //mnt/disk9/

Let's see if it finds any file differences between disk 5 and disk 9

  • Author

Result:

 

root@Tower:~# rsync -rvnc //mnt/disk5/ //mnt/disk9/

sending incremental file list

 

sent 59095 bytes  received 296 bytes  5.12 bytes/sec

total size is 462974754826  speedup is 7795368.91 (DRY RUN)

 

I also tested with

root@Tower:~# diff -rq //mnt/disk5/ //mnt/disk9/

it showed results "only in //mnt/disk9/...

 

Deleting data from disk 5 now...

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.