Input/Output error on 1 file on btrfs

Discussion in 'Other Operating Systems' started by kogi, Dec 20, 2018.

  1. kogi

    kogi Member

    Joined:
    Jan 23, 2003
    Messages:
    4,617
    Location:
    2031
    I am getting this error when I try to copy this one file and have nfi on how to fix it.

    btrfsck reports no errors



    Code:
    cp Win7-64.vdi Win7-64.vdi.bk
    cp: error reading 'Win7-64.vdi': Input/output error
    

    Code:
    [  157.176250] BTRFS warning (device sda4): csum failed root 258 ino 9422 off 20087906304 csum 0x827087ee expected csum 0x28fec878 mirror 1
    [  157.210719] BTRFS warning (device sda4): csum failed root 258 ino 9422 off 20087906304 csum 0x827087ee expected csum 0x28fec878 mirror 1
    [  157.243091] BTRFS warning (device sda4): csum failed root 258 ino 9422 off 20087906304 csum 0x827087ee expected csum 0x28fec878 mirror 1
    
     
  2. Quadbox

    Quadbox Member

    Joined:
    Jun 27, 2001
    Messages:
    6,133
    Location:
    Brisbane
    Well a checksum failure sure means the file is fucked, I'd start looking at hardware if I were you. Are there any SMART errors? Is this spinning iron, or an SSD?

    Is this a BTRFS raid filesystem, or just a single device? EDIT - If it is RAID, whether MD or btrfs, run a full scrub immediately.

    Chances are either way if it's showing checksum errors that file will not be completely recoverable.
     
  3. OP
    OP
    kogi

    kogi Member

    Joined:
    Jan 23, 2003
    Messages:
    4,617
    Location:
    2031
    Brand new SSD, no errors

    Single device, btrfsck shows no errors

    Is there a way of triggering a checksum check on every file?
     
  4. Quadbox

    Quadbox Member

    Joined:
    Jun 27, 2001
    Messages:
    6,133
    Location:
    Brisbane
    A btrfsck wouldnt find anything on a checksum error, it checks the filesystem structure not all data checksums.

    Yeah, to trigger a check of all checksums, run a scrub of the filesystem. "btrfs scrub start /path/to/mounted/filesystem"
     
    kogi likes this.
  5. OP
    OP
    kogi

    kogi Member

    Joined:
    Jan 23, 2003
    Messages:
    4,617
    Location:
    2031
    Thanks Quadbox. I am just going to ignore the errors for now until I reinstall mint Tessa
     
  6. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    852
    Location:
    BRISBANE
    see if
    Code:
    btrfs dev stats /whatever/volume
    gives you anything
     
  7. OP
    OP
    kogi

    kogi Member

    Joined:
    Jan 23, 2003
    Messages:
    4,617
    Location:
    2031
    Code:
    [/dev/sda4].write_io_errs    0
    [/dev/sda4].read_io_errs     0
    [/dev/sda4].flush_io_errs    0
    [/dev/sda4].corruption_errs  0
    [/dev/sda4].generation_errs  0
     
  8. Quadbox

    Quadbox Member

    Joined:
    Jun 27, 2001
    Messages:
    6,133
    Location:
    Brisbane
    Okay, well that is very curious... The plot thickens.
     
  9. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    852
    Location:
    BRISBANE
    Did the scrub fix anything? Going off the dev stats you don't have a hardware problem. When my disks are failing I usually get a '
    parent transid verify failed on xxxx'.

    How big is the file? Does rsync work any better? Can you run strings/cat/hexeditor over it? Have you set the no cow bit on the file? I have a whole subvolume for VM disks as they're already CoW'd/sparse volumes and btrfs doesn't play nice with em.
     
  10. OP
    OP
    kogi

    kogi Member

    Joined:
    Jan 23, 2003
    Messages:
    4,617
    Location:
    2031
    Thanks for the help guys.

    I just reformatted and restored from backup, everything seems to be ok, Will keep and eye on that VM disk
     
    waltermitty likes this.
  11. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    852
    Location:
    BRISBANE
    I seriously recommend creating a subvolume and mounting it as nodatacow specifically for any virtual disks
     
    kogi likes this.
  12. OP
    OP
    kogi

    kogi Member

    Joined:
    Jan 23, 2003
    Messages:
    4,617
    Location:
    2031
    Edit;

    Ok. I am an idiot. It is a bad ram stick
     
    Last edited: Dec 21, 2018
    ex4n likes this.

Share This Page