koverstreet / bcachefs-tools

http://bcachefs.org
GNU General Public License v2.0
124 stars 90 forks source link

bcachefs set-fs-option: invalid option -- '-' #351

Open khumarahn opened 6 days ago

khumarahn commented 6 days ago
# bcachefs version
1.12.0

(this is suspicious because I have bcachefs 1.13.0 installed from bcachefs-tools-1.13.0.tar.zst)

# bcachefs set-fs-option -h
bcachefs set-fs-option 
Usage: bcachefs set-fs-option [OPTION].. device

Options:

      --errors=(continue|fix_safe|panic|ro)
                              Action to take on filesystem error
      --metadata_replicas=#   Number of metadata replicas
      --data_replicas=#       Number of data replicas
      --metadata_replicas_required=#
      ...
      --nocow_enabled         Enable nocow mode: enables runtime locking in
                              data move path needed if nocow will ever be in use
      ...
# bcachefs set-fs-option --nocow-enabled /dev/sda1 
bcachefs: invalid option -- '-'
bcachefs: invalid option -- 'n'
bcachefs: invalid option -- 'o'
bcachefs: invalid option -- 'c'
bcachefs: invalid option -- 'o'
bcachefs: invalid option -- 'w'
bcachefs: invalid option -- '-'
bcachefs: invalid option -- 'e'
bcachefs: invalid option -- 'n'
bcachefs: invalid option -- 'a'
bcachefs: invalid option -- 'b'
bcachefs: invalid option -- 'l'
bcachefs: invalid option -- 'e'
bcachefs: invalid option -- 'd'
khumarahn commented 6 days ago

Also, the manpage disagrees with bcachefs -h. For example, man has the bcachefs setattr command but

# bcachefs setattr -h
Unknown command setattr

UPD: Ah, I found this discussed and fixed https://github.com/koverstreet/bcachefs-tools/pull/350