Get list of filesets _without_ running mmlsfileset?
Hi All, Happy New Year to all! Personally, I’ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I’m referring to), but I certainly wish all of you the best! Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven’t found them yet in the searching I’ve done. The reason I’m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we’re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That’s sub-optimal for any day on which a fileset gets created or deleted, so I’m looking for a better way … one which doesn’t require root privileges and preferably doesn’t involve running a GPFS command at all. Thanks in advance. Kevin P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine. — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
I suppose you could run the underlying tslsfileset, though that's probably not the answer you're looking for. Out of curiousity, what are you hoping to gain by not running mmlsfileset? Is the problem scaling due to the number of filesets that you have defined? On Tue, Jan 08, 2019 at 10:12:22PM +0000, Buterbaugh, Kevin L wrote:
Hi All,
Happy New Year to all! Personally, I???ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I???m referring to), but I certainly wish all of you the best!
Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven???t found them yet in the searching I???ve done.
The reason I???m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we???re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That???s sub-optimal for any day on which a fileset gets created or deleted, so I???m looking for a better way ??? one which doesn???t require root privileges and preferably doesn???t involve running a GPFS command at all.
Thanks in advance.
Kevin
P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine.
??? Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
-- -- Skylar Thompson (skylar2@u.washington.edu) -- Genome Sciences Department, System Administrator -- Foege Building S046, (206)-685-7354 -- University of Washington School of Medicine
You could also wrap whatever provisioning script you're using (the thing that runs mmcrfileset), which must already be running as root, so that it also updates the cached text file afterward. -Paul -----Original Message----- From: gpfsug-discuss-bounces@spectrumscale.org <gpfsug-discuss-bounces@spectrumscale.org> On Behalf Of Skylar Thompson Sent: Wednesday, January 9, 2019 4:37 PM To: Kevin.Buterbaugh@Vanderbilt.Edu Cc: gpfsug-discuss@spectrumscale.org Subject: Re: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? I suppose you could run the underlying tslsfileset, though that's probably not the answer you're looking for. Out of curiousity, what are you hoping to gain by not running mmlsfileset? Is the problem scaling due to the number of filesets that you have defined? On Tue, Jan 08, 2019 at 10:12:22PM +0000, Buterbaugh, Kevin L wrote:
Hi All,
Happy New Year to all! Personally, I???ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I???m referring to), but I certainly wish all of you the best!
Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven???t found them yet in the searching I???ve done.
The reason I???m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we???re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That???s sub-optimal for any day on which a fileset gets created or deleted, so I???m looking for a better way ??? one which doesn???t require root privileges and preferably doesn???t involve running a GPFS command at all.
Thanks in advance.
Kevin
P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine.
??? Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu
- (615)875-9633
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
-- -- Skylar Thompson (skylar2@u.washington.edu) -- Genome Sciences Department, System Administrator -- Foege Building S046, (206)-685-7354 -- University of Washington School of Medicine _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Hi Kevin, Have you looked at the rest API? https://www.ibm.com/support/knowledgecenter/en/STXKQY_5.0.2/com.ibm.spectrum... I don't know how much access control there is available in the API so not sure if you could lock some sort of service user down to just the get filesets command? Simon _______________________________________ From: gpfsug-discuss-bounces@spectrumscale.org [gpfsug-discuss-bounces@spectrumscale.org] on behalf of Buterbaugh, Kevin L [Kevin.Buterbaugh@Vanderbilt.Edu] Sent: 08 January 2019 22:12 To: gpfsug main discussion list Subject: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? Hi All, Happy New Year to all! Personally, I’ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I’m referring to), but I certainly wish all of you the best! Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven’t found them yet in the searching I’ve done. The reason I’m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we’re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That’s sub-optimal for any day on which a fileset gets created or deleted, so I’m looking for a better way … one which doesn’t require root privileges and preferably doesn’t involve running a GPFS command at all. Thanks in advance. Kevin P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine. — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
Hi All, Let me answer Skylar’s questions in another e-mail, which may also tell whether the rest API is a possibility or not. The Python script in question is to display quota information for a user. The mmlsquota command has a couple of issues: 1) its output is confusing to some of our users, 2) more significantly, it displays a ton of information that doesn’t apply to the user running it. For example, it will display all the filesets in a filesystem whether or not the user has access to them. So the Python script figures out what group(s) the user is a member of and only displays information pertinent to them (i.e. the group of the fileset junction path is a group this user is a member of) … and in a simplified (and potentially colorized) output format. And typing that preceding paragraph caused the lightbulb to go off … I know the answer to my own question … have the script run mmlsquota and get the full list of filesets from that, then parse that to determine which ones I actually need to display quota information for. Thanks! Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Jan 9, 2019, at 4:42 PM, Simon Thompson <S.J.Thompson@bham.ac.uk<mailto:S.J.Thompson@bham.ac.uk>> wrote: Hi Kevin, Have you looked at the rest API? https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fknowledgecenter%2Fen%2FSTXKQY_5.0.2%2Fcom.ibm.spectrum.scale.v5r02.doc%2Fbl1adm_listofapicommands.htm&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C36fb451ce9a945f5e0cb08d67683af85%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636826705300525885&sdata=uotWilntiZa2E9RIBE2ikhxxBm3Mk3y%2FW%2FKUHovaJpY%3D&reserved=0 I don't know how much access control there is available in the API so not sure if you could lock some sort of service user down to just the get filesets command? Simon _______________________________________ From: gpfsug-discuss-bounces@spectrumscale.org [gpfsug-discuss-bounces@spectrumscale.org] on behalf of Buterbaugh, Kevin L [Kevin.Buterbaugh@Vanderbilt.Edu] Sent: 08 January 2019 22:12 To: gpfsug main discussion list Subject: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? Hi All, Happy New Year to all! Personally, I’ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I’m referring to), but I certainly wish all of you the best! Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven’t found them yet in the searching I’ve done. The reason I’m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we’re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That’s sub-optimal for any day on which a fileset gets created or deleted, so I’m looking for a better way … one which doesn’t require root privileges and preferably doesn’t involve running a GPFS command at all. Thanks in advance. Kevin P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine. — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C36fb451ce9a945f5e0cb08d67683af85%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636826705300525885&sdata=WSijRrjhOgQyuWsh9K8ckpjf%2F2CkXfZW1n%2BJw5Gw5tw%3D&reserved=0
Hi Andrew / All, Well, it does _sound_ useful, but in its current state it’s really not for several reasons, mainly having to do with it being coded in a moderately site-specific way. It needs an overhaul anyway, so I’m going to look at getting rid of as much of that as possible (there’s some definite low-hanging fruit there) and, for the site-specific things that can’t be gotten rid of, maybe consolidating them into one place in the code so that the script could be more generally useful if you just change those values. If I can accomplish those things, then yes, we’d be glad to share the script. But I’ve also realized that I didn’t _entirely_ answer my original question. Yes, mmlsquota will show me all the filesets … but I also need to know the junction path for each of those filesets. One of the main reasons we wrote this script in the first place is that if you run mmlsquota you see that you have no limits on about 60 filesets (currently we use fileset quotas only on our filesets) … and that’s because there are no user (or group) quotas in those filesets. The script, however, reads in that text file that is created nightly by root that is nothing more than the output of “mmlsfileset <filesystem name>”, gets the junction path, looks up the GID of the junction path, and sees if you’re a member of that group. If you’re not, well, no sense in showing you anything about that fileset. But, of course, if you are a member of that group, then we do want to show you the fileset quota for that fileset. So … my question now is, “Is there a way for a non-root user” to get the junction path for the fileset(s)? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Jan 9, 2019, at 7:13 PM, Andrew Beattie <abeattie@au1.ibm.com<mailto:abeattie@au1.ibm.com>> wrote: Kevin, That sounds like a useful script would you care to share? Thanks Andrew Beattie Software Defined Storage - IT Specialist Phone: 614-2133-7927 E-mail: abeattie@au1.ibm.com<mailto:abeattie@au1.ibm.com> ----- Original message ----- From: "Buterbaugh, Kevin L" <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent by: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org<mailto:gpfsug-discuss@spectrumscale.org>> Cc: Subject: Re: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? Date: Thu, Jan 10, 2019 9:22 AM Hi All, Let me answer Skylar’s questions in another e-mail, which may also tell whether the rest API is a possibility or not. The Python script in question is to display quota information for a user. The mmlsquota command has a couple of issues: 1) its output is confusing to some of our users, 2) more significantly, it displays a ton of information that doesn’t apply to the user running it. For example, it will display all the filesets in a filesystem whether or not the user has access to them. So the Python script figures out what group(s) the user is a member of and only displays information pertinent to them (i.e. the group of the fileset junction path is a group this user is a member of) … and in a simplified (and potentially colorized) output format. And typing that preceding paragraph caused the lightbulb to go off … I know the answer to my own question … have the script run mmlsquota and get the full list of filesets from that, then parse that to determine which ones I actually need to display quota information for. Thanks! Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Jan 9, 2019, at 4:42 PM, Simon Thompson <S.J.Thompson@bham.ac.uk<mailto:S.J.Thompson@bham.ac.uk>> wrote: Hi Kevin, Have you looked at the rest API? https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fknowledgecenter%2Fen%2FSTXKQY_5.0.2%2Fcom.ibm.spectrum.scale.v5r02.doc%2Fbl1adm_listofapicommands.htm&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C36fb451ce9a945f5e0cb08d67683af85%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636826705300525885&sdata=uotWilntiZa2E9RIBE2ikhxxBm3Mk3y%2FW%2FKUHovaJpY%3D&reserved=0<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fknowledgecenter%2Fen%2FSTXKQY_5.0.2%2Fcom.ibm.spectrum.scale.v5r02.doc%2Fbl1adm_listofapicommands.htm&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cc1ffac821c5f4524104908d67698e948%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636826796466979672&sdata=0%2FsV4sgFJmyJjaETdNtmsRP21pm5zFSYdpr9eNtDSs4%3D&reserved=0> I don't know how much access control there is available in the API so not sure if you could lock some sort of service user down to just the get filesets command? Simon _______________________________________ From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> [gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>] on behalf of Buterbaugh, Kevin L [Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>] Sent: 08 January 2019 22:12 To: gpfsug main discussion list Subject: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? Hi All, Happy New Year to all! Personally, I’ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I’m referring to), but I certainly wish all of you the best! Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven’t found them yet in the searching I’ve done. The reason I’m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we’re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That’s sub-optimal for any day on which a fileset gets created or deleted, so I’m looking for a better way … one which doesn’t require root privileges and preferably doesn’t involve running a GPFS command at all. Thanks in advance. Kevin P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine. — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu><mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C36fb451ce9a945f5e0cb08d67683af85%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636826705300525885&sdata=WSijRrjhOgQyuWsh9K8ckpjf%2F2CkXfZW1n%2BJw5Gw5tw%3D&reserved=0 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> http://gpfsug.org/mailman/listinfo/gpfsug-discuss<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cc1ffac821c5f4524104908d67698e948%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636826796466989681&sdata=u32oTmCl3WXoCpPQQplOtAeAuzfNfHBjUmg%2BU194rbI%3D&reserved=0> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cc1ffac821c5f4524104908d67698e948%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636826796467009700&sdata=Xfz4JiItI8ukHgnvO5YoN27jVpk6Ngsk03NtMrKJcHk%3D&reserved=0
“Is there a way for a non-root user” to get the junction path for the fileset(s)? Presuming the user has some path to some file in the fileset... Issue `mmlsattr -L path` then "walk" back towards the root by discarding successive path suffixes and watch for changes in the fileset name field Why doesn't mmlsfileset work for non-root users? I don't know. Perhaps the argument has to do with security or confidentiality. On my test system it gives a bogus error, when it should say something about root or super-user.
We have a similar issue, I'm wondering if getting mmlsfileset to work as a user is a reasonable "request for enhancement" I suspect it would need better wording. We too have a rather complex script to report on quota's that I suspect does a similar job. It works by having all the filesets mounted in known locations and names matching mount point names. It then works out which ones are needed by looking at the group ownership, Its very slow and a little cumbersome. Not least because it was written ages ago in a mix of bash, sed, awk and find. On Tue, 2019-01-08 at 22:12 +0000, Buterbaugh, Kevin L wrote: Hi All, Happy New Year to all! Personally, I’ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I’m referring to), but I certainly wish all of you the best! Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven’t found them yet in the searching I’ve done. The reason I’m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we’re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That’s sub-optimal for any day on which a fileset gets created or deleted, so I’m looking for a better way … one which doesn’t require root privileges and preferably doesn’t involve running a GPFS command at all. Thanks in advance. Kevin P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine. — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss -- Peter Childs ITS Research Storage Queen Mary, University of London
What we do is the use “mmlsquota -Y <device>” which will list out all the filesets in an easily parseable format. And the command can be run by the user. From: gpfsug-discuss-bounces@spectrumscale.org <gpfsug-discuss-bounces@spectrumscale.org> On Behalf Of Peter Childs Sent: Friday, January 11, 2019 6:50 AM To: gpfsug-discuss@spectrumscale.org Subject: Re: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? ◆ This message was sent from a non-UWYO address. Please exercise caution when clicking links or opening attachments from external sources. We have a similar issue, I'm wondering if getting mmlsfileset to work as a user is a reasonable "request for enhancement" I suspect it would need better wording. We too have a rather complex script to report on quota's that I suspect does a similar job. It works by having all the filesets mounted in known locations and names matching mount point names. It then works out which ones are needed by looking at the group ownership, Its very slow and a little cumbersome. Not least because it was written ages ago in a mix of bash, sed, awk and find. On Tue, 2019-01-08 at 22:12 +0000, Buterbaugh, Kevin L wrote: Hi All, Happy New Year to all! Personally, I’ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I’m referring to), but I certainly wish all of you the best! Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven’t found them yet in the searching I’ve done. The reason I’m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we’re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That’s sub-optimal for any day on which a fileset gets created or deleted, so I’m looking for a better way … one which doesn’t require root privileges and preferably doesn’t involve running a GPFS command at all. Thanks in advance. Kevin P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine. — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss -- Peter Childs ITS Research Storage Queen Mary, University of London
Hi All, I appreciate the time several of you have taken to respond to my inquiry. However, unless I’m missing something - and my apologies if I am - none so far appear to allow me to obtain the list of junction paths as a non-root user. Yes, mmlsquota shows all the filesets. But from there I need to then be able to find out where that fileset is mounted in the directory tree so that I can see who the owner and group of that directory are. Only if the user running the script is either the owner or a member of the group do I want to display the fileset quota for that fileset to the user. Thanks again… Kevin On Jan 11, 2019, at 10:24 AM, Jeffrey R. Lang <JRLang@uwyo.edu<mailto:JRLang@uwyo.edu>> wrote: What we do is the use “mmlsquota -Y <device>” which will list out all the filesets in an easily parseable format. And the command can be run by the user. From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>> On Behalf Of Peter Childs Sent: Friday, January 11, 2019 6:50 AM To: gpfsug-discuss@spectrumscale.org<mailto:gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? ◆ This message was sent from a non-UWYO address. Please exercise caution when clicking links or opening attachments from external sources. We have a similar issue, I'm wondering if getting mmlsfileset to work as a user is a reasonable "request for enhancement" I suspect it would need better wording. We too have a rather complex script to report on quota's that I suspect does a similar job. It works by having all the filesets mounted in known locations and names matching mount point names. It then works out which ones are needed by looking at the group ownership, Its very slow and a little cumbersome. Not least because it was written ages ago in a mix of bash, sed, awk and find. On Tue, 2019-01-08 at 22:12 +0000, Buterbaugh, Kevin L wrote: Hi All, Happy New Year to all! Personally, I’ll gladly and gratefully settle for 2019 not being a dumpster fire like 2018 was (those who attended my talk at the user group meeting at SC18 know what I’m referring to), but I certainly wish all of you the best! Is there a way to get a list of the filesets in a filesystem without running mmlsfileset? I was kind of expecting to find them in one of the config files somewhere under /var/mmfs but haven’t found them yet in the searching I’ve done. The reason I’m asking is that we have a Python script that users can run that needs to get a list of all the filesets in a filesystem. There are obviously multiple issues with that, so the workaround we’re using for now is to have a cron job which runs mmlsfileset once a day and dumps it out to a text file, which the script then reads. That’s sub-optimal for any day on which a fileset gets created or deleted, so I’m looking for a better way … one which doesn’t require root privileges and preferably doesn’t involve running a GPFS command at all. Thanks in advance. Kevin P.S. I am still working on metadata and iSCSI testing and will report back on that when complete. P.P.S. We ended up adding our new NSDs comprised of (not really) 12 TB disks to the capacity pool and things are working fine. — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org/> http://gpfsug.org/mailman/listinfo/gpfsug-discuss<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cee10c1e22a474fedceb408d678318231%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636828551398045995&sdata=m0nd3Ln0qalNEUCGQmj%2B2ZEQXYCTPzKiYJcSmFXkGZQ%3D&reserved=0> -- Peter Childs ITS Research Storage Queen Mary, University of London _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org/> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cee10c1e22a474fedceb408d678318231%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636828551398056004&sdata=F56RKhMef0zYjAj2dKFu3bAuq7xQvFoulYhwDnfN1Ms%3D&reserved=0
On Sat, 12 Jan 2019 03:07:29 +0000, "Buterbaugh, Kevin L" said:
But from there I need to then be able to find out where that fileset is mounted in the directory tree so that I can see who the owner and group of that directory are.
You're not able to leverage a local naming scheme? There's no connection between the name of the fileset and where it is in the tree? I would hope there is, because otherwise when your tool says 'Fileset ag5eg19 is over quota', your poor user will now be confused over what director(y/ies) need to be cleaned up. If your tool says 'Fileset foo_bar_baz is over quota' and the user knows that's mounted at /gpfs/foo/bar/baz then it's actionable. And if the user knows what the mapping is, your script can know it too....
Kevin, Something I've done in the past is to create a service that once an hour/day/week that would build a static file that consists of the needed output. As long as you can take the update delay (or perhaps trigger the update with a callback), this should work and could actually be lighter on the system. Sent from my BlackBerry - the most secure mobile device Original Message From: valdis.kletnieks@vt.edu Sent: January 12, 2019 4:07 PM To: gpfsug-discuss@spectrumscale.org Reply-to: gpfsug-discuss@spectrumscale.org Subject: Re: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset? On Sat, 12 Jan 2019 03:07:29 +0000, "Buterbaugh, Kevin L" said:
But from there I need to then be able to find out where that fileset is mounted in the directory tree so that I can see who the owner and group of that directory are.
You're not able to leverage a local naming scheme? There's no connection between the name of the fileset and where it is in the tree? I would hope there is, because otherwise when your tool says 'Fileset ag5eg19 is over quota', your poor user will now be confused over what director(y/ies) need to be cleaned up. If your tool says 'Fileset foo_bar_baz is over quota' and the user knows that's mounted at /gpfs/foo/bar/baz then it's actionable. And if the user knows what the mapping is, your script can know it too.... _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Hi Scott and Valdis (and everyone else), Thanks for your responses. Yes, we _could_ easily build a local naming scheme … the name of the fileset matches the name of a folder in one of a couple of parent directories. However, an earlier response to my post asked if we’d be willing to share our script with the community and we would … _if_ we can make it generic enough to be useful. Local naming schemes hardcoded in the script make it much less generically useful. Plus, it just seems to me that there ought to be a way to do this … to get a list of fileset names from mmlsquota and then programmatically determine their junction path without having root privileges. GPFS has got to be storing that information somewhere, and I’m frankly quite surprised that no IBMer has responded with an answer to that. But I also know that when IBM is silent, there’s typically a reason. And yes, we could regularly create a static file … in fact, that’s what we do now once per day (in the early morning hours). While this is not a huge deal - we only create / delete filesets a handful of times per month - on the day we do the script won’t function properly unless we manually update the file. I’m wanting to eliminate that, if possible … which as I stated in the preceding paragraph, I have a hard time believing is not possible. I did look at the list of callbacks again (good thought!) and there’s not one specifically related to the creation / deletion of a fileset. There was only one that I saw that I think could even possibly be of use … ccrFileChange. Can anyone on the list confirm or deny that the creation / deletion of a fileset would cause that callback to be triggered?? If it is triggered, then we could use that to update the static filesets within a minute or two of the change being made, which would definitely be acceptable. I realize that many things likely trigger a ccrFileChange, so I’m thinking of having a callback script that checks the current list of filesets against the static file and updates that appropriately. Thanks again for the responses… Kevin
On Jan 13, 2019, at 10:09 PM, Scott Goldman <scottg@emailhosting.com> wrote:
Kevin, Something I've done in the past is to create a service that once an hour/day/week that would build a static file that consists of the needed output.
As long as you can take the update delay (or perhaps trigger the update with a callback), this should work and could actually be lighter on the system.
Sent from my BlackBerry - the most secure mobile device
Original Message From: valdis.kletnieks@vt.edu Sent: January 12, 2019 4:07 PM To: gpfsug-discuss@spectrumscale.org Reply-to: gpfsug-discuss@spectrumscale.org Subject: Re: [gpfsug-discuss] Get list of filesets _without_ running mmlsfileset?
On Sat, 12 Jan 2019 03:07:29 +0000, "Buterbaugh, Kevin L" said:
But from there I need to then be able to find out where that fileset is mounted in the directory tree so that I can see who the owner and group of that directory are.
You're not able to leverage a local naming scheme? There's no connection between the name of the fileset and where it is in the tree? I would hope there is, because otherwise when your tool says 'Fileset ag5eg19 is over quota', your poor user will now be confused over what director(y/ies) need to be cleaned up. If your tool says 'Fileset foo_bar_baz is over quota' and the user knows that's mounted at /gpfs/foo/bar/baz then it's actionable.
And if the user knows what the mapping is, your script can know it too....
Personally, I agree that there ought to be a way in the product. In the meawhile, you no doubt already have some ways to tell your users where to find their filesets as pathnames. Otherwise, how are they accessing their files? And to keep things somewhat sane, I'd bet filesets are all linked to one or small number of well known paths in the filesystem. Like /AGpfsFilesystem/filesets/... Plus you could add symlinks and/or as has been suggested post info extracted from mmlsfileset and/or mmlsquota. So as a practical matter, is this an urgent problem...? Why? How?
Hi Marc (All), Yes, I can easily determine where filesets are linked here … it is, as you said, in just one or two paths. The script as it stands now has been doing that for several years and only needs a couple of relatively minor tweaks to be even more useful to _us_ by whittling down a couple of edge cases relating to fileset creation / deletion. However … there was a request to share the script with the broader community … something I’m willing to do if I can get it in a state where it would be useful to others with little or no modification. Anybody who’s been on this list for any length of time knows how much help I’ve received from the community over the years. I truly appreciate that and would like to give back, even in a minor way, if possible. But in order to do that the script can’t be full of local assumptions … that’s it in a nutshell … that’s why I want to programmatically determine the junction path at run time as a non-root user. I’ll also mention here that early on in this thread Simon Thompson suggested looking into the REST API. Sure enough, you can get the information that way … but, AFAICT, that would require the script to contain a username / password combination that would allow anyone with access to the script to then use that authentication information to access other information within GPFS that we probably don’t want them to have access to. If I’m mistaken about that, then please feel free to enlighten me. Thanks again… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Jan 15, 2019, at 8:46 AM, Marc A Kaplan <makaplan@us.ibm.com<mailto:makaplan@us.ibm.com>> wrote: Personally, I agree that there ought to be a way in the product. In the meawhile, you no doubt already have some ways to tell your users where to find their filesets as pathnames. Otherwise, how are they accessing their files? And to keep things somewhat sane, I'd bet filesets are all linked to one or small number of well known paths in the filesystem. Like /AGpfsFilesystem/filesets/... Plus you could add symlinks and/or as has been suggested post info extracted from mmlsfileset and/or mmlsquota. So as a practical matter, is this an urgent problem...? Why? How? _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cbd2c28fdb60041f3434e08d67af83b11%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636831603904557717&sdata=A74TTq%2FQvyhEMHaolklbiMAEnaGVuHNiyhVYfn4wRek%3D&reserved=0
Good to know the "Rest" does it for us. Since I started working on GPFS internals and CLI utitlities around Release 3.x, I confess I never had need of the GUI or the Rest API server. In fact I do most of my work remotely via Putty/Xterm/Emacs and only once-in-a-while even have an XWindows or VNC server/view of a GPFS node! So consider any of my remarks in that context. So I certainly defer to others when it comes to Spectrum Scale GUIs, "Protocol" servers and such. If I'm missing anything great, perhaps some kind soul will send me a note offline from this public forum. --Marc.K of GPFS
Hi All, I just wanted to follow up on this thread … the only way I have found to obtain a list of filesets and their associated junction paths as a non-root user is via the REST API (and thanks to those who suggested that). However, AFAICT querying the REST API via a script would expose the username / password used to do so to anyone who bothered to look at the code, which would in turn allow a knowledgeable and curious user to query the REST API themselves for other information we do not necessarily want to expose to them. Therefore, it is not an acceptable solution to us. Therefore, unless someone responds with a way to allow a non-root user to obtain fileset junction paths that doesn’t involve the REST API, I’m afraid I’m at a dead end in terms of making our quota usage Python script something that I can share with the broader community. It just has too much site-specific code in it. Sorry… Kevin P.S. In case you’re curious about how the quota script is obtaining those junction paths … we have a cron job that runs once per hour on the cluster manager that dumps the output of mmlsfileset to a text file, which the script then reads. The cron job used to just run once per day and used to just run mmlsfileset. I have modified it to be a shell script which checks for the load average on the cluster manager being less than 10 and that there are no waiters of more than 10 seconds duration. If both of those conditions are true, it runs mmlsfileset. If either are not, it simply exits … the idea being that one or both of those would likely be true if something were going on with the cluster manager that would cause the mmlsfileset to hang. I have also modified the quota script itself so that it checks that the junction path for a fileset actually exists before attempting to stat it (duh - should’ve done that from the start), which handles the case where a user would run the quota script and it would bomb off with an exception because the fileset was deleted and the cron job hadn’t run yet. If a new fileset is created, well, it just won’t get checked by the quota script until the cron job runs successfully. We have decided that this is an acceptable compromise. On Jan 15, 2019, at 8:46 AM, Marc A Kaplan <makaplan@us.ibm.com<mailto:makaplan@us.ibm.com>> wrote: Personally, I agree that there ought to be a way in the product. In the meawhile, you no doubt already have some ways to tell your users where to find their filesets as pathnames. Otherwise, how are they accessing their files? And to keep things somewhat sane, I'd bet filesets are all linked to one or small number of well known paths in the filesystem. Like /AGpfsFilesystem/filesets/... Plus you could add symlinks and/or as has been suggested post info extracted from mmlsfileset and/or mmlsquota. So as a practical matter, is this an urgent problem...? Why? How? _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
participants (11)
-
Alexander Wolf -
Andrew Beattie -
Buterbaugh, Kevin L -
Jeffrey R. Lang -
Marc A Kaplan -
Peter Childs -
Sanchez, Paul -
Scott Goldman -
Simon Thompson -
Skylar Thompson -
valdis.kletnieks@vt.edu
