I want to force fsck
to run before every boot on my 2 mount points (constant problems with the filesystem):
- /dev/nvme0n1p2
- /dev/nvme0n1p4
> mount | grep nvme0
/dev/nvme0n1p2 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/nvme0n1p4 on /home type ext4 (rw,relatime)
This is what my fstab looks like:
> more /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
#
# / was on /dev/nvme0n1p2 during installation
UUID=c8da3896-602b-48a0-969f-d17e2d78ebcb / ext4 errors=remount-ro 0 1
#
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=02B5-2A18 /boot/efi vfat umask=0077 0 1
#
# /home was on /dev/nvme0n1p4 during installation
UUID=4fb469d5-6a3c-4153-9d27-8257d862bb99 /home ext4 defaults 0 2
#
# swap was on /dev/nvme0n1p3 during installation
UUID=1b1bb9f3-084a-4951-93ac-2c12dc9f15e3 none swap sw 0 0
Note the PASS column, it is set to 1 for nvme0n1p2 and to 2 for nvme0n1p4.
- 0 – disabled
- 1 – higher priority and is checked first
- 2 – will be checked last
To force fsck
after every system reboots I do the following:
sudo tune2fs -c 1 /dev/nvme0n1p2
sudo tune2fs -c 1 /dev/nvme0n1p4
To confirm the command is applied sudo tune2fs -l /dev/nvme0n1p4
:
Maximum mount count: 1
However, on every boot, I see only the nvme0n1p2
is being checked.
Why is the second mount point nvme0n1p4
not being checked?
Note that blkid
for some reason gives nothing for nvme0n1p4
:
> blkid /dev/nvme0n1p4
>
For nvme0n1p2
it gives the usual output:
> blkid /dev/nvme0n1p2
/dev/nvme0n1p2: UUID="c8da3896-602b-48a0-969f-d17e2d78ebcb" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ee3e65c7-d35e-4d6e-a856-55cda225dda3"