Strange lost of file permissions, webGUI left column gone and strange error in module

Status
Not open for further replies.

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
HELP, pool, permission, gone after deleting plugins

Edit : Former title was : "
Strange lost of file permissions, webGUI left column gone and strange error in module", changed and hope some more can help me...


Good evening and sorry for the multi subject topic.

Before I upgrade to 8.3 I check a view things.

1. I have some files which I can't delete or move with my cifs with my guest account (the anon one described in the wiki). It's a total mess on several files. I tried a 7777 chmod in sftp, checked owner and grouped in web gui. a reboot. Nothing changed, don't know why, suddenly, I can loose some privileges.

Edit : If I try (sometimes) to change the permission on volume for guest, I loose the write permission sometimes :

View attachment 1663

to

View attachment 1665

then I loose that too in user

View attachment 1666

Now that I checked this, I tried a reboot (proper one) and :

2. nothing left in my web gui left column

View attachment 1664

3. cant load my modules anymore

Environment:

Software Version: FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
Request Method: GET
Request URL: http://192.168.0.14/services/plugins/?dojo.preventCache=1356845854590


Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
105. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/freeadmin/middleware.py" in process_view
166. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/services/views.py" in plugins
83. 'error': e,
File "/usr/local/lib/python2.7/logging/__init__.py" in warning
1144. self._log(WARNING, msg, args, **kwargs)
File "/usr/local/lib/python2.7/logging/__init__.py" in _log
1250. self.handle(record)
File "/usr/local/lib/python2.7/logging/__init__.py" in handle
1260. self.callHandlers(record)
File "/usr/local/lib/python2.7/logging/__init__.py" in callHandlers
1300. hdlr.handle(record)
File "/usr/local/lib/python2.7/logging/__init__.py" in handle
744. self.emit(record)
File "/usr/local/www/freenasUI/freeadmin/handlers.py" in emit
57. msg)

Exception Type: TypeError at /services/plugins/
Exception Value: [priority,] message string

Don't understand how I can loose my plugins....

Could someone help me ? thanks
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
You've kinda made a mess that probably can't be fixed without reinstalling your plugin jail & plugins, OR restoring to a snapshot of those datasets for your plugins IF you made any.

You'll probably need to do a factory restore, or delete the appropriate settings from the database at the command line to get the GUI fixed.

I'd probably just make a backup copy of /data/freenas-v1.db then do a factory restore. Even if you backed up your settings, if you restore them you'll have the same problem if they contain the settings for the jail.

Give me a few minutes and I'll try to come up with a command to reset the jail stuff in your settings database. You'll still need to reinstall the jail and it's probably a good idea to poke thru the jail datasets and copy anything you want to keep unless you made a snapshot of them.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
So basically what you have done is obliterate the permissions for every file in the plugin jail and plugins (and your pool(s) as well). It's like having all the wrong permissions on every file for an entire operating system. I'm not sure if just reinstalling the jail will correct this, or if you'll need to delete both datasets for your plugin jail and reinstall. Fixing the permission on the rest of your files in your pool is a whole other situation. I'm just trying to help you remove the jail settings from your config so that you'll get the left side of your GUI fixed, AND preserve all of your other settings. You'll need to backup the settings database first. Below are the steps to do this from the command line of your console:


Code:
mount -uw /

cd /data

cp freenas-v1.db freenas-v1.db.BAK

sqlite3 /data/freenas-v1.db "delete from services_pluginsjail"

sqlite3 /data/freenas-v1.db "delete from plugins_plugins"

mount -ur /

reboot
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
Thanks :),

now I'm backing up some files from nas to another hard drive (do you know why sftp can't read foreign caracters in file or folders ?)

If i do a factory reset, is it dangerous for my files ? I save (one every to month) my config file...

edit: oh we posted at the same time, thanks for the respons, is there a way to go clean with 8.3 ?

edit2 : I promise, I did'nt change anything !
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
do you know why sftp can't read foreign caracters in file or folders ?)

No, I don't know.

If i do a factory reset, is it dangerous for my files ? I save (one every to month) my config file...

No, your files will still remain. If you knew the month you saved your config BEFORE you added the plugin jail you could restore to that. The best solution would be if you had a snapshot of your jail before you clobbered your permissions.

See my post above. I think we posted at the same time.
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
Thanks. And for my pool? Should I upgrade and do a factory reset? Or should I reset now? Or is there another solution?

Note that this error with my left column appeared when I first upgrade to 8.2. I asked previously here, but nobody has answered...
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
Really, no one, all my datas are now gone !!!!

Image 1.jpg
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
Bonjour huberte,

From the command line, type
Code:
zpool status -v
and let's see what it says.
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
No pools available or unknow pools in gui

Tried a factory restaure through the web gui, took one hour and nothing

Booting was very long now, was stuck here :

IMG_20121230_135325.jpg

zpool status -v : no pools

Tried to download an old (same version of freenas) config, rebooting, freezing here :

IMG_20121230_141535.jpg

It was always the case with my jetflash.

what next, crying ?

