I'm on Ubuntu 16, and I'm trying to repair my startup disk. I have followed the instructions here, but once I'm at the root access of Recovery mode, it still says that the disk is mounted and it can't run.
If I try sudo fsck -f /dev/sda3
, it just replies:
fsck from util-linux
.
Anyone know why it might do that? According to this question, when fsck reports this command, you have to use fsck.ext4. However, when I do that, I still get a message about the volume being in use.
I see there's another question about this on Ubuntu 18, but there's no answer.
Most answers suggest using a Live Disk, but Etcher isn't working on MacOS at the moment, and it's surely not unreasonable to get this done from the recovery command prompt.
It's a vanilla Ubuntu install on a Dell Inspiron laptop.
Performing umount /dev/sda3
gives me "/dev/sda3 not mounted."
Performing fsck.ext4 -f /dev/sda3
gives me "/dev/sda3 is in use".
The output of lsblk /dev/sda gives:
sda disk
sda2 part
sda3 part
ubuntu--vg-root lvm /
sda1 part
(obviously, I'm typing this in on another computer) I've left out the sizes, hope that's clear.
I've also tried umount -lf /
. After doing that, when I run fsck
, I get a message that it cannot check if the filesystem is mounted due to missing mtab file.
Best Answer
To check the LVM it is done with the following steps.
First we can see our drive layout with
lsblk
:as we can see the LVM is named
xubuntu--vg-root
, but we cannot runfsck
on this name as it will not find it. We need to get the whole name. To do this we are going to run thelvm lvscan
command to get the LV name so we can runfsck
on the LVM.The following commands should be ran as
sudo
or as aroot
user.As we can see our name to check is
/dev/xubuntu-vg/root
so we should be able to runfsck
on that nameIf the
/dev/xubuntu-vg/root
is notACTIVE
, we need to make it active so that we can run the check on itNow it should look like this:
Now we can run the
fsck
on the LVM volume.or to run a forced check with assume yes
Adding a screen shot since VirtualBox will not let me copy and paste.
Hope this helps!