February 1, 201610 yr I am in the process of migrating my data from an old NAS to my new unRAID server. I started with a single empty disk on my unRAID server, created a share (call it ShareA) and filled it up with a bunch of data from my old NAS. That allowed me to free up enough space on the NAS to yank a drive, shove it into unRAID and do it again. Rinse and repeat. What I ended up with is a handful of drives on unRAID that are nearly full, and maybe more importantly, my ShareA share split level was set to "any", which is not what I want. I have since added a few more empty drives. What I would like to do is somehow end up with a split level of maybe 3 (or manual, haven't decided), with my data distributed evenly according to the high-water allocation. What I am thinking about doing is creating a new share (call it ShareB), with split level 3 and high-water allocation, consisting of only the empty drives for now. What I would like to do is to move all the data from just one of the drives in ShareA to ShareB, and I'd like unRAID's allocation system active. Then, I would add the newly emptied drive from ShareA to ShareB and do it again for the next drive. I can't seem to figure out how to do this. I have looked at diskmv, consld8, unBalance, but none of them seem to be able to do what I want... - Copy/Move the entire contents of one disk in ShareA to ShareB. Does anyone have any bright ideas?
February 1, 201610 yr Author OK, I thought I figured it out. My idea was to change the share settings for ShareA to include only the one disk I wanted to move to ShareB, and to set up ShareB to include only the new empty drives. But in my testing, it seems that no matter which disks are included in ShareA, I can always see all my files. I assume that the include and exclude settings only refer to writing? Am I correct. So, I still have no solution... I guess I could: [*]set up ShareB to include only the empty drives [*]stop the array [*]start a new config [*]only add the one disk from ShareA whose files I want to transfer to ShareB [*]add all the disks from ShareB [*]start the array [*]move all files from ShareA to ShareB [*]now that the ShareA disk is empty, include it in ShareB [*]stop the array, new config, add next disk from ShareA that I want to empty into ShareB [*]repeat Will this work? Does anyone see any potential problems? Is there a better way? (there must be!!!)
February 1, 201610 yr Author Do you know how to use Midnight Commander? Google it. Sorry, you posted while I was composing my novel above! Isn't MC just a file manager? I don't see how this will achieve what I want.
February 1, 201610 yr Community Expert Do you know how to use Midnight Commander? Google it. Sorry, you posted while I was composing my novel above! Isn't MC just a file manager? I don't see how this will achieve what I want. It is a file manager that is built-in to unRAID. I only mention it because I thought it would be simpler to do this without getting any other computer involved in the transfer. If you try to do this with the network shares you will have to configure things to allow it.
February 1, 201610 yr Author It is a file manager that is built-in to unRAID. I only mention it because I thought it would be simpler to do this without getting any other computer involved in the transfer. OK. I plan on using rsync. Getting access to a command line and performing the necessary moves isn't my question. My question is "how can I move ALL the files on a single disk into a new share?" [if you try to do this with the network shares you will have to configure things to allow it. I guess this is what I'm asking... how do I "configure things to allow it"? edit: maybe I see your confusion. When I say ShareA, I mean /mnt/user/ShareA. I know that moving files from /mnt/disk1 to /mnt/user/ShareA is dangerous, so what is the alternative. That is what I am trying to figure out.
February 1, 201610 yr Community Expert You were talking about ShareA and ShareB. It's only dangerous if you try to move /mnt/disk1/ShareA to /mnt/user/ShareA, but if you move /mnt/disk1/ShareA to /mnt/user/ShareB it should be OK. The danger is due to linux commands not realizing that /mnt/disk1/ShareA and /mnt/user/ShareA might ultimately be the same file. But /mnt/disk1/ShareA and /mnt/user/ShareB are never going to be the same file.
February 1, 201610 yr You know that you can change the settings of ShareA to what you need and use midnight commander to move files from any disk (e.g. /mnt/disk2/ShareA) to the desired disk (e.g. /mnt/disk1/ShareA). Using MC makes it very straightforward, there is no need to create an additional share nor the need to stop/start the array.
February 1, 201610 yr Author It's only dangerous if you try to move /mnt/disk1/ShareA to /mnt/user/ShareA, but if you move /mnt/disk1/ShareA to /mnt/user/ShareB it should be OK. The danger is due to linux commands not realizing that /mnt/disk1/ShareA and /mnt/user/ShareA might ultimately be the same file. But /mnt/disk1/ShareA and /mnt/user/ShareB are never going to be the same file. This is great, and what I assumed was the concern. I kept seeing blanket warnings that copying/moving from /mnt/disk to /mnt/user or vice versa is a no no, but you have cleared it up. As long as you know what you are doing, it's OK to do.
February 1, 201610 yr Author You know that you can change the settings of ShareA to what you need and use midnight commander to move files from any disk (e.g. /mnt/disk2/ShareA) to the desired disk (e.g. /mnt/disk1/ShareA). Using MC makes it very straightforward, there is no need to create an additional share nor the need to stop/start the array. Yes, but this doesn't solve my problem of fixing split directories. Your solution just moves the split directories from one disk to another. By coping to /mnt/user unRAID will fix my split directories by applying the split level preferences.
February 1, 201610 yr Author if you move /mnt/disk1/ShareA to /mnt/user/ShareB it should be OK. "Should" be OK, or "Will" be OK? I would really like to know that what I am about to do is 100% solid.
February 2, 201610 yr Community Expert if you move /mnt/disk1/ShareA to /mnt/user/ShareB it should be OK. "Should" be OK, or "Will" be OK? I would really like to know that what I am about to do is 100% solid. Have a look at the thread and see what you think: User Share Copy Bug. Another approach would be to move from disk to cache disk and let mover sort it out.
February 2, 201610 yr Author Ok. That was a good read. So it looks like I can make all of the disks part of the share, and when I want to empty one disk into the share, I can just exclude it temporarily from the share and move (I'll use rsync) from /mnt/diskn to /mnt/user/share to empty the disk. Edit: Wait a minute. It looks like what I said above is what limetech is saying should be OK: http://lime-technology.com/forum/index.php?topic=34480.msg321878#msg321878 Say for example, you want to empty all the files from "disk2" to the user share file system. What you would do is set "Excluded disks(s)" to "disk2" and click Apply. Now it should work fine to copy everything off disk2 to a user share, letting shfs decide where to write things. but it is contrary to this user's experience: http://lime-technology.com/forum/index.php?topic=38135.msg353141#msg353141 I'm in the process of moving things around to sort out some of my fragmentation across disks, and I think I may have lost some data. I excluded disk1 from the user share ISOs Via a SSH session, I went into /mnt/disk1/ISOs and did "mv * /mnt/user/ISOs" Blip, gone, I can't find the data. So what is the answer. I'm still not sure how to do this, or if there is a safe way to do this.
February 2, 201610 yr huladaddy, did you read what I posted here for you? http://lime-technology.com/forum/index.php?topic=36201.msg441189#msg441189
February 2, 201610 yr Author OK. Just found it and am reading through it now. I think I have come up with a plan. I am going to create a new temporary share of just my empty drives, and systematically move my files, one disk at a time, into it. I'll add the newly emptied drives into the temp share one at a time. Once I'm done, I will want to delete the emptied share, then rename the temp share back to the original name. Sound like a solid plan? Is renaming a share straight forward? Any issues?
Archived
This topic is now archived and is closed to further replies.