Re: btrfstune -u makes filesystem unmountable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 10, 2016 at 03:47:44PM +0100, Richard C wrote:
> Hi,
> 
> I'm writing a backup script that images a btrfs using btrfs-image,

   You are aware that btrfs-image copies only the metadata? The data
is _not_ a part of the image, so it's a fairly poor implementation of
a backup process.

   Hugo.

> then restores to a file on a loop device. Since I had trouble mounting
> the original and copied btrfs filesystems with the same UUID on the
> same machine, I decided to try btrfstune -fu. However, this appears to
> corrupt the copied filesystem altogether making fsck and mount fail.
> Details below.
> Is this a bug?
> 
> $ uname -a
> Linux adventure 3.16.0-67-generic #87~14.04.1-Ubuntu SMP Fri Mar 11
> 00:26:02 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
> $ btrfs --version
> btrfs-progs v4.4
> 
> $ btrfstune -fu /dev/loop2
> Current fsid: 36012b08-1e33-4d3c-ac23-5ccffd3295cd
> New fsid: 8f70d0af-8ffa-4c82-a817-941e6abfaf9a
> Set superblock flag CHANGING_FSID
> Change fsid in extents
> Change fsid on devices
> Clear superblock flag CHANGING_FSID
> Fsid change finished
> 
> $ btrfs check /dev/loop2
> fsid mismatch, want=36012b08-1e33-4d3c-ac23-5ccffd3295cd,
> have=8f70d0af-8ffa-4c82-a817-941e6abfaf9a
> Couldn't read chunk root
> Couldn't open file system
> $ echo $?
> 251
> 
> $ mount /dev/loop2 /mnt
>  mount: wrong fs type, bad option, bad superblock on /dev/loop2,
>        missing codepage or helper program, or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
> $ echo $?
> 32

-- 
Hugo Mills             | There's many a slip 'twixt wicket-keeper and gully.
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux