NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Blues11
Apr 04, 2021Luminary
Best practice for rearranging large directories
Situation: I have two large Shares (one is about 4TB, the other about 2TB) on this ReadyNAS with four 8TB drives in a RAID5 X-RAID configuration. Of the available 23TB, about 15TB are free. The large...
Sandshark
Apr 04, 2021Sensei
Are you comfortable with a command line interface? Using SSH to access the Linux command line of the NAS and then issuing commands from that is the fastest way to accomplish what you want. As long as you are not moving files between shares, it will just move the pointers to the files, not the file content.
StephenB
Apr 04, 2021Guru - Experienced User
Blues11 wrote:
To make access easier, I'd like to amalgamate those 4 top level directories into one large directory with about 2200 directories.
You might find that easier, but browsing will likely be quite a bit slower.
- Blues11Apr 05, 2021Luminary
StephenB and Sandshark, thank you for your responses.
First, I'd forgotten about the Move command in Unix and that it simply updates the index, not the files themselves.
Upon reflection, I looked at the amount of space available on the ReadyNAS and realized that I could just do a copy because the amount of data is not that large. Then I thought about the access speed and whether four directores with a few thousand subdirectories will really be noticeably speedier than having all of them just below one high level directory.
So, I decided that I'd test my supposition in a new share. So far, I've copied 900+ directories onto the new share and I have not noticed any slower access speeds. I think I'll go ahead and continue to copy all the files onto the new share and see if the speeds become slower. If everything works OK, then I'll delete the old share with the four top level directories and their data and free up the terabytes of space.
If you're interested, when I'm done I'll post again and let you know.
Thank you both so much for your knowledge and desire to share it.
- SandsharkApr 06, 2021Sensei
Blues11 wrote:StephenB and Sandshark, thank you for your responses.
First, I'd forgotten about the Move command in Unix and that it simply updates the index, not the files themselves.
It doesn't really apply to you any longer, but for completion's sake for anyone else looking for solutions, a mv between shares does do a copy and delete on a ReadyNAS because shares are BTRFS sub-volumes. mv between directories in the same share does not. Those can be important when using snapshots. A mv between directories won't totally re-snapshot the content, but one between shares will. So the mv between shares will still have the file in the snapshot of the first share as well as being on the new one, taking addiitonal space until purged.
- StephenBApr 06, 2021Guru - Experienced User
Sandshark wrote:
a mv between shares does do a copy and delete on a ReadyNAS because shares are BTRFS sub-volumes.Yes. But you can do a cp --reflink between shares - which is the same speed as a mv, and doesn't add any space. Then do a delete of the original.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!