磁盘的检查:
tune2fs -l /dev/sda5 (对/dev/sda5 进行检查)
理解下面每一行的意思:
machine@machine-virtual-machine:~$ fdisk -l /dev/sdsda sda1 sda2 sda3 sda5 sda6 sda7 sdb sdb1 machine@machine-virtual-machine:~$ tune2fs -l /dev/sda5tune2fs 1.42.9 (4-Feb-2014)tune2fs: 权限不够 当尝试打开 /dev/sda5 时找不到有效的文件系统超级块.machine@machine-virtual-machine:~$ sudo tune2fs -l /dev/sda5[sudo] password for machine: tune2fs 1.42.9 (4-Feb-2014)Filesystem volume name://卷标 (相当于Windows下的D盘的重命名的名字)Last mounted on: /Filesystem UUID: edd2b532-1560-4804-ab08-509ffee13b50Filesystem magic number: 0xEF53Filesystem revision #: 1 (dynamic)Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_fileFilesystem flags: signed_directory_hash Default mount options: user_xattr aclFilesystem state: cleanErrors behavior: ContinueFilesystem OS type: LinuxInode count: 625856Block count: 2499840Reserved block count: 124992Free blocks: 1172007Free inodes: 429995First block: 0Block size: 4096Fragment size: 4096Reserved GDT blocks: 610Blocks per group: 32768Fragments per group: 32768Inodes per group: 8128Inode blocks per group: 508Filesystem created: Wed May 17 20:56:03 2017Last mount time: Sun May 21 00:12:14 2017Last write time: Sun May 21 00:12:12 2017Mount count: 10Maximum mount count: -1Last checked: Wed May 17 20:56:03 2017Check interval: 0 ( )Lifetime writes: 13 GBReserved blocks uid: 0 (user root)Reserved blocks gid: 0 (group root)First inode: 11Inode size: 256Required extra isize: 28Desired extra isize: 28Journal inode: 8First orphan inode: 333696Default directory hash: half_md4Directory Hash Seed: 538aa3cd-eb59-4f51-b7b8-a253efa149b8Journal backup: inode blocksmachine@machine-virtual-machine:~$
磁盘参数的修改:
//修改卷标方法
命令:tune2fs (查看要修改的参数)
命令:tune2fs -l /dev/sda5 (修改之后查看修改成功没有)
代码