Skip to main content
added 144 characters in body
Source Link
Hauke Laging
  • 94.5k
  • 21
  • 132
  • 185

software problem

If this is assumed to be a software problem (inconsistent filesystem on good hardware) then the quick, safe, and easy (compared to making a full backup) approach is

  1. to set up device mapper manually for the block device to be checked
  2. create an rw snapshot of the device (with CoW to RAM, to an empty "real" block device (if you have e.g. LVM with some free space in a VG), a loop device backed by a file on a different filesystem, or an USB stick)
  3. run btrfs check --repair on the snapshot

If that works (i.e. the fsck does not rip your (virtual) btrfs volume to pieces) then you can safely repeat the command on the real device.

If this is something you want to try then I can help with the necessary commands.

hardware problem

If there is reason to assume that the hardware is failing then an image backup should be made first. The snapshot fsck approach can be applied to the new hardware then.

software problem

If this is assumed to be a software problem (inconsistent filesystem on good hardware) then the quick, safe, and easy (compared to making a full backup) approach is

  1. to set up device mapper manually for the block device to be checked
  2. create an rw snapshot of the device (with CoW to RAM or an USB stick)
  3. run btrfs check --repair on the snapshot

If that works (i.e. the fsck does not rip your (virtual) btrfs volume to pieces) then you can safely repeat the command on the real device.

If this is something you want to try then I can help with the necessary commands.

hardware problem

If there is reason to assume that the hardware is failing then an image backup should be made first. The snapshot fsck approach can be applied to the new hardware then.

software problem

If this is assumed to be a software problem (inconsistent filesystem on good hardware) then the quick, safe, and easy (compared to making a full backup) approach is

  1. to set up device mapper manually for the block device to be checked
  2. create an rw snapshot of the device (with CoW to RAM, to an empty "real" block device (if you have e.g. LVM with some free space in a VG), a loop device backed by a file on a different filesystem, or an USB stick)
  3. run btrfs check --repair on the snapshot

If that works (i.e. the fsck does not rip your (virtual) btrfs volume to pieces) then you can safely repeat the command on the real device.

If this is something you want to try then I can help with the necessary commands.

hardware problem

If there is reason to assume that the hardware is failing then an image backup should be made first. The snapshot fsck approach can be applied to the new hardware then.

added 308 characters in body
Source Link
Hauke Laging
  • 94.5k
  • 21
  • 132
  • 185

software problem

TheIf this is assumed to be a software problem (inconsistent filesystem on good hardware) then the quick, safe, and easy (compared to making a full backup) approach is

  1. to set up device mapper manually for the block device to be checked
  2. create an rw snapshot of the device (with CoW to RAM or an USB stick)
  3. run btrfs check --repair on the snapshot

If that works (i.e. the fsck does not rip your (virtual) btrfs volume to pieces) then you can safely repeat the command on the real device.

If this is something you want to try then I can help with the necessary commands.

hardware problem

If there is reason to assume that the hardware is failing then an image backup should be made first. The snapshot fsck approach can be applied to the new hardware then.

The quick, safe, and easy (compared to making a full backup) approach is

  1. to set up device mapper manually for the block device to be checked
  2. create an rw snapshot of the device (with CoW to RAM or an USB stick)
  3. run btrfs check --repair on the snapshot

If that works (i.e. the fsck does not rip your (virtual) btrfs volume to pieces) then you can safely repeat the command on the real device.

If this is something you want to try then I can help with the necessary commands.

software problem

If this is assumed to be a software problem (inconsistent filesystem on good hardware) then the quick, safe, and easy (compared to making a full backup) approach is

  1. to set up device mapper manually for the block device to be checked
  2. create an rw snapshot of the device (with CoW to RAM or an USB stick)
  3. run btrfs check --repair on the snapshot

If that works (i.e. the fsck does not rip your (virtual) btrfs volume to pieces) then you can safely repeat the command on the real device.

If this is something you want to try then I can help with the necessary commands.

hardware problem

If there is reason to assume that the hardware is failing then an image backup should be made first. The snapshot fsck approach can be applied to the new hardware then.

Source Link
Hauke Laging
  • 94.5k
  • 21
  • 132
  • 185

The quick, safe, and easy (compared to making a full backup) approach is

  1. to set up device mapper manually for the block device to be checked
  2. create an rw snapshot of the device (with CoW to RAM or an USB stick)
  3. run btrfs check --repair on the snapshot

If that works (i.e. the fsck does not rip your (virtual) btrfs volume to pieces) then you can safely repeat the command on the real device.

If this is something you want to try then I can help with the necessary commands.