linux df lsblk parted blkid 查看文件系统信息

2021-10-08 14:38:42 浏览数 (1)

ECS信息

  • 规格:2vCPUs | 4GiB | kc1.large.2
  • 镜像:openEuler 20.03 64bit with ARM | 公共镜像

linux 查看文件系统类型

df
代码语言:javascript复制
# df --all --print-type --human-readable
Filesystem     Type         Size  Used Avail Use% Mounted on
sysfs          sysfs           0     0     0    - /sys
proc           proc            0     0     0    - /proc
devtmpfs       devtmpfs     1.2G     0  1.2G   0% /dev
securityfs     securityfs      0     0     0    - /sys/kernel/security
tmpfs          tmpfs        1.5G     0  1.5G   0% /dev/shm
devpts         devpts          0     0     0    - /dev/pts
tmpfs          tmpfs        1.5G   13M  1.5G   1% /run
tmpfs          tmpfs        1.5G     0  1.5G   0% /sys/fs/cgroup
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/systemd
pstore         pstore          0     0     0    - /sys/fs/pstore
efivarfs       efivarfs        0     0     0    - /sys/firmware/efi/efivars
bpf            bpf             0     0     0    - /sys/fs/bpf
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/freezer
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/perf_event
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/blkio
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/cpu,cpuacct
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/net_cls,net_prio
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/memory
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/files
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/hugetlb
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/rdma
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/cpuset
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/devices
cgroup         cgroup          0     0     0    - /sys/fs/cgroup/pids
configfs       configfs        0     0     0    - /sys/kernel/config
/dev/vda2      ext4          39G  4.0G   33G  11% /
systemd-1      -               -     -     -    - /proc/sys/fs/binfmt_misc
debugfs        debugfs         0     0     0    - /sys/kernel/debug
hugetlbfs      hugetlbfs       0     0     0    - /dev/hugepages
mqueue         mqueue          0     0     0    - /dev/mqueue
tmpfs          tmpfs        1.5G   64K  1.5G   1% /tmp
/dev/vda1      vfat        1022M  5.8M 1017M   1% /boot/efi
tracefs        tracefs         0     0     0    - /sys/kernel/debug/tracing
binfmt_misc    binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
tmpfs          tmpfs        298M     0  298M   0% /run/user/0
lsblk
代码语言:javascript复制
# lsblk --output-all
NAME   KNAME PATH      MAJ:MIN FSAVAIL FSSIZE FSTYPE FSUSED FSUSE% MOUNTPOINT LABEL UUID                                 PTUUID                               PTTYPE PARTTYPE                             PARTLABEL            PARTUUID                             PARTFLAGS   RA RO RM HOTPLUG MODEL SERIAL SIZE STATE OWNER GROUP MODE       ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED       RQ-SIZE TYPE DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO WSAME WWN RAND PKNAME HCTL TRAN SUBSYSTEMS       REV VENDOR ZONED
vda    vda   /dev/vda  253:0                                                                                             e4391d6a-9819-45ca-bde4-52285bce52a7 gpt                                                                                                             4096  0  0       0               40G       root  disk  brw-rw----         0    512      0     512     512    1 mq-deadline     256 disk        0        0B       0B         0    0B        0                  block:virtio:pci     0x1af4 none
├─vda1 vda1  /dev/vda1 253:1   1016.3M  1022M vfat     5.7M     1% /boot/efi        3B7F-01BD                            e4391d6a-9819-45ca-bde4-52285bce52a7 gpt    c12a7328-f81f-11d2-ba4b-00a0c93ec93b EFI System Partition c654ba4b-7612-4e28-b9d3-3fd7bb95f63f           4096  0  0       0                1G       root  disk  brw-rw----         0    512      0     512     512    1 mq-deadline     256 part        0        0B       0B         0    0B        0 vda              block:virtio:pci            none
└─vda2 vda2  /dev/vda2 253:2     32.2G  38.1G ext4       4G    10% /                6eb9dc1c-cd38-4c03-84a5-178b7431f7c1 e4391d6a-9819-45ca-bde4-52285bce52a7 gpt    0fc63daf-8483-4772-8e79-3d69d8477de4                      8f345fdd-b2ee-4ea6-a26e-de7e141d079e           4096  0  0       0               39G       root  disk  brw-rw----         0    512      0     512     512    1 mq-deadline     256 part        0        0B       0B         0    0B        0 vda              block:virtio:pci            none
parted
代码语言:javascript复制
# parted --list
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 42.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  1075MB  1074MB  fat32        EFI System Partition  boot, esp
 2      1075MB  42.9GB  41.9GB  ext4
blkid
代码语言:javascript复制
# blkid
/dev/vda1: UUID="3B7F-01BD" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="c654ba4b-7612-4e28-b9d3-3fd7bb95f63f"
/dev/vda2: UUID="6eb9dc1c-cd38-4c03-84a5-178b7431f7c1" TYPE="ext4" PARTUUID="8f345fdd-b2ee-4ea6-a26e-de7e141d079e"
/etc/fstab 查看静态的文件系统信息
代码语言:javascript复制
# cat /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Mon May 18 10:32:30 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=6eb9dc1c-cd38-4c03-84a5-178b7431f7c1 /                       ext4    defaults        1 1
UUID=3B7F-01BD          /boot/efi               vfat    umask=0077,shortname=winnt 0 2

0 人点赞