1

On openSUSE Leap 42.3, lsblk output is like below which doesn't show anything about / i.e. root. Now my question is what about root file system?

> 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  

Inside /boot/grub2/x86_64-efi/ I have:

> 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 ...

UPDATE 0

The output of blkid is this:

> 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"

The mount output is as follows:

> 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)

Well, to my surprise, when I do lsblk now, the output is like below, which is a bit different from previous output, note that mount point of sda2 is different:

> 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

The contents of /var/lib/mysql is as follows:

> 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

UPDATE 1

The entries on /etc/fstab are:

> 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
  • Did you try to use sudo? – Ely Jul 29 '17 at 7:31
  • Can you paste the output of mount? – Kamil Maciorowski Jul 29 '17 at 7:40
  • are you running this in a container or something else that obscures the rootfs? also, what kind of fs is /? on my zfs systems, lsblk | grep / does not show any of the zfs filesystems. – cas Jul 29 '17 at 8:47
  • if you binded or mounted the roo-tf somewhere it will show you the last mountPoint insted of "/" ! – Jonah Jul 29 '17 at 10:59
  • 3
    Can you post the entries in /etc/fstab – Raman Sailopal Jul 29 '17 at 11:36
2

/dev/sda2 contains a btrfs filesystem (with the UUID blah-blah-1). This filesystem has many subvolumes. lsblk displays the mount point of one of the subvolumes. I don't know how it chooses. Since lsblk lists volumes but only has room for one mount point per volume, it can't list all mount points. An obvious omission is mount points for filesystems that are not stored on a block device (e.g. in-memory filesystems, network filesystems, bind mounts, etc.). A less obvious omission is mount points for other subvolumes.

/, /boot/grub2/x86_64-efi, /var/lib/mysql, and many others are subvolumes of the same volume. lsblk lists that volume, and shows the mount point for one of the volumes.

If you're interested in mounted filesystems, lsblk is not particularly useful. Use df. df / will show you the volume that / is mounted from in the first column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.