Moved data now errors?

Status
Not open for further replies.

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Hi,

So I moved data from one pool to a newly created pool and now I am getting the following errors when logging into Freenas:

Of the system seems to have problems now. I used the command:

mv /mnt/Pool/Storage/data /* /mnt/Temp2tb/data (actual directories might be slightly different).

Now using commands like "ls" dont work at all anymore.

Code:
Request Method: GET
Request URL: http://192.168.1.45/system/info/?dojo.preventCache=1454164658342
Software Version: FreeNAS-9.3-STABLE-201512121950
Exception Type: OSError
Exception Value:
[Errno 2] No such file or directory
Exception Location: /usr/local/lib/python2.7/subprocess.py in _execute_child, line 1327
Server time: Sat, 30 Jan 2016 09:37:40 -0500
Traceback

Request information
GET
Variable Value
dojo.preventCache u'1454164658342'
POST
No POST data

FILES
No FILES data

COOKIES
Variable Value
csrftoken '4p0bY7s1O93rHu0iazklrjY2uL6ieEaE'
fntreeSaveStateCookie 'root%2Croot%2F188%2Croot%2F191%2F197%2F199%2Croot%2F191%2F207%2Croot%2F132%2Croot%2F38%2Croot%2F189%2Croot%2F191%2Croot%2F195%2Croot%2F193%2Croot%2F55%2Croot%2F55%2F56%2Croot%2F55%2F56%2F57%2Croot%2F55%2F56%2F57%2F58%2Croot%2F55%2F56%2F57%2F58%2F83%2Croot%2F55%2F56%2F57%2F58%2F87%2Croot%2F174%2Croot%2F137%2Croot%2F137%2F147%2Croot%2F56%2F57%2Croot%2F56%2F57%2F58%2Croot%2F1%2Croot%2F1%2F6%2Croot%2F1%2F2%2Croot%2F201%2Croot%2F201%2F213%2F215%2Croot%2F201%2F217%2Croot%2F201%2F207%2Croot%2F201%2F207%2F209%2Croot%2F217%2F242%2Croot%2F217%2F247%2Croot%2F217%2F247%2F249%2Croot%2F217%2F237%2Croot%2F217%2F223%2Croot%2F212'
sessionid 'ncuohjwxb4kfbo7pgryv9s0b9cnwxxmp'
META
Variable Value
wsgi.run_once False
wsgi.version (1, 0)
DOCUMENT_ROOT '/usr/local/etc/nginx/html'
REMOTE_PORT '55015'
SERVER_NAME 'localhost'
HTTP_ACCEPT '*/*'
HTTPS ''
wsgi.url_scheme 'http'
SERVER_ADDR '192.168.168.45'
REDIRECT_STATUS '200'
wsgi.multiprocess False
HTTP_CONNECTION 'keep-alive'
REQUEST_METHOD 'GET'
SERVER_PORT '80'
REMOTE_ADDR '192.168.168.155'
wsgi.errors <flup.server.fcgi_base.TeeOutputStream object at 0x8142e2ed0>
HTTP_ACCEPT_ENCODING 'gzip, deflate, sdch'
wsgi.input <flup.server.fcgi_base.InputStream object at 0x8142e2590>
SCRIPT_NAME u''
HTTP_USER_AGENT 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36'
HTTP_REFERER 'http://192.168.1.45/'
SERVER_SOFTWARE 'nginx/1.6.2'
HTTP_COOKIE 'sessionid=ncuohjwxb4kfbo7pgryv9s0b9cnwxxmp; fntreeSaveStateCookie=root%2Croot%2F188%2Croot%2F191%2F197%2F199%2Croot%2F191%2F207%2Croot%2F132%2Croot%2F38%2Croot%2F189%2Croot%2F191%2Croot%2F195%2Croot%2F193%2Croot%2F55%2Croot%2F55%2F56%2Croot%2F55%2F56%2F57%2Croot%2F55%2F56%2F57%2F58%2Croot%2F55%2F56%2F57%2F58%2F83%2Croot%2F55%2F56%2F57%2F58%2F87%2Croot%2F174%2Croot%2F137%2Croot%2F137%2F147%2Croot%2F56%2F57%2Croot%2F56%2F57%2F58%2Croot%2F1%2Croot%2F1%2F6%2Croot%2F1%2F2%2Croot%2F201%2Croot%2F201%2F213%2F215%2Croot%2F201%2F217%2Croot%2F201%2F207%2Croot%2F201%2F207%2F209%2Croot%2F217%2F242%2Croot%2F217%2F247%2Croot%2F217%2F247%2F249%2Croot%2F217%2F237%2Croot%2F217%2F223%2Croot%2F212; csrftoken=4p0bY7s1O93rHu0iazklrjY2uL6ieEaE'
HTTP_CONTENT_TYPE 'application/x-www-form-urlencoded'
HTTP_ACCEPT_LANGUAGE 'en-US,en;q=0.8'
CONTENT_TYPE 'application/x-www-form-urlencoded'
DOCUMENT_URI '/system/info/'
wsgi.multithread True
HTTP_HOST '192.168.1.45'
PATH_INFO u'/system/info/'
REQUEST_URI '/system/info/?dojo.preventCache=1454164658342'
HTTP_X_REQUESTED_WITH 'XMLHttpRequest'
SERVER_PROTOCOL 'HTTP/1.1'
QUERY_STRING 'dojo.preventCache=1454164658342'
CSRF_COOKIE u'4p0bY7s1O93rHu0iazklrjY2uL6ieEaE'
CONTENT_LENGTH ''
GATEWAY_INTERFACE 'CGI/1.1'


