Mount
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
/dev/sda2
包含一個 btrfs 文件系統(帶有 UUIDblah-blah-1
)。這個文件系統有很多子卷。lsblk
顯示其中一個子卷的安裝點。我不知道它是如何選擇的。由於lsblk
列出了卷,但每個卷只有一個掛載點的空間,因此它無法列出所有掛載點。一個明顯的遺漏是不儲存在塊設備上的文件系統的掛載點(例如記憶體文件系統、網路文件系統、綁定掛載等)。一個不太明顯的遺漏是其他子卷的掛載點。
/
,/boot/grub2/x86_64-efi
,/var/lib/mysql
, 和許多其他是同一卷的子卷。lsblk
列出該卷,並顯示其中一個卷的安裝點。如果您對掛載的文件系統感興趣,
lsblk
這並不是特別有用。使用df
.df /
將顯示/
從第一列安裝的捲。