lsblk 不显示有关根文件系统的任何信息

lsblk 不显示有关根文件系统的任何信息

在 openSUSE Leap 42.3 上,lsblk输出如下所示,不显示任何有关/ie root 的信息。现在我的问题是根文件系统怎么样?

> lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   556M  0 part /boot/efi
├─sda2   8:2    0   333G  0 part /boot/grub2/x86_64-efi
├─sda3   8:3    0   588G  0 part /home
└─sda4   8:4    0    10G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom  

里面/boot/grub2/x86_64-efi/我有:

> ls /boot/grub2/x86_64-efi/
acpi.mod              datetime.mod         gcry_twofish.mod          luks.mod         part_plan.mod        terminal.mod
adler32.mod           diskfilter.mod       gcry_whirlpool.mod        lvm.mod          part_sun.mod         terminfo.mod
affs.mod              disk.mod             geli.mod                  lzopio.mod       part_sunpc.mod       test_blockarg.mod
afs.mod               div.mod              gettext.mod ...

更新0

的输出blkid是这样的:

> sudo blkid
/dev/sda1: UUID="DFA3-22EC" TYPE="vfat" PARTLABEL="primary" PARTUUID="blah blah"
/dev/sda2: UUID="blah blah" UUID_SUB="blah blah" TYPE="btrfs" PARTLABEL="primary" PARTUUID="blah blah"
/dev/sda3: UUID="blah blah" TYPE="xfs" PARTLABEL="primary" PARTUUID="blah blah"
/dev/sda4: UUID="blah blah" TYPE="swap" PARTLABEL="primary" PARTUUID="blah blah"

输出mount如下:

> sudo mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=4070916k,nr_inodes=1017729,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
/dev/sda2 on / type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/.snapshots/1/snapshot)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda2 on /.snapshots type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/.snapshots)
/dev/sda2 on /var/lib/mariadb type btrfs (rw,relatime,space_cache,subvolid=271,subvol=/@/var/lib/mariadb)
/dev/sda2 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/usr/local)
/dev/sda2 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/boot/grub2/x86_64-efi)
/dev/sda2 on /var/tmp type btrfs (rw,relatime,space_cache,subvolid=278,subvol=/@/var/tmp)
/dev/sda2 on /var/lib/machines type btrfs (rw,relatime,space_cache,subvolid=269,subvol=/@/var/lib/machines)
/dev/sda2 on /boot/grub2/i386-pc type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/boot/grub2/i386-pc)
/dev/sda2 on /srv type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/srv)
/dev/sda2 on /var/opt type btrfs (rw,relatime,space_cache,subvolid=276,subvol=/@/var/opt)
/dev/sda2 on /var/crash type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/var/crash)
/dev/sda2 on /var/lib/libvirt/images type btrfs (rw,relatime,space_cache,subvolid=268,subvol=/@/var/lib/libvirt/images)
/dev/sda2 on /opt type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/opt)
/dev/sda2 on /tmp type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/tmp)
/dev/sda2 on /var/log type btrfs (rw,relatime,space_cache,subvolid=275,subvol=/@/var/log)
/dev/sda2 on /var/lib/pgsql type btrfs (rw,relatime,space_cache,subvolid=274,subvol=/@/var/lib/pgsql)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0002,dmask=0002,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda2 on /var/cache type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/var/cache)
/dev/sda2 on /var/lib/mailman type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/@/var/lib/mailman)
/dev/sda2 on /var/lib/named type btrfs (rw,relatime,space_cache,subvolid=273,subvol=/@/var/lib/named)
/dev/sda2 on /var/spool type btrfs (rw,relatime,space_cache,subvolid=277,subvol=/@/var/spool)
/dev/sda2 on /var/lib/mysql type btrfs (rw,relatime,space_cache,subvolid=272,subvol=/@/var/lib/mysql)
/dev/sda3 on /home type xfs (rw,relatime,attr2,inode64,noquota)
tmpfs on /run/user/481 type tmpfs (rw,nosuid,nodev,relatime,size=815728k,mode=700,uid=481,gid=479)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=815728k,mode=700,uid=1000,gid=100)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

好吧,令我惊讶的是,当我lsblk现在这样做时,输出如下所示,与之前的输出有点不同,请注意挂载点sda2不同:

> sudo lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   556M  0 part /boot/efi
├─sda2   8:2    0   333G  0 part /var/lib/mysql
├─sda3   8:3    0   588G  0 part /home
└─sda4   8:4    0    10G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom

其内容/var/lib/mysql如下:

> ls /var/lib/mysql
aria_log.00000001  aria_log_control  flight  ibdata1  ib_logfile0  ib_logfile1  linux-in4q.pid  multi-master.info  mysql  mysql_upgrade_info  performance_schema  test

更新1

上的条目/etc/fstab是:

> cat /etc/fstab 
UUID=blah-blah-0 swap swap defaults 0 0
UUID=blah-blah-1 / btrfs defaults 0 0
UUID=blah-blah-1 /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=blah-blah-1 /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=blah-blah-1 /opt btrfs subvol=@/opt 0 0
UUID=blah-blah-1 /srv btrfs subvol=@/srv 0 0
UUID=blah-blah-1 /tmp btrfs subvol=@/tmp 0 0
UUID=blah-blah-1 /usr/local btrfs subvol=@/usr/local 0 0
UUID=blah-blah-1 /var/cache btrfs subvol=@/var/cache 0 0
UUID=blah-blah-1 /var/crash btrfs subvol=@/var/crash 0 0
UUID=blah-blah-1 /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=blah-blah-1 /var/lib/machines btrfs subvol=@/var/lib/machines 0 0
UUID=blah-blah-1 /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=blah-blah-1 /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=blah-blah-1 /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=blah-blah-1 /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=blah-blah-1 /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=blah-blah-1 /var/log btrfs subvol=@/var/log 0 0
UUID=blah-blah-1 /var/opt btrfs subvol=@/var/opt 0 0
UUID=blah-blah-1 /var/spool btrfs subvol=@/var/spool 0 0
UUID=blah-blah-1 /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=blah-blah-1 /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=blah-blah-2       /boot/efi            vfat       umask=0002,utf8=true  0 0
UUID=blah-blah-3 /home                xfs        defaults              1 2

答案1

/dev/sda2包含 btrfs 文件系统(带有 UUID blah-blah-1)。该文件系统有许多子卷。lsblk显示子卷之一的安装点。我不知道它是如何选择的。由于lsblk列出了卷,但每个卷只有一个安装点的空间,因此它无法列出所有安装点。一个明显的遗漏是未存储在块设备上的文件系统的挂载点(例如内存文件系统、网络文件系统、绑定挂载等)。一个不太明显的遗漏是其他子卷的挂载点。

//boot/grub2/x86_64-efi/var/lib/mysql和许多其他内容是同一卷的子卷。lsblk列出该卷,并显示其中一个卷的安装点。

如果您对挂载的文件系统感兴趣,lsblk则不是特别有用。使用df。将显示从第一列中安装的df /卷。/

相关内容