GPFS, LTFS/EE and data-in-inode?
So we're running GPFS 4.2.2.3 and LTFS/EE 1.2.3 to use as an archive service. Inode size is 4K, and we had a requirement to encrypt-at-rest, so encryption is in play as well. Data is replicated 2x and fragment size is 32K. I was investigating how much data-in-inode would help deal with users who put large trees of small files into the archive (yes, I know we can use applypolicy with external programs to tarball offending directories, but that's a separate discussion ;) ## ls -ls * 64 -rw-r--r-- 1 root root 2048 Jul 21 14:47 random.data 64 -rw-r--r-- 1 root root 512 Jul 21 14:48 random.data.1 64 -rw-r--r-- 1 root root 128 Jul 21 14:50 random.data.2 64 -rw-r--r-- 1 root root 32 Jul 21 14:50 random.data.3 64 -rw-r--r-- 1 root root 16 Jul 21 14:50 random.data.4 Hmm.. I was expecting at least *some* of these to fit in the inode, and not take 2 32K blocks... ## mmlsattr -d -L random.data.4 file name: random.data.4 metadata replication: 2 max 2 data replication: 2 max 2 immutable: no appendOnly: no flags: storage pool name: system fileset name: root snapshot name: creation time: Fri Jul 21 14:50:51 2017 Misc attributes: ARCHIVE Encrypted: yes gpfs.Encryption: 0x4541 (... another 296 hex digits) EncPar 'AES:256:XTS:FEK:HMACSHA512' type: wrapped FEK WrpPar 'AES:KWRAP' CmbPar 'XORHMACSHA512' KEY-97c7f4b7-06cb-4a53-b317-1c187432dc62:archKEY1_gpfsG1 Hmm.. Doesn't *look* like enough extended attributes to prevent storing even 16 bytes in the inode, should be room for around 3.5K minus the above 250 bytes or so of attributes.... What am I missing here? Does "encrypted" or LTFS/EE disable data-in-inode?
Hi, i talked with a few others to confirm this, but unfortunate this is a limitation of the code today (maybe not well documented which we will look into). Encryption only encrypts data blocks, it doesn't encrypt metadata. Hence, if encryption is enabled, we don't store data in the inode, because then it wouldn't be encrypted. For the same reason HAWC and encryption are incompatible. Sven On Fri, Jul 21, 2017 at 2:13 PM <valdis.kletnieks@vt.edu> wrote:
So we're running GPFS 4.2.2.3 and LTFS/EE 1.2.3 to use as an archive service. Inode size is 4K, and we had a requirement to encrypt-at-rest, so encryption is in play as well. Data is replicated 2x and fragment size is 32K.
I was investigating how much data-in-inode would help deal with users who put large trees of small files into the archive (yes, I know we can use applypolicy with external programs to tarball offending directories, but that's a separate discussion ;)
## ls -ls * 64 -rw-r--r-- 1 root root 2048 Jul 21 14:47 random.data 64 -rw-r--r-- 1 root root 512 Jul 21 14:48 random.data.1 64 -rw-r--r-- 1 root root 128 Jul 21 14:50 random.data.2 64 -rw-r--r-- 1 root root 32 Jul 21 14:50 random.data.3 64 -rw-r--r-- 1 root root 16 Jul 21 14:50 random.data.4
Hmm.. I was expecting at least *some* of these to fit in the inode, and not take 2 32K blocks...
## mmlsattr -d -L random.data.4 file name: random.data.4 metadata replication: 2 max 2 data replication: 2 max 2 immutable: no appendOnly: no flags: storage pool name: system fileset name: root snapshot name: creation time: Fri Jul 21 14:50:51 2017 Misc attributes: ARCHIVE Encrypted: yes gpfs.Encryption: 0x4541 (... another 296 hex digits) EncPar 'AES:256:XTS:FEK:HMACSHA512' type: wrapped FEK WrpPar 'AES:KWRAP' CmbPar 'XORHMACSHA512' KEY-97c7f4b7-06cb-4a53-b317-1c187432dc62:archKEY1_gpfsG1
Hmm.. Doesn't *look* like enough extended attributes to prevent storing even 16 bytes in the inode, should be room for around 3.5K minus the above 250 bytes or so of attributes....
What am I missing here? Does "encrypted" or LTFS/EE disable data-in-inode? _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
On Fri, 21 Jul 2017 22:04:32 -0000, Sven Oehme said:
i talked with a few others to confirm this, but unfortunate this is a limitation of the code today (maybe not well documented which we will look into). Encryption only encrypts data blocks, it doesn't encrypt metadata. Hence, if encryption is enabled, we don't store data in the inode, because then it wouldn't be encrypted. For the same reason HAWC and encryption are incompatible.
I can live with that restriction if it's documented better, thanks...
I suppose the distinction between data, metadata and data IN metadata could be made. Whilst it is clear to me (us) now, perhaps the thought was that the data would be encrypted even if it was stored inside the metadata. My two pence. Richard From: gpfsug-discuss-bounces@spectrumscale.org [mailto:gpfsug-discuss-bounces@spectrumscale.org] On Behalf Of James Davis Sent: 24 July 2017 15:45 To: gpfsug-discuss@spectrumscale.org Subject: Re: [gpfsug-discuss] GPFS, LTFS/EE and data-in-inode? Hey all, On the documentation of encryption restrictions and encryption/HAWC interplay... The encryption documentation currently states: "Secure storage uses encryption to make data unreadable to anyone who does not possess the necessary encryption keys...Only data, not metadata, is encrypted." The HAWC restrictions include: "Encrypted data is never stored in the recovery log..." If this is unclear, I'm open to suggestions for improvements. Cordially, Jamie ----- Original message ----- From: valdis.kletnieks@vt.edu<mailto:valdis.kletnieks@vt.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] GPFS, LTFS/EE and data-in-inode? Date: Fri, Jul 21, 2017 6:24 PM On Fri, 21 Jul 2017 22:04:32 -0000, Sven Oehme said:
i talked with a few others to confirm this, but unfortunate this is a limitation of the code today (maybe not well documented which we will look into). Encryption only encrypts data blocks, it doesn't encrypt metadata. Hence, if encryption is enabled, we don't store data in the inode, because then it wouldn't be encrypted. For the same reason HAWC and encryption are incompatible.
I can live with that restriction if it's documented better, thanks... [Document Icon]attq4saq.dat<https://mail.notes.na.collabserv.com/livemail/0/82a99bcc9635f22a6009b956b156...> Type: application/pgp-signature Name: attq4saq.dat _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
On Mon, 2017-07-24 at 14:45 +0000, James Davis wrote:
Hey all,
On the documentation of encryption restrictions and encryption/HAWC interplay...
The encryption documentation currently states:
"Secure storage uses encryption to make data unreadable to anyone who does not possess the necessary encryption keys...Only data, not metadata, is encrypted."
The HAWC restrictions include:
"Encrypted data is never stored in the recovery log..."
If this is unclear, I'm open to suggestions for improvements.
Just because *DATA* is stored in the metadata does not make it magically metadata. It's still data so you could quite reasonably conclude that it is encrypted. We have now been disabused of this, but the documentation is not clear and needs clarifying. Perhaps say metadata blocks are not encrypted. Or just a simple data stored in inodes is not encrypted would suffice. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On Jul 24, 2017, at 10:57 AM, Jonathan Buzzard <jonathan@buzzard.me.uk <mailto:jonathan@buzzard.me.uk>> wrote:
On Mon, 2017-07-24 at 14:45 +0000, James Davis wrote:
Hey all,
On the documentation of encryption restrictions and encryption/HAWC interplay...
The encryption documentation currently states:
"Secure storage uses encryption to make data unreadable to anyone who does not possess the necessary encryption keys...Only data, not metadata, is encrypted."
The HAWC restrictions include:
"Encrypted data is never stored in the recovery log..."
If this is unclear, I'm open to suggestions for improvements.
Just because *DATA* is stored in the metadata does not make it magically metadata. It's still data so you could quite reasonably conclude that it is encrypted.
[…]
JAB.
+1. Also, "Encrypted data is never stored in the recovery log…" does not make it clear whether: The data that is supposed to be encrypted is not written to the recovery log. The data that is supposed to be encrypted is written to the recovery log, but is not encrypted there. Thanks, -- Stephen
Jonathan, all, We'll be introducing some clarification into the publications to highlight that data is not stored in the inode for encrypted files. Regards, The Spectrum Scale (GPFS) team ------------------------------------------------------------------------------------------------------------------ If you feel that your question can benefit other users of Spectrum Scale (GPFS), then please post it to the public IBM developerWroks Forum at https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0... . If your query concerns a potential software error in Spectrum Scale (GPFS) and you have an IBM software maintenance contract please contact 1-800-237-5511 in the United States or your local IBM Service Center in other countries. The forum is informally monitored as time permits and should not be used for priority messages to the Spectrum Scale (GPFS) team. From: Jonathan Buzzard <jonathan@buzzard.me.uk> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 07/24/2017 10:57 AM Subject: Re: [gpfsug-discuss] GPFS, LTFS/EE and data-in-inode? Sent by: gpfsug-discuss-bounces@spectrumscale.org On Mon, 2017-07-24 at 14:45 +0000, James Davis wrote:
Hey all,
On the documentation of encryption restrictions and encryption/HAWC interplay...
The encryption documentation currently states:
"Secure storage uses encryption to make data unreadable to anyone who does not possess the necessary encryption keys...Only data, not metadata, is encrypted."
The HAWC restrictions include:
"Encrypted data is never stored in the recovery log..."
If this is unclear, I'm open to suggestions for improvements.
Just because *DATA* is stored in the metadata does not make it magically metadata. It's still data so you could quite reasonably conclude that it is encrypted. We have now been disabused of this, but the documentation is not clear and needs clarifying. Perhaps say metadata blocks are not encrypted. Or just a simple data stored in inodes is not encrypted would suffice. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
On Fri, 2017-07-21 at 17:13 -0400, valdis.kletnieks@vt.edu wrote:
So we're running GPFS 4.2.2.3 and LTFS/EE 1.2.3 to use as an archive service. Inode size is 4K, and we had a requirement to encrypt-at-rest, so encryption is in play as well. Data is replicated 2x and fragment size is 32K.
For an archive service how about only accepting files in actual "archive" formats and then severely restricting the number of files a user can have? By archive files I am thinking like a .zip, tar.gz, tar.bz or similar. Has a number of effects. Firstly it makes the files "big" so they move to tape efficiently. It also makes it less likely the end user will try and use it as an general purpose file server. As it's an archive there should be no problem for the user to bundle all the files into a .zip file or similar. Noting that Windows Vista and up handle ZIP64 files getting around the older 4GB and 65k files limit. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On Mon, 24 Jul 2017 12:43:10 +0100, Jonathan Buzzard said:
For an archive service how about only accepting files in actual "archive" formats and then severely restricting the number of files a user can have?
By archive files I am thinking like a .zip, tar.gz, tar.bz or similar.
After having dealt with users who fill up disk storage for almost 4 decades now, I'm fully aware of those advantages. :) ( /me ponders when an IBM 2314 disk pack with 27M of space was "a lot" in 1978, and when we moved 2 IBM mainframes in 1989, 400G took 2,500+ square feet, and now 8T drives are all over the place...) On the flip side, my current project is migrating 5 petabytes of data from our old archive system that didn't have such rules (mostly due to politics and the fact that the underlying XFS filesystem uses a 4K blocksize so it wasn't as big an issue), so I'm stuck with what people put in there years ago.
On Mon, 2017-07-24 at 11:49 -0400, valdis.kletnieks@vt.edu wrote:
On Mon, 24 Jul 2017 12:43:10 +0100, Jonathan Buzzard said:
For an archive service how about only accepting files in actual "archive" formats and then severely restricting the number of files a user can have?
By archive files I am thinking like a .zip, tar.gz, tar.bz or similar.
After having dealt with users who fill up disk storage for almost 4 decades now, I'm fully aware of those advantages. :)
( /me ponders when an IBM 2314 disk pack with 27M of space was "a lot" in 1978, and when we moved 2 IBM mainframes in 1989, 400G took 2,500+ square feet, and now 8T drives are all over the place...)
On the flip side, my current project is migrating 5 petabytes of data from our old archive system that didn't have such rules (mostly due to politics and the fact that the underlying XFS filesystem uses a 4K blocksize so it wasn't as big an issue), so I'm stuck with what people put in there years ago.
I would be tempted to zip up the directories and move them ziped ;-) JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
I agree with Jonathan. In my experience, if you look at why there are many small files being stored by researchers, these are either the results of data acquisition - high speed cameras, microscopes, or in my experience a wind tunnel. Or the images are a sequence of images produced by a simulation which are later post-processed into a movie or Ensight/Paraview format. When questioned, the resaechers will always say "but I would like to keep this data available just in case". In reality those files are never looked at again. And as has been said if you have a tape based archiving system you could end up with thousands of small files being spread all over your tapes. So it is legitimate to make zips / tars of directories like that. I am intrigued to see that GPFS has a policy facility which can call an external program. That is useful. -----Original Message----- From: gpfsug-discuss-bounces@spectrumscale.org [mailto:gpfsug-discuss-bounces@spectrumscale.org] On Behalf Of Jonathan Buzzard Sent: Tuesday, July 25, 2017 11:02 AM To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] GPFS, LTFS/EE and data-in-inode? On Mon, 2017-07-24 at 11:49 -0400, valdis.kletnieks@vt.edu wrote:
On Mon, 24 Jul 2017 12:43:10 +0100, Jonathan Buzzard said:
For an archive service how about only accepting files in actual "archive" formats and then severely restricting the number of files a user can have?
By archive files I am thinking like a .zip, tar.gz, tar.bz or similar.
After having dealt with users who fill up disk storage for almost 4 decades now, I'm fully aware of those advantages. :)
( /me ponders when an IBM 2314 disk pack with 27M of space was "a lot" in 1978, and when we moved 2 IBM mainframes in 1989, 400G took 2,500+ square feet, and now 8T drives are all over the place...)
On the flip side, my current project is migrating 5 petabytes of data from our old archive system that didn't have such rules (mostly due to politics and the fact that the underlying XFS filesystem uses a 4K blocksize so it wasn't as big an issue), so I'm stuck with what people put in there years ago.
I would be tempted to zip up the directories and move them ziped ;-) JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org... -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. Neither the sender nor the company/group of companies he or she represents shall be liable for the proper and complete transmission of the information contained in this communication, or for any delay in its receipt.
On Tue, 2017-07-25 at 09:30 +0000, John Hearns wrote:
I agree with Jonathan.
In my experience, if you look at why there are many small files being stored by researchers, these are either the results of data acquisition - high speed cameras, microscopes, or in my experience a wind tunnel. Or the images are a sequence of images produced by a simulation which are later post-processed into a movie or Ensight/Paraview format. When questioned, the resaechers will always say "but I would like to keep this data available just in case". In reality those files are never looked at again. And as has been said if you have a tape based archiving system you could end up with thousands of small files being spread all over your tapes. So it is legitimate to make zips / tars of directories like that.
Note that rules on data retention may require them to keep them for 10 years, so it is not unreasonable. Letting them spew thousands of files into an "archive" is not sensible. I was thinking of ways of getting the users to do it, and I guess leaving them with zero available file number quota in the new system would force them to zip up their data so they could add new stuff ;-) Archives in my view should have no quota on the space, only quota's on the number of files. Of course that might not be very popular. On reflection I think I would use a policy to restrict to files ending with .zip/.ZIP only. It's an archive and this format is effectively open source, widely understood and cross platform, and with the ZIP64 version will now stand the test of time too. Given it's an archive I would have a script that ran around setting all the files to immutable 7 days after creation too. Or maybe change the ownership and set a readonly ACL to the original user. Need to stop them changing stuff after the event if you are going to use to as part of your anti research fraud measures. JAB. -- Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk Fife, United Kingdom.
On Tue, 25 Jul 2017 10:02:14 +0100, Jonathan Buzzard said:
I would be tempted to zip up the directories and move them ziped ;-)
Not an option, unless you want to come here and re-write the researcher's tracking systems that knows where they archived a given run, and teach it "Except now it's in a .tar.gz in that directory, or perhaps one or two directories higher up, under some name". Yes, researchers do that. And as the joke goes: "What's the difference between a tenured professor and a terrorist?" "You can negotiate with a terrorist..." Plus remember that most of these directories are currently scattered across multiple tapes, which means "zip up a directory" may mean reading as many as 10 to 20 tapes just to get the directory on disk so you can zip it up. As it is, I had to write code that recall and processes all the files on tape 1, *wherever they are in the file system*, free them from the source disk, recall and process all the files on tape 2, repeat until tape 3,857. (And due to funding issues 5 years ago which turned into a "who paid for what tapes" food fight, most of the tapes ended up with files from entirely different file systems on them, going into different filesets on the destination). (And in fact, the migration is currently hosed up because a researcher *is* doing pretty much that - recalling all the files from one directory, then the next, then the next, to get files they need urgently for a deliverable but haven't been moved to the new system. So rather than having 12 LTO-5 drives to multistream the tape recalls, I've got 12 recalls fighting for one drive while the researcher's processing is hogging the other 11, due to the way the previous system prioritizes in-line opens of files versus bulk recalls)
participants (8)
-
IBM Spectrum Scale -
James Davis -
John Hearns -
Jonathan Buzzard -
Sobey, Richard A -
Stephen Ulmer -
Sven Oehme -
valdis.kletnieks@vt.edu
