Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions pages/linux/tune2fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@

- Set the max number of counts before a filesystem is checked to 2:

`tune2fs -c 2 {{/dev/sdXN}}`
`sudo tune2fs -c 2 {{/dev/sdXN}}`

- Set the filesystem label to MY_LABEL:

`tune2fs -L 'MY_LABEL' {{/dev/sdXN}}`
`sudo tune2fs -L 'MY_LABEL' {{/dev/sdXN}}`

- Enable discard and user-specified extended attributes for a filesystem:

`tune2fs -o {{discard,user_xattr}} {{/dev/sdXN}}`
`sudo tune2fs -o discard,user_xattr {{/dev/sdXN}}`

- Enable journaling for a filesystem:

`tune2fs -o ^{{nobarrier}} {{/dev/sdXN}}`
`sudo tune2fs -o has_journal {{/dev/sdXN}}`

- Assign a new randomly-generated UUID to a filesystem:

`sudo tune2fs -U random {{/dev/sdXN}}`