You are not logged in.

#1 2021-01-18 13:32:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

F2FS: show options on existing partition/add to existing partition

Is it possible to see the options used to create an existing F2FS partition?  Specifically wanting to see if it was created with inode_checksum and sb_checksum.  Follow-up question: is it possible to add these to an existing partition without reformatting it?

Offline

#2 2021-01-18 15:35:36

Gosi
Member
From: Vienna, Austria
Registered: 2010-02-25
Posts: 103

Re: F2FS: show options on existing partition/add to existing partition

Is there something in /sys/fs/f2fs/<partition>/* ?

There is no tunefs command so I guess you cannot modify it later.

Offline

#3 2021-01-18 18:22:30

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: F2FS: show options on existing partition/add to existing partition

I wasn't aware of that... what I see:

avg_vblocks              discard_idle_interval  gc_no_gc_sleep_time    max_victim_search        ram_thresh
batched_trim_sections    encoding               gc_pin_file_thresh     migration_granularity    ra_nid_pages
cp_background_calls      extension_list         gc_urgent              min_fsync_blocks         readdir_ra
cp_foreground_calls      features               gc_urgent_sleep_time   min_hot_blocks           reclaim_segments
cp_interval              free_segments          idle_interval          min_ipu_util             reserved_blocks
current_reserved_blocks  gc_background_calls    iostat_enable          min_seq_blocks           umount_discard_timeout
data_io_flag             gc_foreground_calls    iostat_period_ms       min_ssr_sections         unusable
dir_level                gc_idle                ipu_policy             mounted_time_sec
dirty_nats_ratio         gc_idle_interval       lifetime_write_kbytes  moved_blocks_background
dirty_segments           gc_max_sleep_time      main_blkaddr           moved_blocks_foreground
discard_granularity      gc_min_sleep_time      max_small_discards     node_io_flag

If I grep for 'checksum' within those files I did not see anything in the output that matched.

Offline

#4 2021-01-18 18:36:52

Gosi
Member
From: Vienna, Austria
Registered: 2010-02-25
Posts: 103

Re: F2FS: show options on existing partition/add to existing partition

It should be in features. If it is not there, I would say the filesystem is created without checksums.

Search for "features_show" in https://git.kernel.org/pub/scm/linux/ke … ?h=v5.10.8.

Offline

#5 2021-01-18 19:01:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: F2FS: show options on existing partition/add to existing partition

I ended up copying everything off the partition and re-creating it with those options.  I did not look under /sys/fs/f2fs/features initially, only under /sys/fs/f2fs/dm-0.

Now:

% ls /sys/fs/f2fs/features
atomic_write  casefold     encryption  flexible_inline_xattr  inode_crtime  project_quota  sb_checksum               verity
block_zoned   compression  extra_attr  inode_checksum         lost_found    quota_ino      test_dummy_encryption_v2

As a test, I can create a f2fs partition on a thumb drive without the options and compare the output there to this.  Thanks for the replies.

Offline

Board footer

Powered by FluxBB