2

I have Ubuntu 20.04 linux and I create a second disk, and second filesystem. Right now when I want to see info my second filesystem df is not showing. I use default mount specification.

df -ah
Filesystem                         Size  Used Avail Use% Mounted on
sysfs                                 0     0     0    - /sys
proc                                  0     0     0    - /proc
udev                               3.9G     0  3.9G   0% /dev
devpts                                0     0     0    - /dev/pts
tmpfs                              795M  1.6M  794M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   49G   13G   34G  27% /
securityfs                            0     0     0    - /sys/kernel/security
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /sys/fs/cgroup
cgroup2                               0     0     0    - /sys/fs/cgroup/unified
cgroup                                0     0     0    - /sys/fs/cgroup/systemd
pstore                                0     0     0    - /sys/fs/pstore
none                                  0     0     0    - /sys/fs/bpf
cgroup                                0     0     0    - /sys/fs/cgroup/freezer
cgroup                                0     0     0    - /sys/fs/cgroup/hugetlb
cgroup                                0     0     0    - /sys/fs/cgroup/cpu,cpuacct
cgroup                                0     0     0    - /sys/fs/cgroup/net_cls,net_prio
cgroup                                0     0     0    - /sys/fs/cgroup/pids
cgroup                                0     0     0    - /sys/fs/cgroup/memory
cgroup                                0     0     0    - /sys/fs/cgroup/devices
cgroup                                0     0     0    - /sys/fs/cgroup/blkio
cgroup                                0     0     0    - /sys/fs/cgroup/cpuset
cgroup                                0     0     0    - /sys/fs/cgroup/perf_event
cgroup                                0     0     0    - /sys/fs/cgroup/rdma
systemd-1                             0     0     0    - /proc/sys/fs/binfmt_misc
hugetlbfs                             0     0     0    - /dev/hugepages
mqueue                                0     0     0    - /dev/mqueue
tracefs                               0     0     0    - /sys/kernel/tracing
debugfs                               0     0     0    - /sys/kernel/debug
configfs                              0     0     0    - /sys/kernel/config
fusectl                               0     0     0    - /sys/fs/fuse/connections
/dev/loop0                          71M   71M     0 100% /snap/lxd/21029
/dev/sda2                          976M  299M  610M  33% /boot
/dev/loop1                          56M   56M     0 100% /snap/core18/2128
tmpfs                              795M  1.6M  794M   1% /run/snapd/ns
/dev/loop4                          62M   62M     0 100% /snap/core20/1081
/dev/loop5                          68M   68M     0 100% /snap/lxd/21545
nsfs                                  0     0     0    - /run/snapd/ns/lxd.mnt
/dev/mapper/elk--vg-elk--lv           -     -     -    - /mnt/elk
/dev/loop6                          62M   62M     0 100% /snap/core20/1169
/dev/loop7                          33M   33M     0 100% /snap/snapd/13270
/dev/loop2                          33M   33M     0 100% /snap/snapd/13640
/dev/loop8                          56M   56M     0 100% /snap/core18/2246
tmpfs                              795M     0  795M   0% /run/user/1000

/mnt/elk is my second filesystem and it's showing - - -

UUID=764818a1-03bd-4f7a-       /mnt/elk        ext4    defaults 0 1

this is my fstab file line

when I switch user root df is showing /mnt/elk filesystem information

df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.9G     0  3.9G   0% /dev
tmpfs                              795M  1.6M  794M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   49G   13G   34G  27% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop0                          71M   71M     0 100% /snap/lxd/21029
/dev/sda2                          976M  299M  610M  33% /boot
/dev/loop1                          56M   56M     0 100% /snap/core18/2128
/dev/loop4                          62M   62M     0 100% /snap/core20/1081
/dev/loop5                          68M   68M     0 100% /snap/lxd/21545
/dev/mapper/elk--vg-elk--lv        196G   13G  174G   7% /mnt/elk
/dev/loop6                          62M   62M     0 100% /snap/core20/1169
/dev/loop7                          33M   33M     0 100% /snap/snapd/13270
/dev/loop2                          33M   33M     0 100% /snap/snapd/13640
/dev/loop8                          56M   56M     0 100% /snap/core18/2246
tmpfs                              795M     0  795M   0% /run/user/1000

it's look like relevant permission but there is no any restriction

5
  • 1
    Can you read from elk as a user? Can you give the output of mount?
    – Joce
    Commented Nov 1, 2021 at 7:00
  • @Joce this is from user /dev/mapper/elk--vg-elk--lv on /mnt/elk type ext4 (rw,relatime) I can see the same line in root user
    – thargalin
    Commented Nov 1, 2021 at 7:03
  • And in practice, can you read/write the filessytem as a user?
    – Joce
    Commented Nov 1, 2021 at 7:04
  • Oh, no. ls: cannot open directory '/mnt': Permission denied
    – thargalin
    Commented Nov 1, 2021 at 7:05
  • Yes! It's relevant permission. I had no checked the user/group. I add the user, /mnt groups and it's working. Thanks @Joce
    – thargalin
    Commented Nov 1, 2021 at 7:08

1 Answer 1

2

Following discussion in comments, steps to follow in such a situation:

  • check read/write settings first with mount
  • check also that the path is accessible to the user, and correct this if needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .