0

An instance I manage recently experienced file system block errors and passed in Read Only mode. Before any attempt to fix it, I wanted to save one specific docker volume.

scp -r -v user@some_domain:/var/lib/docker/volumes/etl_influxdb-volume/ etl_influxdb-volume/
....
....
debug1: Sending command: scp -v -r -f /var/lib/docker/volumes/etl_influxdb-volume/
bash: /usr/bin/scp: Input/output error
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 3656, received 3232 bytes, in 8.6 seconds
Bytes per second: sent 425.0, received 375.8
debug1: Exit status 126

I am not sure how to interpret this error. Does it mean:

  • that the corrupted block is, precisely, one involving this docker volume?
  • that the RO mode prevents scp to send data because doing so involves to write something on the filesystem at one point?

How would you save this folder?

Additional information

root@some_domain:~# fsck -A
fsck from util-linux 2.29.2
e2fsck 1.43.4 (31-Jan-2017)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/nbd0p1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
or
    e2fsck -b 32768 <device>

Here are the last lines of the syslog (in case anybody could postulate what went wrong):

some_instance kernel: [6410983.105796] EXT4-fs warning (device nbd0p1): ext4_end_bio:314: I/O error -5 writing to inode 533991 (offset 0 size 0 starting block 2345493)
Oct  1 14:37:25 blackswan kernel: [6410983.105797] Buffer I/O error on device nbd0p1, logical block 2319636
some_instance kernel: [6410983.105801] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105804] EXT4-fs warning (device nbd0p1): ext4_end_bio:314: I/O error -5 writing to inode 533991 (offset 0 size 0 starting block 2345507)
Oct  1 14:37:25 blackswan kernel: [6410983.105805] Buffer I/O error on device nbd0p1, logical block 2319650
some_instance kernel: [6410983.105808] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105811] EXT4-fs warning (device nbd0p1): ext4_end_bio:314: I/O error -5 writing to inode 398256 (offset 0 size 0 starting block 3763524)
some_instance kernel: [6410983.105813] Buffer I/O error on device nbd0p1, logical block 3737667
some_instance kernel: [6410983.105818] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105821] EXT4-fs warning (device nbd0p1): ext4_end_bio:314: I/O error -5 writing to inode 396956 (offset 0 size 0 starting block 3775521)
Oct  1 14:37:25 blackswan kernel: [6410983.105822] Buffer I/O error on device nbd0p1, logical block 3749664
some_instance kernel: [6410983.105826] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105829] EXT4-fs warning (device nbd0p1): ext4_end_bio:314: I/O error -5 writing to inode 398264 (offset 0 size 0 starting block 3791273)
some_instance kernel: [6410983.105831] Buffer I/O error on device nbd0p1, logical block 3765416
some_instance kernel: [6410983.105834] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105837] EXT4-fs warning (device nbd0p1): ext4_end_bio:314: I/O error -5 writing to inode 398218 (offset 0 size 4096 starting block 4292425)
some_instance kernel: [6410983.105839] Buffer I/O error on device nbd0p1, logical block 4266568
some_instance kernel: [6410983.105842] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105847] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105853] block nbd0: Attempted send on closed socket
some_instance kernel: [6410983.105861] block nbd0: Attempted send on closed socket
some_instance kernel: [6410987.854255] JBD2: Detected IO errors while flushing file data on nbd0p1-8
some_instance kernel: [6410987.865408] block nbd0: Attempted send on closed socket
....
....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.