diskmv -- A set of utilities to move files between disks


Recommended Posts

  • 4 months later...

I was pointed to these posts as a way to re-group my TV Shows so they are not spread across two disks.  I however do not wish to pass in a target disk but re-group to the same disks they are currently on.  Im not sure if this will work ?

 

My issue :

 

After creating my TVSwhows share - MediaTVShows over two disks, and having the default automatic split, I now have stuff spread over the two disks.  These two 4TB disks have about 600Meg free on each.  I dont have another disk to 'move/consolidate' too - so I wish to do this to the same disks.

 

My structure :

 

Top Dir - media-tvshows

Second Dir - TVShow Name

Third Dir - Season XX

Fourth Dir - Episodes

 

so, after reading this thread, the colsolidate command seems like it can do this - but I want the target disks to be the same disks the stuff is already on.

 

Can a script do this ?

 

Thanks.

 

Link to comment

Never mind - I manually sorted it. (drives are disk2 and disk3)

 

I used krusader to compare the tv shows between the two disks, then used unbalance to select the TV shows that existed on both drives, then it said I would only need 150GB of transfers to move the scattered stuff it back to disk2.  That is running now.

 

Going forward, I have changed the share to NOT automatically split so hopefully the issue will not happen again.

Link to comment
  • 3 years later...
On 8/3/2016 at 10:03 PM, korpo53 said:

Use Putty to remote into your server

 

 

mkdir /boot/scripts
wget https://raw.githubusercontent.com/trinapicot/unraid-diskmv/master/diskmv -O /boot/scripts/diskmv
wget https://raw.githubusercontent.com/trinapicot/unraid-diskmv/master/consld8 -O /boot/scripts/consld8
echo "ln -s /boot/scripts/diskmv /usr/sbin" >> /boot/config/go
echo "ln -s /boot/scripts/consld8 /usr/sbin" >> /boot/config/go
 

 

That'll:

 

  • Create a directory to hold the scripts that survives reboots.
  • Download the scripts to that directory.
  • Add lines to your startup script to create symlinks (shortcuts, sort of) to those permanent files in a non-permanent space that makes them more usable.

 

After doing that, if you don't want to reboot, you can just run the below to create the symlinks right now. They'll get recreated every boot by the go script, so you only have to do this part the first time.

 

ln -s /boot/scripts/diskmv /usr/sbin
ln -s /boot/scripts/consld8 /usr/sbin
 

 

 

 

 I am hoping for a little help I tried installing using the method described but I am getting permission denied errors. I was hoping someone could help me figure out what is wrong. Thanks

Link to comment

I suspect the instructions are no longer accurate as in the last few Unraid releases security has been tightened so that files on the flash drive are not allowed to have execute permission.

 

instead of using a link as suggested you need to copy the files elsewhere (such as /user/local/bin) and give them execute permission.

Link to comment
On 1/12/2022 at 4:18 PM, itimpi said:

I suspect the instructions are no longer accurate as in the last few Unraid releases security has been tightened so that files on the flash drive are not allowed to have execute permission.

 

instead of using a link as suggested you need to copy the files elsewhere (such as /user/local/bin) and give them execute permission.

Or you can just "bash" them into submission.....

 

so instead of just doing

 

diskmv blah blah2

(which will fail as no execute permission on diskmv)

 

do 

 

bash diskmv blah blah2

 

 

Link to comment

Thanks @Meles Meles I am trying to use the consld8 script and  earlier in the thread it says to execute it by using this comand 

 

Quote

find "/mnt/user/Media/Movies" -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 -n 1 consld8 -f

 

if i were to bash would I put it before find? Sprry for my ignorance is its and obvious answer just trying to learn. 

Link to comment
On 1/22/2022 at 6:08 AM, Shaboobala said:

Thanks @Meles Meles I am trying to use the consld8 script and  earlier in the thread it says to execute it by using this comand 

 

 

if i were to bash would I put it before find? Sprry for my ignorance is its and obvious answer just trying to learn. 

 

 

you'd put it just before consold8

 

find "/mnt/user/Media/Movies" -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 -n 1 bash consld8 -f

 

Link to comment
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.