Edit : no get back where I was but without my pools :( an d just because of some plugins ? Should I try an old config file before the jail and plugins ? Even if it was not on 8.2, but on 8.02 (If I remember) ?
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
Again, I'm now on my volume status, did auto import, I'm here

Image 2.jpg

but I don't trust anything anymore, I'll wait till a good someone tells me what to do. anf if this zfs was not a good one ? ShouldI better try to realod a pre jail config ?
Edit : stangely I have my disk there :

Image 3.jpg
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
The geometry errors on the USB are normal.

So, when you did the volume import, what happened? If you haven't imported yet, let's see what zfs thinks is there. From the command line:
Code:
zpool import
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
Not the right one, is it ? How do I know those gptid are actually my good old drives ?

Code:
[root@freenas] ~# zpool import
  pool: gra1
    id: 8778032404110164485
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

        gra1                                            ONLINE
          raidz1                                        ONLINE
            gptid/f53806cb-fab1-11e1-89d0-14dae98ee84a  ONLINE
            gptid/199b99aa-e63a-11e0-9acd-14dae98ee84a  ONLINE
            gptid/19f779b3-e63a-11e0-9acd-14dae98ee84a  ONLINE
            ada3p2                                      ONLINE
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
I'd say that is a good sign. gra1 is the name of the pool and there are four devices. My guess is that something happened to "zpool export" the pool -- maybe something was selected in error when you were repairing the permissions issues.

I would import the pool via the GUI and see what happens -- I think it will import successfully.
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
thanks for your rapid answer :)

You think :eek: ?

What's the best here ?

import an old config before 8.2 or your method ? If it's not the right pool it will erase the data on it ?
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
Well...

The zpool import command has listed all of the zpools it can find to import from the disks installed. I don't think there are any other pools. I also don't think I would change anything else in your configuration until we find out of this pool is importable.

But before you do an import, please run this command from the CLI:
Code:
zpool history


This command will list all of the commands executed on this machine and maybe it will give us a clue as to what happened.
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
1. A pool with the same name already exist, (if I try to import in the gui)

Image 4.jpg

Should I detach the previous one ?

gra1 /mnt/gra1 6.0 KiB (8%) 752.0 KiB 823.5 KiB UNKNOWN

2.
Code:
[root@freenas] ~# zpool history
no pools available


thanks again for your kind rapid answers :)

EDIT

Just note that I'm back again with my last config file. Maybe I should go to factory restore and then do what you said, nope ?
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
No, I wouldn't expect a factory restore to change what we're seeing.

This gra1 that is mounted looks to be empty. It holds only 8K. It also doesn't appear to be a ZFS volume, or zpool history would have shown it. You can try to detach this volume by clicking on that first icon in your , but I think it will fail -- either because it's not a ZFS volume, or its state is unknown. If it detaches successfully, then you can try to import the one that ZFS knows about.
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
I will be away for the next hour or so.
 

huberte

Explorer
Joined
Sep 20, 2011
Messages
87
Detech ok,

First auto import in webgui ends with nothing in the gui, console shows :

Code:
Dec 30 17:24:53 freenas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Dec 30 17:25:25 freenas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Dec 30 17:25:40 freenas manage.py: [middleware.exceptions:38] [MiddlewareError: L'import du volume "gra1" a échoué. Pour plus de détails vérifier l'état du pool]
Dec 30 17:25:58 freenas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Dec 30 17:26:30 freenas init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
Dec 30 17:28:39 freenas last message repeated 4 times


Launched auto import a second time, in ssh :

Code:
[root@freenas] ~# zpool status -v
  pool: gra1
 state: ONLINE
 scrub: none requested
config:

        NAME                                            STATE     READ WRITE CKSUM
        gra1                                            ONLINE       0     0     0
          raidz1                                        ONLINE       0     0     0
            gptid/f53806cb-fab1-11e1-89d0-14dae98ee84a  ONLINE       0     0     0
            gptid/199b99aa-e63a-11e0-9acd-14dae98ee84a  ONLINE       0     0     0
            gptid/19f779b3-e63a-11e0-9acd-14dae98ee84a  ONLINE       0     0     0
            ada3p2                                      ONLINE       0     0     0

errors: No known data errors


In WebGui : seems ok :

gra1 /mnt/gra1 2.6 TiB (67%) 1.3 TiB 3.9 TiB HEALTHY

BUT

1. Can't browse my file in explorer
2. Can't Browse my files in sftp via flashfxp (edit : I can browse my files, very long to copy to my desktop with sftp (2M/s))
3. I can browse through ssh, but it takes a very long time, 15 minutes for this example :

Code:
/
[root@freenas] /# cd ..
[root@freenas] /# ls
./         .cshrc     .snap/     bin/       cfg/       data/      etc/       lib/       media/     proc/      root/
../        .profile   COPYRIGHT* boot/      conf/      dev/       home@      libexec/   mnt/       rescue/    sbin/
[root@freenas] /# cd mnt
[root@freenas] /mnt# ls
./       ../      .snap/   gra1/    md_size
[root@freenas] /mnt# cd gra1
[root@freenas] /mnt/gra1# ls
./        ../       .freenas/ Home/     jail/     software/ testfile
[root@freenas] /mnt/gra1# cd Home
[root@freenas] /mnt/gra1/Home# ls
./    ../   Home/ var/
[root@freenas] /mnt/gra1/Home# cd Home
[root@freenas] /mnt/gra1/Home/Home# ls
./                    .cshrc*               .mailrc*              .shrc*                PhotosdemonChat/            Factures
../                   .login*               .profile*             Travail/             Network Trash Folder/ Jardinage/
.AppleDB/             .login_conf*          .recycle/            ISoLinux/            Photos et Videos/     rsync
.AppleDesktop/        .mail_aliases*        .rhosts               Freewares/                 Temporary Items/      temp/
[root@freenas] /mnt/gra1/Home/Home# cd Downloads



The jail still there, modules too, something still broken.

Anyway, I hope my datas are still readable.

thanks again for your precious help, any hint to go from scratch and keeping my pool (eg delete jail, plugins, permission)
 
Status
Not open for further replies.
Top