Any idea why that would be happening?

Thanks,
Rich
 

Attachments

  • problem.JPG
    problem.JPG
    166.2 KB · Views: 210
Last edited:

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Code:
[root@freenas] /mnt/Pool/Storage# mv /mnt/Pool/Storage/data /* /mnt/Temp2tb/raid
mv: /bin/cp /boot /mnt/Temp2tb/raidz/boot: exec failed
mv: /bin/cp /cfg /mnt/Temp2tb/raidz/cfg: exec failed
mv: /bin/cp /conf /mnt/Temp2tb/raidz/conf: exec failed
mv: rmdir /mnt/Temp2tb/raidz/data: Directory not empty
mv: cannot rename a mount point
mv: cannot rename a mount point
mv: /bin/cp /lib /mnt/Temp2tb/raidz/lib: exec failed
mv: /bin/cp /libexec /mnt/Temp2tb/raidz/libexec: exec failed
mv: /bin/cp /media /mnt/Temp2tb/raidz/media: exec failed
mv: cannot rename a mount point
mv: /bin/cp /nonexistent /mnt/Temp2tb/raidz/nonexistent: exec failed
mv: /bin/cp /proc /mnt/Temp2tb/raidz/proc: exec failed
mv: /bin/cp /rescue /mnt/Temp2tb/raidz/rescue: exec failed
mv: /bin/cp /root /mnt/Temp2tb/raidz/root: exec failed
mv: /bin/cp /sbin /mnt/Temp2tb/raidz/sbin: exec failed
mv: /bin/cp /tmp /mnt/Temp2tb/raidz/tmp: exec failed
mv: rmdir /mnt/Temp2tb/raidz/usr: Directory not empty
mv: cannot rename a mount point
[root@freenas] /mnt/Pool/Storage#                 
 

Attachments

  • Freenaserror.jpg
    Freenaserror.jpg
    87.6 KB · Views: 209

rsquared

