Everything opens as "Read Only"

Status
Not open for further replies.

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
If I only tried before writing...
[root@freenas] ~# zpool set feature@hole_birth=disabled my_bad
cannot set property for 'my_bad': property 'feature@hole_birth' can only be set to 'enabled'
[root@freenas] ~#


A memo to myself follows, proving that cyberjock is right.

On 9.2.1.5 (on anything later than 9.2.0?) on a just created pool, with all the defaults:
Code:
[root@freenas] ~# zpool get all my_bad | grep feature@
my_bad  feature@async_destroy          enabled                        local
my_bad  feature@empty_bpobj            enabled                        local
my_bad  feature@lz4_compress           active                         local
my_bad  feature@multi_vdev_crash_dump  enabled                        local
my_bad  feature@spacemap_histogram     active                         local
my_bad  feature@enabled_txg            active                         local
my_bad  feature@hole_birth             active                         local
my_bad  feature@extensible_dataset     enabled                        local
my_bad  feature@bookmarks              enabled                        local
[root@freenas] ~#


I hope I am reading right documentation now:
  1. If a feature is only enabled, but it is not active yet, then it is OK to use the pool on a system that knows nothing about that particular feature.
  2. Command zpool upgrade -v would list what is compatible for read-only mode
    Code:
    [root@freenas] ~# zpool upgrade -v | head -25
    This system supports ZFS pool feature flags.
     
    The following features are supported:
     
    FEAT DESCRIPTION
    -------------------------------------------------------------
    async_destroy                        (read-only compatible)
        Destroy filesystems asynchronously.
    empty_bpobj                          (read-only compatible)
        Snapshots use less space.
    lz4_compress
        LZ4 compression algorithm support.
    multi_vdev_crash_dump
        Crash dumps to multiple vdev pools.
    spacemap_histogram                    (read-only compatible)
        Spacemaps maintain space histograms.
    enabled_txg                          (read-only compatible)
        Record txg at which a feature is enabled
    hole_birth
        Retain hole birth txg for more precise zfs send
    extensible_dataset
        Enhanced dataset functionality, used by other features.
    bookmarks                            (read-only compatible)
        "zfs bookmark" command
     
    [root@freenas] ~#
  3. Out of 4 new features introduced between 9.2.0 and 9.2.1, feature@hole_birth is the only one that makes FreeNAS 9.2.1 pool incompatible with FreeNAS 9.2.0 release:
  • enabled_txg is read-only compatible
  • extensible_dataset is in the enabled state
  • bookmarks is in the enabled state
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Yeah, you can't turn off anything that's not set to disabled. If it is set to "enabled" you can usually(but not necessarily always) mount the pool read-only. If its set to "active" your ZFS implementation must support it.

Sucks? Yes. But that's life. If it didn't suck it would be too much fun.
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
So the craziness continues. I copied all of my data off, pulled all of the drives, and did a complete fresh install of 9.2.1.5 on an entirely new usb flash drive (so there was NO residual anything). Booted up and didn't change a single thing other than clicking CIFS "on". Can't see it. I tried to turn CIFS "off" and hit with "The service could not be stopped." So I am totally stumped on what is messing up 9.2.1.x on my NAS.

Guess I'll be rebuilding with 9.2.0 and living with it.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
Samba 4.x does not work with your systems. You have more than one Windows system and none of them is getting useable shares.

Can you ping your FreeNAS system by IP address? I would say yes, otherwise you would be unable to use GUI. However, you might have some firewall rules disabling pings.

I do not know, I am assuming, that you are expecting FreeNAS share(s) to just show up in your network neighborhood (or whatever your version of Windows names it). And you can see the share(s) in your network neighborhood when using 9.2.0, but not with later revisions? (I am not 100% certain about it.)

Could you please execute in a command window the following command
net view \\FreeNAS_IP
I think you would be able to see your FreeNAS CIFS share(s). If you can see them, you can mount it/them using the FreeNAS IP address.

Could you please confirm or deny my above assumptions?
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
Samba 4.x does not work with your systems. You have more than one Windows system and none of them is getting useable shares.
It does not work with any of my desktops (4 desktops). I have even tried using Windows 8.1 (I run Windows 7 on my desktops).

Can you ping your FreeNAS system by IP address? I would say yes, otherwise you would be unable to use GUI. However, you might have some firewall rules disabling pings.
I can ping the IP address just fine. I can even see it in the router. Just can't see it in Windows.

