Use the fsadm command of linux to adjust or check the file system on the device
This article mainly introduces the use of linux fsadm command on the device to adjust or check the file system, the text is very detailed, has a certain reference value, interested friends must read!
The fsadm command adjusts or inspects file systems on devices. The fsadm command uses the same API to operate on ext2, ext3, ext4, ReiserFS, and XFS file systems.
When the fsadm command completes successfully, the status code is 0. Status code 2 indicates that the operation has been interrupted by the user. Status code 3 indicates that the requested check cannot be performed because the file system is mounted and does not support online fsck. Other faults use status code 1.
Syntax format: fsadm [parameter] check [device]
fsadm [parameter] resize [device] [new size]
Common parameters:
Reference Example
Check the file system on device/dev/sda1:
[root@linuxcool ~]# fsadm check /dev/sda1
Resize the file system to 20480KB on device/dev/sda1:
[root@linuxcool ~]# fsadm resize /dev/sda1 20480
The file system on device/dev/test is adjusted to 3048MB. If it contains other file systems, it will be dismounted before resizing. All questions will answer " y":
[root@linuxcool ~]# fsadm -e -y resize /dev/test 3048M The above is to adjust or check all the contents of the file system on the device using the linux fsadm command. Thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!