为什么我的 cifs 挂载设备没有显示在 lsblk 列表中?
/etc/fstab
使用此配置,启动时 cifs(外部 SSD)的挂载和自动挂载运行良好
//__MY_IP__/FRITZ.NAS/ /home/openhabian/fritzNAS cifs credentials=/home/openhabian/.smbcredentials,vers=3.0,noserverino,uid=1000,gid=1000,x-systemd.automount,x-systemd.requires=network-online.target 0 0
我可以读写SSD!
但是为什么这个存储在lsblk中没有显示?
openhabian@openhabian:/ $ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
mmcblk0 29.1G
├─mmcblk0p1 vfat 256M /boot boot
└─mmcblk0p2 ext4 28.9G / rootfs
zram0 1G [SWAP]
zram1 750M /opt/zram/zram1
zram2 1G /opt/zram/zram2
答案1
从man lsblk
:
DESCRIPTION
lsblk lists information about all available or the specified block
devices. The lsblk command reads the sysfs filesystem and udev db to
gather information. If the udev db is not available or lsblk is
compiled without udev support, then it tries to read LABELs, UUIDs and
filesystem types from the block device. In this case root permissions
are necessary.
所以答案是 cifs 挂载的设备不是块设备,而是虚拟的。lsblk 将仅列出计算机中可用的物理磁盘。