Use the tune2fs commands of linux to manage file systems
Editor to share with you the use of linux tune2fs command file system management, I believe that most people do not know much, so share this article for you to learn, I hope you will learn a lot after reading this article, let's go to learn the method!
The tune2fs command allows the system administrator to adjust this parameter in the "ext2/ext3/ext4" file system. If there is an accidental power outage and panic under the Windows, the system self-test will generally occur the next time you boot. There is also a file system self-test under the Linux system, and you can define the self-test period and method through the tune2fs command.
Syntax format: tune2fs [parameters]
Common parameters:
-c adjust the maximum number of times to load-C sets the number of times the file system has been loaded-e sets the behavior when the kernel code detects an error-f forces the modification, even if an error occurs-I sets the interval between two adjacent file system checks-j adds logging to the "ext2" file system Convert it to "ext3" file system-l display file super block content-L set file system volume label-m display percentage of file retention block-M set file system last loaded directory-o set or clear file system loaded properties or options-O set or clear file system properties or options-r set file system retention block size-T set file system The UUID of the file system can be set using the user-U of the file system reserved block.
Reference example
View details:
[root@linuxcool ~] # tune2fs-l / dev/sdb1
Set the number of times the file system can be mounted before forced checking:
[root@linuxcool] # tune2fs-c 30 / dev/sdb1
Check after 10 days:
[root@linuxcool] # tune2fs-I 10 / dev/sdb1
Check after 1 day:
[root@linuxcool] # tune2fs-I 1D / dev/sdb1
Check after 3 weeks:
[root@linuxcool] # tune2fs-I 3w / dev/sdb1
Check half a year later:
[root@linuxcool] # tune2fs-I 6m / dev/sdb1
Disable time checking:
[root@linuxcool] # tune2fs-I 0 / dev/sdb1
Add logging capabilities to convert ext2 to ext3 file systems:
[root@linuxcool] # tune2fs-j / dev/sdb1
Adjust the reserved space for the / dev/sdb1 partition to 40000 blocks:
[root@linuxcool] # tune2fs-r 40000 / dev/sdb1
Set the / dev/sdb1 mount option to enable Posix Access Control Lists and user-specified extended properties:
[root@linuxcool] # tune2fs-o acl,user_xattr / dev/sdb1 above are all the contents of file system management using linux's tune2fs command. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!