From: Piotr R. K. <pio...@mo...> - 2016-02-17 02:09:17
|
Hi Steven, > I have a suggested improvement for mfsdirinfo. It would be good if it could handle hard links so that file size is only counted once for each file that has multiple hard links. For example, if I create a directory (named "testdir") with a ~1GB file in it and then type "mfsdirinfo -s testdir" I will see that the size is 1028734976. Now if I create a hard link to that file in "testdir" and re-run the mfsdirinfo command I'll see that the size of the directory is now doubled to 2057469952. I would like the behavior to be the same as the du command which shows the same size before and after making the hard link. Actually we were working on such feature at the same time you thought about it :) It has been introduced since MFS 3.0.73. MooseFS 3.0.73-1 (2016-02-11) [...] (tools) added '-p' option to 'mfsdirinfo' - 'precise mode' [...] Running mfsdirinfo -p can show you more precise space usage, it is able not to count hardlinks and snapshots, but can be time-consuming. > Another suggestion for mfsdirinfo would be to add an option like the "-L" option (dereference symbolic links) to the du command. This would allow me to get accurate space usage summaries even though some of the lower-level directories might be symbolic links. Oh, it is not implemented yet, but it is a great feature. We'll think on adding this in the future. PS: mfsdirinfo unfortunately may not count sparse files properly (it may report a bit higher values). Best regards, -- <https://moosefs.com/> Piotr Robert Konopelko MooseFS Technical Support Engineer e-mail : pio...@mo... <mailto:pio...@mo...> www : https://moosefs.com <https://moosefs.com/> <https://twitter.com/MooseFS> <https://www.facebook.com/moosefs> <https://www.linkedin.com/company/moosefs> <https://github.com/moosefs> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received it by mistake, please let us know by e-mail reply and delete it from your system; you may not copy this message or disclose its contents to anyone. Finally, the recipient should check this email and any attachments for the presence of viruses. Core Technology accepts no liability for any damage caused by any virus transmitted by this email. > On 11 Feb 2016, at 7:39 PM, Wilson, Steven M <st...@pu...> wrote: > > Hi, > > I have a suggested improvement for mfsdirinfo. It would be good if it could handle hard links so that file size is only counted once for each file that has multiple hard links. For example, if I create a directory (named "testdir") with a ~1GB file in it and then type "mfsdirinfo -s testdir" I will see that the size is 1028734976. Now if I create a hard link to that file in "testdir" and re-run the mfsdirinfo command I'll see that the size of the directory is now doubled to 2057469952. I would like the behavior to be the same as the du command which shows the same size before and after making the hard link. > > Another suggestion for mfsdirinfo would be to add an option like the "-L" option (dereference symbolic links) to the du command. This would allow me to get accurate space usage summaries even though some of the lower-level directories might be symbolic links. > > Thanks! |