mmchfs -k nfs4 impacts?
Hi, We want to export SMB shares via Spectrum Scale CES nodes. The filesystem has ACL style set to “all” and we must set it to nfs4 with mmchfs -k nfs4 . The filesystem currently has millions of files with POSIX ACLs. Will this mmchfs command result in any performance impact, such as a major rewrite of metadata? Thanks. Steve Losen Research Computing University of Virginia scl@virginia.edu<mailto:scl@virginia.edu> 434-924-0640
On 29/08/2022 18:52, Losen, Stephen C (scl) wrote:
Hi,
We want to export SMB shares via Spectrum Scale CES nodes. The filesystem has ACL style set to “all” and we must set it to nfs4 with mmchfs -k nfs4 . The filesystem currently has millions of files with POSIX ACLs. Will this mmchfs command result in any performance impact, such as a major rewrite of metadata? Thanks.
The operation will complete very quickly. The bigger risk is that your existing ACL's will go "puff". As I understand it GPFS stores each different ACL only once and then it points each file to the ACL. When you change the ACL type they get nuked from recollection but it is a decade now since I played around with that. I stick to NFSv4 ACL's since then because well POSIX ACL's are a bit naff frankly. I personally would have thought "-k samba" would have been preferable for your use case mine you ;-) JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
Hi Jonathan, Thanks for your reply. I didn't see "-k samba" in the docs. I'll look some more. Also I didn't mention that we also need NFSv4 access and native GPFS, this will not be SMB-only. It will actually be mostly GPFS native. I don't think existing ACLs will be adversely affected. In a test filesystem with "-k all" I set some POSIX ACLs and converted the filesystem to "-k nfs4" and the result looked reasonable. Plus I ran mmgetacl -k nfs4 on numerous files/dirs with POSIX ACLs in our production filesystem and the results looked promising. Glad to know that switching the filesystem to -k nfs4 won't be a huge performance hit. Steve Losen Research Computing University of Virginia scl@virginia.edu 434-924-0640 On 8/29/22, 5:07 PM, "gpfsug-discuss on behalf of Jonathan Buzzard" <gpfsug-discuss-bounces@gpfsug.org on behalf of jonathan.buzzard@strath.ac.uk> wrote: On 29/08/2022 18:52, Losen, Stephen C (scl) wrote: > Hi, > > We want to export SMB shares via Spectrum Scale CES nodes. The > filesystem has ACL style set to “all” and we must set it to nfs4 with > mmchfs -k nfs4 . The filesystem currently has millions of files with > POSIX ACLs. Will this mmchfs command result in any performance impact, > such as a major rewrite of metadata? Thanks. > The operation will complete very quickly. The bigger risk is that your existing ACL's will go "puff". As I understand it GPFS stores each different ACL only once and then it points each file to the ACL. When you change the ACL type they get nuked from recollection but it is a decade now since I played around with that. I stick to NFSv4 ACL's since then because well POSIX ACL's are a bit naff frankly. I personally would have thought "-k samba" would have been preferable for your use case mine you ;-) JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss_gpfsug.org
On 29/08/2022 22:18, Losen, Stephen C (scl) wrote:
Hi Jonathan, Thanks for your reply. I didn't see "-k samba" in the docs.
You won't it's "undocumented" in the manual page but documented right at the top of the mmchfs Korn shell script as being an option, but not description as to what it actually does. My best guess is that it makes the NFSv4.1 ACL's behave more like NTFS ACL's. Especially in combination with the no directory traversal option. I seem to recall that option is documented too, but it is rather self explanatory. I think these where all put in for the old SONAS storage system that IBM used to sell to make it more "MS Windows" like. This was all before there was such things as "protocol" nodes of course.
I'll look some more. Also I didn't mention that we also need NFSv4 access and native GPFS, this will not be SMB-only. It will actually be mostly GPFS native. I don't think existing ACLs will be adversely affected.
From recollection think again. At best the existing POSIX ACL's will get converted to NFSv4 ACL's. From recollection things go screwy when you have default POSIX ACL's because they don't map to NFSv4 and then you create new files now what. Of course this might have changed or I might have got it wrong as this was experimentation I did over a decade ago on probably GPFS 3.0 or 3.1 I would strongly recommend creating a test GPFS filesystem adding some POSIX ACL's in then converting it to NFSv4 only and checking out how the ACL's work with the creation of new files.
In a test filesystem with "-k all" I set some POSIX ACLs and converted the filesystem to "-k nfs4" and the result looked reasonable. Plus I ran mmgetacl -k nfs4 on numerous files/dirs with POSIX ACLs in our production filesystem and the results looked promising.
Glad to know that switching the filesystem to -k nfs4 won't be a huge performance hit.
I have taken the approach since my experimentation in circa 2010 that you can do everything you can do with POSIX ACL's with NFSv4 ACLS so why bother with the former. Just stick to the latter and you won't have problems down the line switching to NFSv4 ACL's. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
Hi Jonathan, We are running SS 5.0.5.7 and a POSIX default ACL is converted to nfs4 ACEs with the FileInherit:DirInherit:InheritOnly flags. The corresponding active POSIX ACL is converted to nfs4 ACEs with no inheritance flags. So the two POSIX ACLs result in a single, rather large nfs4 ACL. Steve Losen Research Computing University of Virginia scl@virginia.edu 434-924-0640 On 8/30/22, 4:48 AM, "gpfsug-discuss on behalf of Jonathan Buzzard" <gpfsug-discuss-bounces@gpfsug.org on behalf of jonathan.buzzard@strath.ac.uk> wrote: On 29/08/2022 22:18, Losen, Stephen C (scl) wrote: > > Hi Jonathan, Thanks for your reply. I didn't see "-k samba" in the > docs. You won't it's "undocumented" in the manual page but documented right at the top of the mmchfs Korn shell script as being an option, but not description as to what it actually does. My best guess is that it makes the NFSv4.1 ACL's behave more like NTFS ACL's. Especially in combination with the no directory traversal option. I seem to recall that option is documented too, but it is rather self explanatory. I think these where all put in for the old SONAS storage system that IBM used to sell to make it more "MS Windows" like. This was all before there was such things as "protocol" nodes of course. > I'll look some more. Also I didn't mention that we also need > NFSv4 access and native GPFS, this will not be SMB-only. It will > actually be mostly GPFS native. I don't think existing ACLs will be > adversely affected. From recollection think again. At best the existing POSIX ACL's will get converted to NFSv4 ACL's. From recollection things go screwy when you have default POSIX ACL's because they don't map to NFSv4 and then you create new files now what. Of course this might have changed or I might have got it wrong as this was experimentation I did over a decade ago on probably GPFS 3.0 or 3.1 I would strongly recommend creating a test GPFS filesystem adding some POSIX ACL's in then converting it to NFSv4 only and checking out how the ACL's work with the creation of new files. > In a test filesystem with "-k all" I set some > POSIX ACLs and converted the filesystem to "-k nfs4" and the result > looked reasonable. Plus I ran mmgetacl -k nfs4 on numerous > files/dirs with POSIX ACLs in our production filesystem and the > results looked promising. > > Glad to know that switching the filesystem to -k nfs4 won't be a huge > performance hit. > I have taken the approach since my experimentation in circa 2010 that you can do everything you can do with POSIX ACL's with NFSv4 ACLS so why bother with the former. Just stick to the latter and you won't have problems down the line switching to NFSv4 ACL's. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss_gpfsug.org
Hi Stephen.
Also I didn't mention that we also need NFSv4 access and native GPFS, this will not be SMB-only. It will actually be mostly GPFS native.
Beware that when writing via SMB, samba default permissions will be applied to new files and folders, which might not give the permissions your users need. On our CES clusters, the samba default permission is 0755 / 0744 [1]. We want either 0770 or 0775 by default. This we get by setting these permissions in NFSv4 ACLs in relevant folders, plus turn on inheritance for the ACEs to new files and folders. The side effect of having NFSv4 ACLs with inheritance is that 'umask' in processes writing via GPFS or NFS is ignored. I have not tried. but I guees it works similarly with POSIX ACLs. [1] | # testparm -s -v | grep mask | Load smb config files from /var/mmfs/ces/smb.conf | [...] | create mask = 0744 | directory mask = 0755
I don't think existing ACLs will be adversely affected. In a test filesystem with "-k all" I set some POSIX ACLs and converted the filesystem to "-k nfs4" and the result looked reasonable. Plus I ran mmgetacl -k nfs4 on numerous files/dirs with POSIX ACLs in our production filesystem and the results looked promising.
I would recommend standardizing on one type of ACLs, which will give you less variants to deal with, simplifying administration. -- Regards, Helge Hauglin ---------------------------------------------------------------- Mr. Helge Hauglin, Senior Engineer System administrator Center for Information Technology, University of Oslo, Norway
Stephen, (And Helge, some interesting SMB stuff at the very end), The answer is no, it won't cause a conversion or take a long time, but that is a bit of speculation based on the documentation... --- inexplicably long answer below --- The GPFS documentation quite clearly states that ACL's are managed on a per file basis, so you may have intermingled POSIX and NFS4 ACL's. Past versions going back to 3.1 seem to indicate they work the same way.. https://www.ibm.com/docs/en/spectrum-scale/4.2.0?topic=lists-nfs-v4-acl-admi... A simple test: $ mmlsfs ${FS} -k flag value description ------------------- ------------------------ ----------------------------------- -k all ACL semantics in effect $ touch nfsv4acl posixacl $ mmgetacl -k nfs4 nfsv4acl | mmputacl nfsv4acl $ mmgetacl -k posix posixacl | mmputacl posixacl $ mmgetacl nfsv4acl #NFSv4 ACL #owner:XXXXXXXXXXXX #group:XXX special:owner@:rw-c:allow (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (-)DELETE (-)DELETE_CHILD (X)CHOWN (-)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED ... $ mmgetacl posixacl #owner:XXXXXXXXXXX #group:XXX user::rw-c ... $ mmgetacl -k nfs4 posixacl #NFSv4 ACL #owner:XXXXXXXXXXXX #group:XXX special:owner@:rw-c:allow (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED ... The man page for -k indicates that the user can't *ASSIGN *these ACL's it doesn't state that it won't serve or store them, so going to a more restricted mode doesn't seem to indicate that it would remove the existing ACL's. It also doesn't indicate that any conversion is happening in any circumstance (from a mmchfs). Finally the mmgetacl command has a man page that explains EXACTLY what is going on: 1. By default, mmgetacl returns the ACL in a format consistent with the file system setting, specified using the -k flag on the mmcrfs or mmchfs commands. If the setting is posix, the ACL is shown as a traditional ACL. If the setting is nfs4, the ACL is shown as an NFS V4 ACL. If the setting is all, the ACL is returned in its true form. 2. The command mmgetacl -k nfs4 always produces an NFS V4 ACL. 3. The command mmgetacl -k posix always produces a traditional ACL. 4. The command mmgetacl -k native always shows the ACL in its true form regardless of the file system setting. So the short answer is after changing -k to nfsv4 it seems mmgetacl would intuit that you want to see ACL's in nfsv4 format since POSIX isn't allowed. But you can run mmgetacl -k native to see what ACL was (and continues to be) stored for the file object. I can't change any of my FS's to not be -k all, so I couldn't test out my mmgetacl assertions. Maybe I got some details wrong here but this one seems pretty straight forward based on the documentation. Also I'm not sure I'd say that a mention of a flag embedded in a ksh script is "documented" but I expect it is more related to how SMB integrates to Spectrum Scale and perhaps there is some secret sauce leveraged here. We don't do SMB on Scale, but if I we were, this would be an interesting read: https://manpages.debian.org/testing/samba-vfs-modules/vfs_gpfs.8.en.html. Alec On Tue, Aug 30, 2022 at 3:03 AM Helge Hauglin <helge.hauglin@usit.uio.no> wrote:
Hi Stephen.
Also I didn't mention that we also need NFSv4 access and native GPFS, this will not be SMB-only. It will actually be mostly GPFS native.
Beware that when writing via SMB, samba default permissions will be applied to new files and folders, which might not give the permissions your users need.
On our CES clusters, the samba default permission is 0755 / 0744 [1]. We want either 0770 or 0775 by default. This we get by setting these permissions in NFSv4 ACLs in relevant folders, plus turn on inheritance for the ACEs to new files and folders. The side effect of having NFSv4 ACLs with inheritance is that 'umask' in processes writing via GPFS or NFS is ignored. I have not tried. but I guees it works similarly with POSIX ACLs.
[1]
| # testparm -s -v | grep mask | Load smb config files from /var/mmfs/ces/smb.conf | [...] | create mask = 0744 | directory mask = 0755
I don't think existing ACLs will be adversely affected. In a test filesystem with "-k all" I set some POSIX ACLs and converted the filesystem to "-k nfs4" and the result looked reasonable. Plus I ran mmgetacl -k nfs4 on numerous files/dirs with POSIX ACLs in our production filesystem and the results looked promising.
I would recommend standardizing on one type of ACLs, which will give you less variants to deal with, simplifying administration.
-- Regards,
Helge Hauglin
---------------------------------------------------------------- Mr. Helge Hauglin, Senior Engineer System administrator Center for Information Technology, University of Oslo, Norway
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at gpfsug.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss_gpfsug.org
participants (4)
-
Alec -
Helge Hauglin -
Jonathan Buzzard -
Losen, Stephen C (scl)
