Lost access to smb shares & UI. Server starts ok but cannot access shares or UI from any PC

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
Howdy folks
TrueNAS was working fine, until I was away for a few weeks.
When I came back I could not access any SMB (Windows) shares or get the server GUI to load on any PC.
I believe the server storage must be "full" as full backups were running during my absence.
Is there any way to delete a folder from the server directly by way of the server command line text UI (option 9 from the server), as I'm not able to access the server GUI or any shares from any PC?
Thanks.
The folder I want to delete is at \\servername\backups.
Thanks
 
Last edited:

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
Perhaps "ZFS delete /mnt/servername/Backups"?
Also maybe I should also refresh the tmp folder with something I found:
zfs delete mnt/tmp ; zfs create mnt/tmp; chmod n41777 /tmp

Obviously I don't want to try either of these without confirmation from an expert of the command structure.
Thanks all
 
Joined
Oct 22, 2019
Messages
3,641
Do not use "zfs" commands to issue file/folder deletions.

The "zfs" and "zpool" commands operate on the dataset and pool levels (not the file/folder level). It's completely unrelated to managing files and folders, as you're trying to do.

I think the more important issue is to find out why you cannot login to the TrueNAS GUI, let alone access the SMB shares.

Are you able to successfully SSH into the server?

UPDATE: Does the TrueNAS server get its IP address assigned via DHCP? It's plausible it was assigned a new IP address while you were away for a few weeks.
 
Last edited:

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
Sorry to say I do not know anything about SSH other than it is a way to get to the "#" prompt from a remote machine. (Is that correct?)
That may not matter as the server is not headless and at the main NAS screen (with the 1 - 12 options) I can press 9 and get to the # prompt.
I have confirmed that the server is 95%+ full so I assume that is the issue.
 
Joined
Oct 22, 2019
Messages
3,641
Does the TrueNAS server get its IP address assigned via DHCP? It's plausible it was assigned a new IP address while you were away for a few weeks.
Please check this first? Then you will be able to delete files and folders via Windows through the SMB share, as you had initially planned to do so.
 

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
I set up the server with a static address. It is outside the range that the DHCP server will assign.
 
Joined
Oct 22, 2019
Messages
3,641
Obvious question, but can you ping the server from the client PC? Did you enable the SSH service, per chance?

Unless someone more versed has an explanation, I don't understand why TrueNAS would lock you out of signing into the GUI or accessing SMB shares, just because one of the data pools is over 95% capacity.

Before you start deleting files (using the "rm" and "rmdir" commands, which requires extra care, as it's not reversible, and you might accidentally auto-complete or type in the wrong file name / folder name by mistake), what about pruning older snapshots?
 

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
Thanks for all the help/suggestions.
I can ping the server from any PC on the network.
Do not know how to enable the SSH service. Can it be done via from the server's # prompt?
Yes, entering the TrueNAS IP just times out, no GUI, no SMB shares on any windows PC.
As a matter of fact, I just tried File Explorer and see that the mapped drives all fail to connect AND If I drill down the "My PC" tree on the left to "Newtwork" I can see a few PCs (those that are sharing) but the server name that should be there is not there.

Can I use the RM or RMDIR at the server # prompt? I know RM from windows DOS but am unfamiliar with RMDIR. Are they the same?
If you can tell me how to DEL old snapshots That also would be a great option.

Maybe I should try to reboot the server from the server TXT menu and see if that helps.

I did find an alert from the server that says the server is at 96% capacity.
 
Joined
Oct 22, 2019
Messages
3,641
From the prompt, you can use the following command to recursively list all datasets in your pool, and get a breakdown of how much is being used by the snapshots:

Code:
zfs list -r -o space nameofpool


Can I use the RM or RMDIR at the server # prompt? I know RM from windows DOS but am unfamiliar with RMDIR. Are they the same?
"rm" removes a single file (or entire tree recursively if used with the "-r" flag), while "rmdir" removes a directory, only if it is empty.

Maybe I should try to reboot the server from the server TXT menu and see if that helps

Definitely worth a shot. I assumed you already tried that.
 
Last edited:

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
I did try several reboots. Hadn't helped.
I tried another just now and (of course) everything is fine.
I immediately deleted the snapshots (Oy. Going back to 2020!) and the Backups folder to recover as much space as possible.
Bizarre.
Is there a way to force a data integrity check across all drives? (I have 5 4TB drives configured as the setup suggested.)
If I remember I can lose 2 drives and still have my data. (Do you know where can I verify the "raid" configuration?)
Thanks so much for your help.
 
Joined
Oct 22, 2019
Messages
3,641
If you are able to use the GUI like normal again, then you can view the pool's status and force a full scrub from,

Storage -> Pools -> cogwheel icon -> Status

And to force a full scrub (which I would do overnight, when the server is not in use),

Storage -> Pools -> cogwheel icon -> Scrub Pool
 
Joined
Oct 22, 2019
Messages
3,641
If I remember I can lose 2 drives and still have my data. (Do you know where can I verify the "raid" configuration?)
None of that matters without a separate backup.

It doesn't have to be fancy. As a failsafe, you can simply dump everything important onto an exFAT or NTFS formatted external drive, if you're not up for a more robust backup scheme. Always have at minimum something separate from your server / main storage.
 
Top