I do not know, I am assuming, that you are expecting FreeNAS share(s) to just show up in your network neighborhood (or whatever your version of Windows names it). And you can see the share(s) in your network neighborhood when using 9.2.0, but not with later revisions? (I am not 100% certain about it.)
Yes, I'm expecting the system to show up in my network neighborhood. It shows up fine with 9.2.0 (reboot with 9.2.0 install and/or upgrade, flick CIFS on, and near instantly shows up). It never shows up with 9.2.1.x (I can still ping it just fine, but can't get to it).

Could you please execute in a command window the following command
net view \\FreeNAS_IP
I think you would be able to see your FreeNAS CIFS share(s). If you can see them, you can mount it/them using the FreeNAS IP address.
Tried the command, got the following:

"System error 53 has occured. The network path was not found."


Could you please confirm or deny my above assumptions?
Thanks for helping! :)
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
In the GUI, go to Services, CIFS, then scroll to Server maximum protocol and change it from SMB3 to SMB2_10. Restart CIFS.

I hope that works. If it does not, try going down to SMB2_02 or even NT1.

Of course, if CIFS works for you, you can try moving up with versions ;)

SMB2 = SMB2_10
SMB3 = SMB3_00 =(almost) SMB2_24
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
Went all the way down to NT1 (tried SMB2_10, SMB2_02, SMB2, and NT1). None worked.

What do we try next?
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
Thank you for trying. What are your exact steps?
  • boot fresh from a new USB
  • enable SSH
  • install patch
  • ????
P.S. I think there could be something common to the setup of your Windows machines. Something trivial that was probably set long time ago to improve performance or make something simpler...
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
I installed a fresh copy of the iso from a CD to a new USB.
I enabled SSH
I installed the patch
I reboot
I turn on CIFS

nothing..... I can't even access it through the "net view" command. I also can't "turn off" CIFS (CIFS is locked on at this point). If I do the same (or even just "upgrade" through the GUI) with 9.2.0, everything is viable.


While the idea about the Windows machines seems logical, my "argument" against that is that I did a completely fresh install of Windows 8.1 on one of the machines (removed the HDD and used a spare HDD to do a clean install of 8.1). I do the basic setup of Windows 8.1 (name, account, blah blah blah...nothing special). Even on this "new machine", I get the same results as the Windows 7 setups. I can see the NAS with 9.2.0 but not with 9.2.1.x.

So the issue SEEMS to be at the NAS end. I'm wondering if it could be a hardware incompatibility. BUT, yet again, argument. For the past 6 months it has been working with 9.2.2 Alpha. It only become "broken" when I started playing with the NAS a few days ago (when I ran into the issue with read only/permissions). It's hard to conceive of a hardware issue suddenly "appearing" out of nowhere.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
If you are unable to turn off/on CIFS, there is a problem your FreeNAS setup. Are you installing the patch from SSH or from Shell in the GUI?
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
One more idea.

Are you trying all of that without deleting data in your pool? Each time, you are only importing it?

My idea is that Samba 4.x keeps its state information in YOUR_POOL_NAME/.system/samba4 and if that at any point got corrupted, it might prevent CIFS service from operating properly.

If yes and there is no data in your pool, then destroy that pool, making sure that you mark the disks as new (destroy data). And then start anew with a fresh copy of FreeNAS on the USB memory device.

If you have data in your pool, you do not need to destroy the entire pool! Start anew with a fresh copy of FreeNAS 9.2.1.5 on the USB memory device. As soon as you import the pool and have SSH running, get to your FreeNAS system as root using SSH and:
Code:
zfs list  |  grep .samba4
zfs destroy  YOUR_POOL_NAME/.system/samba4
rm  /var/db/samba4

Now install the CIFS patch from SSH (when installing patch from SSH you should not need to reboot the system). Start CIFS. I hope you should be able to see it using net view now. However, the permissions would not be useable, yet.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
Got pessimistic or optimistic, depends how you view it ;).

I realized that if permissions on the volume or dataset you are sharing out using CIFS are not what Samba 4.x is comfortable with, that would be your problem too. So we need more hardware to the rescue :)

Get one more USB memory device that is at least 3GB and format it under Windows first so it is seen blank. Insert it into FreeNAS together with the system one. Boot. Get the steps from the above including installing the patch (do not start CIFS), then using Storage, ZFS Volume Manager create a new pool on the second (blank) USB memory device. And only now start CIFS but share your USB, not your regular pool. Be happy.
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
SUCCESS, sort of.

