Exported pool but can't reimport: "file name too long"

Status
Not open for further replies.

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
FreeNAS-9.3-STABLE-201602031011; hardware as in my sig.

I exported one of my pools, but when I try to import it again I get an error message: "File name too long" concerning a directory.

Although it will not import, it is mounted, and from the command line I can cd to the root of the unimportable pool, rm the files under that directory and rmdir the directory, but when I reboot and try to reimport the pool again, I get the same error message:
Code:
Mar 10 11:56:27 freenas manage.py: [middleware.notifier:3517] Importing Backup_Pool [9569454016000112987] failed with: cannot mount 'Backup_Pool/Pool1_New_Backup/.warden-template-portjail-9.2-RELEASE-x64-20140219201213': File name too long
Mar 10 11:56:27 freenas manage.py: [middleware.exceptions:37] [MiddlewareError: The volume "Backup_Pool" failed to import, for futher details check pool status]


When I look, I see that the too-long directory path has been recreated but is empty.

Is there any way to reimport this pool? And is this not evidence of a bug in FreeNAS -- that it allows creation of file/path names that cannot be imported?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
If the name is just marginally larger than the maximum (however that happened), doing
Code:
zpool import Backup_Pool BPL
,
where BPL is just an arbitrary short name I came up with, might help.

In any case, definitely bring this to the devs' attention, since it's a pretty nasty situation,
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Code:
zpool import Backup_Pool Backup_New


completed without error, but Backup_Pool did not show up in the GUI, not even after rebooting.

Code:
zpool status


shows Backup_New online with no known data errors, but it does not show up when I execute

Code:
ls -l /mnt/


If I try

Code:
zfs mount Backup_New


it responds that it is already mounted.

If I have to create a new pool from those disks (destroying whatever is on them), It won't be too painful, as pretty much everything is a replica of another pool
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
I might be mistaken, but to me it looks as if the ZFS import was OK, and just FreeNAS had some path length limitation.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Code:
zpool import Backup_Pool Backup_New


completed without error, but Backup_Pool did not show up in the GUI, not even after rebooting.

Code:
zpool status


shows Backup_New online with no known data errors, but it does not show up when I execute

Code:
ls -l /mnt/


If I try

Code:
zfs mount Backup_New


it responds that it is already mounted.

If I have to create a new pool from those disks (destroying whatever is on them), It won't be too painful, as pretty much everything is a replica of another pool
Try with a very short name, like BPL (don't make it too short, or stuff might break).
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
OK, @Ericloewe, I tried again with the new pool name BPL, as you suggested, but that did not at first seem to help. But then I exported it from the CLI and imported it from the GUI, and that seems to have worked OK.

I did report this problem (Bug #14042), but it's a duplicate of #9834 from 10 months ago; they say it would be difficult to fix.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What strikes me as odd is that the path isn't really that long...
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Since the problem file is

.warden-template-portjail-9.2-RELEASE-x64-20140219201213

(note the version) replicated, among many others, from my main pool, do I still need it on that main pool anyway? I have created new jails recently, which I assume would not be version 9.2*, although I see no corresponding files with a later version on that main pool.
 
Status
Not open for further replies.
Top