Results 1 to 7 of 7

Thread: Can't execute fsck

  1. #1
    Join Date
    Jul 2012
    Beans
    62

    Can't execute fsck

    I have a Mythbuntu virtual machine running on Citrix Xenserver. I had a power outage recently which has wreaked havoc and I've had to restore the VM from a backup. Now I can't mount a couple of the disks. I've unmounted the disks but when I try to run fsck I get this error:

    $ sudo fsck /dev/xvdb1
    fsck from util-linux 2.20.1
    e2fsck 1.42 (29-Nov-2011)
    fsck.ext4: Operation not permitted while trying to open /dev/xvdb1
    You must have r/w access to the filesystem or be root


    Well, I'm using sudo so surely I am root, so how come it's giving me this error? Is it something to do with it being a VM? Any ideas how I can get fsck to run?
    Last edited by philled; May 29th, 2013 at 08:14 AM.

  2. #2
    Join Date
    Jan 2009
    Location
    Santander, Spain
    Beans
    1,981
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Can't execute fsck

    Perhaps this thread can help you: http://ubuntuforums.org/showthread.php?t=1508294

  3. #3
    Join Date
    Jul 2012
    Beans
    62

    Re: Can't execute fsck

    Quote Originally Posted by claracc View Post
    Perhaps this thread can help you: http://ubuntuforums.org/showthread.php?t=1508294
    I booted the VM with a Ubuntu LiveCD and ran e2fsck on the offending disks and all was reported well. But when I reboot the machine proper I'm still getting reports of serious disk errors:

    Serious errors were found while checking the disk drive for /mnt/xvdb1.
    Press I to ignore, S to skip mounting, or M for manual recovery

    And when I try to run e2fsck on them I get an error:

    root@mbe:~# e2fsck -f /dev/xvdb1
    e2fsck 1.42 (29-Nov-2011)
    e2fsck: Operation not permitted while trying to open /dev/xvdb1
    You must have r/w access to the filesystem or be root


    How come it doesn't report errors when I run e2fsck from the LiveCD but it does when I boot it up? And as I'm logged on as root why won't it let me run e2fsck?

    I've also found that I can actually mount the filesystem - but only in read only mode which isn't what I need:

    root@mbe:~# mount -a
    mount: block device /dev/xvdb1 is write-protected, mounting read-only

  4. #4
    Join Date
    May 2008
    Beans
    30

    Re: Can't execute fsck

    I'm sure I won't give you any answers, I'm an idiot at this Linux stuff, but the errors you get are the same I got went my HD started to fail.

    I know it's no big help, but I'm just doing this to refresh the thread, holiday weekend, people gone visiting.

  5. #5
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: Can't execute fsck

    are you trying to fsck a disk while it's mounted?

  6. #6
    Join Date
    Jul 2012
    Beans
    62

    Re: Can't execute fsck

    I think I've found the solution to this. It turns out to be a Cixtrix XenServer issue.

    I removed the storage respositories from XenServer as per CTX131328 - How to Remove a Storage Repository from XenServer - Citrix Knowledge Center.

    I then followed the instructions at CTX121896 - How to Introduce a Local Storage Repository in XenServer - Citrix Knowledge Center to re-introduce the storage repositories. I reattached them to the Mythbuntu VM and it then booted up fine.

    So definitley a XenServer issue, I think. Hope this helps someone else in the future.

  7. #7
    Join Date
    Jan 2009
    Location
    Santander, Spain
    Beans
    1,981
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Can't execute fsck

    Please, could you mark the thread as solved? https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •