Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
9223372036854775807
Description
It would be useful for "lfs find" to be able to check directories for the default file or directory layout, so that it is possible to scan a filesystem for directories that have explicit default layouts, like:
client# lfs find /mnt/testfs -type d --default --mdt-count +1 -print0 | xargs -0 lfs setdirstripe --delete client# lfs find /mnt/testfs -type d --default -m 2 -print0 | xargs -0 lfs setdirstripe --delete
Unfortunately, "-D" is already used by "lfs find" as the short option for --maxdepth. Note also that the "--delete|-d" option is not listed in the "lfs setdirstripe" usage message and should be added. At least it is already in the lfs-setdirstripe.1 man page.
I like the idea of using the same --default long option name as "lfs setdirstripe" has, but to be able to distinguish searching for default file layouts from default directory layouts, do we need to have separate "--mdt-default" and "--ost-default" options? For the long options it is unambiguous what is intended, but the -c and -i short options overlap between "lfs setstripe" and "lfs setdirstripe". However, "lfs find" can already use -m instead of -i, and similarly -T can be used instead of -c, so I don't think there is a problem.
Attachments
Issue Links
- is related to
-
LU-5170 lfs usability
-
- Open
-
-
LU-7501 inconsistencies between "lfs find", "lfs getstripe", "lfs setstripe", "lfs setdirstripe"
-
- Resolved
-
-
LU-7495 lfs find is missing "-links" support
-
- Resolved
-
-
LU-7502 add lfs find --mdt-count and --mdt-hash options
-
- Resolved
-
-
LU-10378 "lfs find" is missing "-printf" support
-
- Resolved
-
-
LU-15504 "lfs find" is missing "-ls" support
-
- Resolved
-
-
LU-17616 'lfs find' has no way to search default directory layout
-
- Resolved
-
Activity
Description |
Original:
It would be useful for "{{lfs find}}" to be able to check directories for the default file or directory layout, so that it is possible to scan a filesystem for directories that have explicit default layouts, like:
{noformat} client# lfs find /mnt/testfs -type d --default --mdt-count +1 -print0 | xargs -0 lfs setdirstripe --delete client# lfs find /mnt/testfs -type d --default -m 2 -print0 | xargs -0 lfs setdirstripe --delete {noformat} Unfortunately, "{{\-D}}" is already used by "{{lfs find}}" as the short option for {{\-\-maxdepth}}. Note also that the "{{\-\-delete|\-d}}" option is not listed in the "{{lfs setdirstripe}}" usage message and should be added. At least it is already in the {{lfs\-setdirstripe.1}} man page. I like the idea of using the same {{\-\-default}} long option name as "{{lfs setdirstripe}}" has, but to be able to distinguish searching for default file layouts from default directory layouts, do we need to have separate "{{\-\-mdt\-default}}" and "{{\-\-ost\-default}}" options? For the *long* options it is unambiguous what is intended, but the {{\-c}} and {{\-i}} short options overlap between "{{lfs setstripe}}" and "{{lfs setdirstripe}}". However, we can already use {{\-m}} instead of {{-i}} (though the {{lfs setdirstripe}} usage and man page should be updated to prefer {{\-m}}), and similarly {{-T}} can be used instead of {{-c}}, so I don't think there is a problem. |
New:
It would be useful for "{{lfs find}}" to be able to check directories for the default file or directory layout, so that it is possible to scan a filesystem for directories that have explicit default layouts, like:
{noformat} client# lfs find /mnt/testfs -type d --default --mdt-count +1 -print0 | xargs -0 lfs setdirstripe --delete client# lfs find /mnt/testfs -type d --default -m 2 -print0 | xargs -0 lfs setdirstripe --delete {noformat} Unfortunately, "{{\-D}}" is already used by "{{lfs find}}" as the short option for {{\-\-maxdepth}}. Note also that the "{{\-\-delete|\-d}}" option is not listed in the "{{lfs setdirstripe}}" usage message and should be added. At least it is already in the {{lfs\-setdirstripe.1}} man page. I like the idea of using the same {{\-\-default}} long option name as "{{lfs setdirstripe}}" has, but to be able to distinguish searching for default file layouts from default directory layouts, do we need to have separate "{{\-\-mdt\-default}}" and "{{\-\-ost\-default}}" options? For the *long* options it is unambiguous what is intended, but the {{\-c}} and {{\-i}} short options overlap between "{{lfs setstripe}}" and "{{lfs setdirstripe}}". However, "{{lfs find}}" can already use {{\-m}} instead of {{-i}}, and similarly {{-T}} can be used instead of {{-c}}, so I don't think there is a problem. |
Description |
Original:
It would be useful for "{{lfs find}}" to be able to check directories for the default file or directory layout, so that it is possible to scan a filesystem for directories that have explicit default layouts, like:
{noformat} client# lfs find /mnt/testfs -type d --default --mdt-count +1 -print0 | xargs -0 lfs setdirstripe --delete client# lfs find /mnt/testfs -type d --default -m 2 -print0 | xargs -0 lfs setdirstripe --delete {noformat} Unfortunately, "{{\-D}}" is already used by "{{lfs find}}" as the short option for {{\-\-maxdepth}}. Note also that the "{{\-\-delete|\-d}}" option is not listed in the "{{lfs setdirstripe}}" usage message and should be added. At least it is already in the {{lfs\-setdirstripe.1}} man page. To be able to distinguish searching for default file layouts from default directory layouts, I wonder do we need to have separate "{{\-\-mdt\-default}}" and "{{\-\-ost\-default}}" options? For the *long* options it would be clear what is intended, but there are two overlapping short options between "{{lfs setstripe}}" and "{{lfs setdirstripe}}", {{\-c}} and {{\-i}}. {{\-m}} can be used instead of {{-i}} (and the {{lfs setdirstripe}} usage and man page should be updated to use {{\-m}}), and similarly {{-T}} can be used instead of {{-c}}. I like the idea of using the same {{\-\-default}} long option name as "{{lfs setdirstripe}}" has, so it probably makes sense to _add_ "{{\-\-mdt\-default}}" to "{{lfs setdirstripe}}" for consistency but keep {{\-\-default}} for compatibility. |
New:
It would be useful for "{{lfs find}}" to be able to check directories for the default file or directory layout, so that it is possible to scan a filesystem for directories that have explicit default layouts, like:
{noformat} client# lfs find /mnt/testfs -type d --default --mdt-count +1 -print0 | xargs -0 lfs setdirstripe --delete client# lfs find /mnt/testfs -type d --default -m 2 -print0 | xargs -0 lfs setdirstripe --delete {noformat} Unfortunately, "{{\-D}}" is already used by "{{lfs find}}" as the short option for {{\-\-maxdepth}}. Note also that the "{{\-\-delete|\-d}}" option is not listed in the "{{lfs setdirstripe}}" usage message and should be added. At least it is already in the {{lfs\-setdirstripe.1}} man page. I like the idea of using the same {{\-\-default}} long option name as "{{lfs setdirstripe}}" has, but to be able to distinguish searching for default file layouts from default directory layouts, do we need to have separate "{{\-\-mdt\-default}}" and "{{\-\-ost\-default}}" options? For the *long* options it is unambiguous what is intended, but the {{\-c}} and {{\-i}} short options overlap between "{{lfs setstripe}}" and "{{lfs setdirstripe}}". However, we can already use {{\-m}} instead of {{-i}} (though the {{lfs setdirstripe}} usage and man page should be updated to prefer {{\-m}}), and similarly {{-T}} can be used instead of {{-c}}, so I don't think there is a problem. |
Summary | Original: DNE3: "lfs find" able to check default directory layout | New: DNE3: "lfs find" able to check default directory and file layout |