What I did:
  1. complete wipe of the "OS USB" (did a reformat in Windows)
  2. unhooked all of my drive (so they could not interfere, nor could they get messed up)
  3. installed a fresh copy of FreeNAS 9.2.1.5 on the "OS USB"
  4. inserted a second 8GB USB flashdrive and rebooted (so the system could see it on startup)
  5. started SSH and installed the patch through putty
  6. created a new ZFS pool on the "new" USB flashdrive
  7. created a new CIFS share called "USB", causing FreeNAS to automatically ask if I wanted to start the service (I said yes)
At this point, I can see and access the "USB" share over my network through Windows Explorer. BUT, I'm back to the issue of permissions not being right. I moved a word file over to the USB drive and could see it on different computers. Unfortunately, when I open the file it opens as "Read Only."

I tried setting the permissions in Windows (right click -> properties -> security -> full control) but get an error "Unable to change permissions. Access is denied."

Plus I still don't know if I can get the original pools to reattach.

So I'd like to figure out the permissions stuff before I move ahead with trying to reattach my old shares. Under the Storage permissions, should I be using Unix permissions (the default) or the Windows/Mac permissions? I want to do everything on a "Guest" account since this is my local home network.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
This is how I setup CIFS for a situation when all the users are trusted to access everything. And only then, since this process opens everything to everybody.
==================================
System → Settings → Advanced →
* Show advanced fields by default: YES

Storage → Volumes → /mnt/YOUR_VOLUME_NAME → Change Permissions →
allow read, write, execute access to owner, group, other


On 9.2.1.5 only, in an SSH session, and not in a shell from GUI (because of the patch stopping GUI)
* patch the system → https://bugs.freenas.org/issues/4874


Sharing → Windows (CIFS) → Add Windows (CIFS) Share →
Name: YOUR_VOLUME_NAME
Path: /mnt/YOUR_VOLUME_NAME
Browsable to Network Clients: YES (default)
Inherit ACL's: YES (default)
Show Hidden Files: YES
Allow Guest Access: YES

Would you like to enable this service? YES

Services → CIFS →
DOS charset: CP437 (default)
UNIX charset: UTF-8 (default)
Log level: Minimum (default)
Local Master: YES (default)
Time Server for Domain: YES (default)
Support DOS File Attributes: YES (default)
Unix Extensions: YES (default)
Zeroconf share discovery: YES (default)
Hostname lookups: NO
Allow execute always: YES (default)
==================================
Please let me know whether that works for you and whether this way of documenting things is readable for you.
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
Yes, I understand your documentation, thanks.

You mentioned the patch again. Do I need to redo the patch for every share?


I ran through your steps but am still getting "read only." Who do you set as the owner and group for the pool (default is root and wheel)?

I made a new user (and group) named "guest" (as I have read in the how-to's) with the password "guest". I set the owner and group for the USB drive to guest. Then when I mapped the USB I used the credentials "guest" and password "guest" which removed the issue of "read only." However, there should be a simpler way to do this.

If I wanted to make a user name for each user (myself, my wife, etc.), would I make a user and set them all to be the same group (ex: family)? Then set the drive owner to "root" and the drive group to "family?"

Why Unix vs Windows/Mac ACLs?
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
Well I tried making user names for myself and my wife, set them all to be the same group "family"? Then set the drive owner to "root" and the drive group to "family." That didn't work. For some reason even though the pool (under storage) has "Read", "Write", and "Execute" checked for group, things open "Read Only." If I change the owner to my user name, then it opens normal (not Read only), but that doesn't fix the problem on my wife's computer. If I set it to my wife's user name, it opens "Read Only" for me.

So how do I get the "group" permissions to apply correctly?
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
YAY! All the drives are shared and accessible again! Now CIFS seems to be working fine, so someone might want to sticky the solution regarding using a spare USB drive to get the CIFS "started." Once I had access to the USB, I rebooted with the storage drives attached (reattached the SATA cables), auto imported the pools, shared, accessible.

Still having an issue with the permissions. I can only read, can't write.
 

CLSegraves

Explorer
Joined
Sep 13, 2013
Messages
84
Where do you set the user password? I thought I was setting the password under "password" and "confirm password" but the password disappears after I apply.
 
Status
Not open for further replies.
Top