zfsリストのデフォルトのソート順序は何ですか? zfs list -sを生成するときにロケールは考慮されますか?

zfsリストのデフォルトのソート順序は何ですか? zfs list -sを生成するときにロケールは考慮されますか?

スナップショットのリストを取得したいです。作成時間に基づいてソート、すべてのrpoolについて。

私の最初の問題は、私が理解できないデフォルトのソート順序ですzfs list -t snapshotzfsマニュアルページには次のように指定されています(抜粋)。

zfs list [-r|-d depth] [-Hp] [-o property[,property]...] [-s property]... [-S property]... [-t type[,type]...] [filesystem|volume|snapshot]...

       [...]
   
       -s property
           A property for sorting the output by column in ascending order based on the value of the property.  The property must be one of the properties
           described in the Properties section, or the special value name to sort by the dataset name.  Multiple properties can be specified at one time
           using multiple -s property options.  Multiple -s options are evaluated from left to right in decreasing order of importance.  The following is
           a list of sorting criteria:

           •   Numeric types sort in numeric order.

           •   String types sort in alphabetical order.

           •   Types inappropriate for a row sort that row to the literal bottom, regardless of the specified ordering.

           If no sorting options are specified the existing behavior of zfs list is preserved.

       [...]

デフォルトのソート順序に関するヒントはありません。上記のセクションの最後の文は、それが何を意味するのかわからないので役に立ちませんthe existing order of zfs list

基本的な順序は生成時の順序であると強く考えていますが、これを確認したいと思っていて、誰でも参照を提供できる場合は感謝します。

私は適切なパラメータを明示的に提供すること、つまり次のコマンドを実行することでzfsが生成時間に基づいてリストをソートできるようにすることができます。

zfs list -t snapshot -s creation

しかし、これは次の問題につながります。 ZFSが実際に作成時間を保存する方法への参照が見つかりません。私は実際に現地時間を使用するのではなく、新起源時間またはUTC時間でこれらのタイムスタンプを生成すると確信しています。そうしないと、あらゆる種類の夏時間の問題に似た奇妙な問題が発生します。そうではありませんか?しかし、誰かがこれについて明らかにすることができれば、もう一度感謝します。

ベストアンサー1

おすすめ記事