Explorer
Joined
Nov 17, 2015
Messages
81
If that's the exact command you typed, you've got and extra space in there before the /*. You've told your system to move the /mnt/Pool/Storage/data folder AND everything in the root folder to your presumably temp pool.

All those errors are occurring because you have moved system files off of the boot device and onto your pool. At this point your only option is probably to reinstall.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Lol! Typos!

So is the data OK? I dont mind a reinstall.
 

rsquared

Explorer
Joined
Nov 17, 2015
Messages
81
You can remount your pools after a reinstall. The data should hopefully all be there somewhere, but where exactly it is, who knows.

You mentioned in your first post that even basic things like ls weren't working. This was because you had moved the system files off of the boot drive and onto your pool. Depending on what got moved in what order, this also means that things could have gone badly in the middle of the mv to the temp pool once some of those system executables were unavailable...
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Hmm, when I looked at the Pool storage it was empty so I guess it got moved? I have most of the data backed up so I am not overly concerned (yet).

To confirm (for future):

The command should not be this:
Code:
mv /mnt/Pool/Storage# mv /mnt/Pool/Storage/data /* /mnt/Temp2tb/raid


It should be this:
Code:
mv /mnt/Pool/Storage# mv /mnt/Pool/Storage/data/* /mnt/Temp2tb/raid


This would have moved everything in the data folder to the raid folder?

If I want to be safe next time & do a copy would the command be?

Code:
cp -R /mnt/Pool/Storage# mv /mnt/Pool/Storage/data/* /mnt/Temp2tb/raid



Also, the boot device is the two USB sticks I am using - the space /* said to get everything in /data & everything on the usb sticks?
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Annnnd very lucky for me I had an extra USB (disk 3) as a spare which had my config on it. I did an install/upgrade and it seems to be back up. I am doing data comparison now.

How do I backup my config - not something I did before.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
From the documentation -

Backup the FreeNAS® configuration in System→General →Save Config.

Many of us use a cron job to backup the configuration automatically. Search the forum for suggestions.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Where do you back up the config to? I imagine the config file is small.
 

rsquared

Explorer
Joined
Nov 17, 2015
Messages
81
Hmm, when I looked at the Pool storage it was empty so I guess it got moved? I have most of the data backed up so I am not overly concerned (yet).

To confirm (for future):

The command should not be this:
Code:
mv /mnt/Pool/Storage# mv /mnt/Pool/Storage/data /* /mnt/Temp2tb/raid


It should be this:
Code:
mv /mnt/Pool/Storage# mv /mnt/Pool/Storage/data/* /mnt/Temp2tb/raid


This would have moved everything in the data folder to the raid folder?

If I want to be safe next time & do a copy would the command be?

Code:
cp -R /mnt/Pool/Storage# mv /mnt/Pool/Storage/data/* /mnt/Temp2tb/raid

Close, but you've copied and pasted a little too much. Everything before the # is part of the command prompt, so you would be looking at one of the following:


mv /mnt/Pool/Storage/data/* /mnt/Temp2tb/raid

cp -R /mnt/Pool/Storage/data/* /mnt/Temp2tb/raid

Also, the boot device is the two USB sticks I am using - the space /* said to get everything in /data & everything on the usb sticks?

The thing to remember is that most unix file manipulation commands a single destination argument (whatever is listed last) but multiple input arguments (everything else before that), with a space being the delimiter between those arguments. So again you're close, but not quite there. Your command said to get everything in your data dataset, as well as everything on your system (not just on the usb sticks) and move it to your temp pool. The difference being it would also have grabbed anything on any pools and moved them too.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
If you do it manually, via the webGUI, then you probably saved it on Windows, Mac, Linux, ... whereever.

With my cron job, I just copy it to my storage pool and append a date in the filename.

I can pull them off or cleanup the directory, via CIFS. In the event that I didn't have a recent one stored offline and my boot device died, I could reinstall FreeNAS, get to the directory, grab one off the server, and restore the "old" configuration. The files are tiny.

Where do you back up the config to? I imagine the config file is small.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Fortunately my data looks good. I even decided to pull an old snapshot (data stays pretty much the same) from a few days ago & am copying things over properly this time :).

Command line is fun - i feel techy - at least until I break something.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Last question - is there a way to see the 'status' of the cp, mv, or rm within the command line? So I can figure when the data transfer is going to end, or if it is stuck, etc?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Add the -v option, it's not a progress bar but you'll see what files it's copying/moving/deleting and as it does it by alphabetical order you can estimate yourself where it is ;)
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Thanks - that is great!
 
Last edited:
Status
Not open for further replies.
Top