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.

mirror a folder.

Featured Replies

Hi,

 

I don't know if this exists, so I put it in the feature request area.

 

Basically, I have a folder that I am super paranoid about and I want to make sure I don't lose the data in there. The data is only a few gigs and doesn't take too much space and I will create that folder to use 1 hard disk.

 

What I'd like to be able to do is set unRAID to mirror the content of that folder onto another hard drive in there. This way in the unlikely chance that 2 hard drives die, I won't worry about possibly losing the content of that hard drive.

 

Is this something I can setup as a cron job for example or something I can put in the go file?

This can be very easily acheived with rsync and cron. There are countless posts on how to do this and its worth having a quick look at them.

 

It will be something as simple as adding:

 

/usr/bin/rsyncrsync -r /mnt/disk1/blah /mnt/disk2/blah

 

to cron.

This can be very easily acheived with rsync and cron. There are countless posts on how to do this and its worth having a quick look at them.

 

It will be something as simple as adding:

 

/usr/bin/rsyncrsync -r /mnt/disk1/blah /mnt/disk2/blah

 

to cron.

Might I suggest that a different folder name be used on the second disk.  The reason is simple, the user-shares feature will complain about the duplicate file names in parallel identically named folders, and only one of them will be visible through user-shares...

(I think its the one on the lower numbered disk)

 

Also, I think you have a tiny typo..  It is /usr/bin/rsync  not /usr/bin/rsyncrsync

 

Joe L.

Joe to the rescue. Thanks for the save :)

  • Author

Thanks guys, i'll do a search for rsync.

 

Will this conflict with the directory cache trick if it sees a duplicate file?

 

If it does, as a work around can i create a hidden folder ".backup" for example and then the directory cache trick will just skip over that folder?

 

and one last thing, if that folder does not exist in the unRAID interface, will the parity disk still look at that data?

What I'd like to be able to do is set unRAID to mirror the content of that folder onto another hard drive in there. This way in the unlikely chance that 2 hard drives die, I won't worry about possibly losing the content of that hard drive.

Actually, you need FOUR copies if you are that worried about the loss.

 

Two copies are not enough...  If you have the original files on disk1, and a second copy on disk2 and then something happens where the two disks that fail are disk1 and diak2, then your files are gone.  Parity can't help you...  You can still lose the files with a two disk failure.

 

If you have copies on three disks, then it will take all three disks to fail before you have no readable copy...

Or ONE good fire/flood/tornado/lightning hit/disaster that takes out all three copies... and you will still lose your files.

 

That is why I said you need at least FOUR copies...  The 4th copy is physically elsewhere, in a different location... It could be burned to a DVD placed in a bank safe-deposit box, or a friend or relative's house, or in a USB flash drive, or portable hard disk kept at work.

 

Joe L.

  • Author

What I'd like to be able to do is set unRAID to mirror the content of that folder onto another hard drive in there. This way in the unlikely chance that 2 hard drives die, I won't worry about possibly losing the content of that hard drive.

Actually, you need FOUR copies if you are that worried about the loss.

 

Two copies are not enough...  If you have the original files on disk1, and a second copy on disk2 and then something happens where the two disks that fail are disk1 and diak2, then your files are gone.  Parity can't help you...  You can still lose the files with a two disk failure.

 

If you have copies on three disks, then it will take all three disks to fail before you have no readable copy...

Or ONE good fire/flood/tornado/lightning hit/disaster that takes out all three copies... and you will still lose your files.

 

That is why I said you need at least FOUR copies...  The 4th copy is physically elsewhere, in a different location... It could be burned to a DVD placed in a bank safe-deposit box, or a friend or relative's house, or in a USB flash drive, or portable hard disk kept at work.

 

Joe L.

 

Thanks, i'll work on getting 3 on the server, I already have the 4th backup setup.

 

What about regarding Directory cache and parity that I had asked above?

What about regarding Directory cache and parity that I had asked above?

Not sure I understand the question.  Please clairify.

 

The cache drive is not protected by parity at all.  Everything on the normal "disk" drives is protected by parity, regardless of name.

  • Author

Sorry for not being clear.

 

Ok, so another add-on i'd like is the ls -R trick for Directory Caching.

 

But as i was reading the forums, people stress to ensure we do not have duplicate named files or else there will be a lot of errors.

 

So my question is, if i have the content duplicated on the hard drive, how can I ensure this does not occur. (One thing I can think of is setting up the backup folder as hidden...).

 

 

Ok and my second question is:

 

I understand the concept of a parity disk, but I don't udnerstand exactly how unRAID uses it. Therefore if I manually create the folder in linux for the backup and unRAID does not know about it, will the parity disk still take that data into consideration?

Sorry for not being clear.

 

Ok, so another add-on i'd like is the ls -R trick for Directory Caching.

This has long since been improved upon.  Check out the cache_dirs add-on.

http://lime-technology.com/wiki/index.php/Improving_unRAID_Performance#Keep_directory_entries_cached

But as i was reading the forums, people stress to ensure we do not have duplicate named files or else there will be a lot of errors.

You are slightly confused, there is no problem with files with identical names.  The issue occurs when you have two files, with identical names, in identical paths, on two different disks.  If /mnt/disk1/Pictures/joe.jpg has a picture of me, and /mnt/disk2/Pictures/joe.jpg has a picture of me, then when I look at /mnt/user/Pictures/joe.jpg which will I see?  Obviously, it can't point to both. 

 

In the same way, if you have two identical file-path/file-names it will print that fact in your syslog every time the /mnt/user file system directory is accessed.  If you have enough files duplicated, or scan it frequently, you could fill all your memory with log entries and end up with not enough to run the server otherwise.

 

It is perfectly OK to have /mnt/disk1/Pictures/joe.jpg and /mnt/disk2/Pictures/backup_versions/joe.jpg as they have different paths.    You do not need to hide one set, in fact, that will be difficult unless you manually create your own samba configuration file.

So my question is, if i have the content duplicated on the hard drive, how can I ensure this does not occur. (One thing I can think of is setting up the backup folder as hidden...).

Just use a different top-level folder name for the copies. 

Ok and my second question is:

 

I understand the concept of a parity disk, but I don't udnerstand exactly how unRAID uses it. Therefore if I manually create the folder in linux for the backup and unRAID does not know about it, will the parity disk still take that data into consideration?

All of the disks in unRAID are parity protected except the cache drive, no matter how you create the files on them, or what program you use, parity is maintained.  (there is a tiny exception, but you have to stop the array, mount the disks as individual file-systems on your own, and then use them.... 99.9999% of unRAID users will never do that, since 98.9999% probably wouldn't even try... or know how to try, and the other .00001 know better than to purposely cause bad parity by writing to a disk without the unRAID array started.

 

If you can get to the disk from /mnt/user, or from /mnt/disk[1,2,3,4,5,6,7,8,9...] then you are parity protected.  You can create directories in linux, and unRAID will know of them, and keep parity in sync.

 

Joe L.

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.