您可以使用以下命令创建文件系统mkfs...
:如何不仅找出给定分区上使用的文件系统,还找出传递给哪些参数mkfs
?
那么如何mkfs
反向执行——准备好文件系统找出调用。
答案1
如果文件系统是 ext2、ext3 或 ext4,那么您可以使用该命令tune2fs
来查找设备上给定文件系统的详细信息。
$ sudo tune2fs -l <dev>
例子
$ sudo tune2fs -l /dev/sda2
tune2fs 1.42.8 (20-Jun-2013)
Filesystem volume name: <none>
Last mounted on: /boot
Filesystem UUID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 128016
Block count: 512000
Reserved block count: 25600
Free blocks: 355130
Free inodes: 127934
First block: 1
Block size: 1024
Fragment size: 1024
Reserved GDT blocks: 256
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2032
Inode blocks per group: 254
Flex block group size: 16
Filesystem created: Tue Jul 15 21:26:21 2014
Last mount time: Fri Sep 5 08:17:04 2014
Last write time: Fri Sep 5 08:17:04 2014
Mount count: 38
Maximum mount count: -1
Last checked: Tue Jul 15 21:26:21 2014
Check interval: 0 (<none>)
Lifetime writes: 172 MB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Journal backup: inode blocks
参数“文件系统功能”列出了您所要求的内容。
我有什么设备?
您可以使用该命令lsblk
列出这些。
85.9G 0lvm
$ lsblk | head -8 | column -t
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 500M 0 part /boot
└─sda3 8:3 0 237.8G 0 part
├─fedora-root 253:0 0 50G 0 lvm /
├─fedora-swap 253:1 0 2G 0 lvm [SWAP]
└─fedora-home 253:2 0 185.9G 0 lvm