0

I have a mismatch between /etc/fstab and /etc/mtab.

# cat /etc/fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount pt>     <type>   <options>         <dump> <pass>
/dev/root       /       ext4    rw,noauto,noatime  0    1
/dev/mmcblk0p1  /boot       vfat     rw,noauto,noatime 0    0
/dev/mmcblk0p2  /rootfs1    ext4     ro,noauto,noatime 0    0
/dev/mmcblk0p3  /rootfs2    ext4     ro,noauto,noatime 0    0
/dev/mmcblk0p5  /flash      ext4     rw,noatime        0    0
/dev/mmcblk0p6  /home       ext4     rw,noatime        0    0
proc        /proc       proc     defaults      0    0
devpts      /dev/pts    devpts   defaults,gid=5,mode=620  0 0
tmpfs           /dev/shm    tmpfs    mode=0777         0    0
tmpfs           /ramfs      tmpfs    mode=1777         0    0
sysfs       /sys        sysfs    defaults      0    0
none     /sys/kernel/debug  debugfs  defaults          0    0   
/dev/sda1       /mnt            vfat     umask=000         0    0

# cat /etc/mtab
rootfs / rootfs rw 0 0
/dev/root / ext4 ro,relatime,data=ordered 0 0
devtmpfs /dev devtmpfs rw,relatime,size=47344k,nr_inodes=11836,mode=755 0 0
proc /proc proc rw,relatime 0 0
/dev/mmcblk0p5 /flash ext4 rw,noatime,data=ordered 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw,relatime,mode=777 0 0
tmpfs /ramfs tmpfs rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0

There is no /dev/mmcblk0p6 /home entry in /etc/mtab. It is possible to access /home even though it doesn't show up in /etc/mtab.

When trying to mount I get:

# mount -t ext4 /dev/mmcblk0p6 /home
mount: mounting /dev/mmcblk0p6 on /home failed: Invalid argument

which feels odd. What argument is incorrect anyway?

1 Answer 1

0

/etc/mtab shows the currently mounted filesystems

/etc/fstab shows the ones you want to mount at boot time , or with a mount -a command

if you are using /home when it does not show in mtab, that means, you are using another part of the filesystem, and it might fill up quickly.

would also try an fdisk -l to see exacty what filesystems and partition are that moment there.

There might be also some process that is using that /home ,so you cannot mount it right now. If you could identify which process is using /home or and if not critical you can try a reboot.

2
  • How can it be using /home if it is not mounted? I thought that was the whole idea that you have to mount it before using it?
    – JohnyTex
    Commented Nov 26, 2020 at 9:06
  • It depends, was it mounted before, or is something that you want to mount right now ?. Can you show the contents of the not-mounted /home and the owner
    – yros
    Commented Nov 26, 2020 at 9:53

You must log in to answer this question.

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