# [btrfs] home lost?

## elyes

Hi,

I've managed to make update my 32bits to 64 bits with a  fresh install, but I'm getting an issue with my old /home (btrfs).

When I mount -t btrfs /dev/sda4 I can't see my data, however when I run umount /mnt && btrfs-show, I have 2.04GB used on my sda4:

```
localhost ~ # umount /mnt && btrfs-show

**

** WARNING: this program is considered deprecated

** Please consider to switch to the btrfs utility

**

failed to read /dev/sr1: No medium found

failed to read /dev/sr0: No medium found

Label: none  uuid: 291bd970-54a4-44fe-b852-ad86c2b785ab

   Total devices 1 FS bytes used 3.19GB

   devid    1 size 95.70GB used 55.79GB path /dev/sda3

Label: none  uuid: aa43ac02-d9ef-4a79-991c-fad2410de21d

   Total devices 1 FS bytes used 28.00KB

   devid    1 size 49.24GB used 2.04GB  path /dev/sda4

Btrfs v0.20-rc1-37-g91d9eec-dirty

localhost ~ # 
```

```

localhost ~ # mount -t btrfs /dev/sda4 /mnt/

localhost ~ # ls /mnt/*

ls: impossible d'accéder à /mnt/*: Aucun fichier ou dossier de ce type

localhost ~ # 
```

FYI: I use btrfs-progs-9999 and btrfs-zero-log /dev/sda4 do not solve the problem.

here is my emerge --info:

```
System uname: Linux-3.4.9-gentoo-x86_64-Intel-R-_Pentium-R-_D_CPU_3.40GHz-with-gentoo-2.1

Timestamp of tree: Fri, 12 Oct 2012 06:15:01 +0000

app-shells/bash:          4.2_p37

dev-lang/python:          2.7.3-r2, 3.2.3

dev-util/cmake:           2.8.9

dev-util/pkgconfig:       0.27.1

sys-apps/baselayout:      2.1-r1

sys-apps/openrc:          0.9.8.4

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.11.6

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.5.4

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r3

sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)

sys-libs/glibc:           2.15-r2

Repositories: gentoo

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=native -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=native -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ http://de-mirror.org/gentoo/"

LANG="fr_FR.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="fr"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync4.fr.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv jpeg lcms ldap libnotify lock mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pppd qt3support readline sdl session spell sse sse2 ssl startup-notification svg tcpd thunar tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xcomposite xml xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON 
```

I do not know how to fix this issue ( yeah it's my fault I have no backup   :Embarassed:  )

thx and best regards,

Elyes

----------

## d2_racing

For now, I don't know how to help you.

But since, you speak french, I can help you at least for the backup part :

Plz read and use this method next time : 

https://gentooquebec.org/gwiki/index.php/Sauvegarde_Rsync_avec_Btrfs_et_SystemRescueCD

https://gentooquebec.org/gwiki/index.php/Discussion:Sauvegarde_Rsync_avec_Btrfs_et_SystemRescueCD

----------

## _______0

DO NOT USE BTRFS

trust me, have tried it since kernel 2.6 series up to 3.5 and does some shit all the time.

last time it killed dmesg, something uheard off prior in my life:

```
dmesg: klogctl failed: Bad address
```

Then 87MB in /var/log/messages with:

```
kernel: [583299.443396] btrfs no csum found for inode 3304 start 8990720
```

some other times:

```
kernel: [496733.934671] Pid: 10697, comm: btrfs-endio-wri Not tainted 3.5.4-gentoo #2

kernel: [496733.934673] Call Trace:

kernel: [496733.934685]  [<ffffffff81031fca>] warn_slowpath_common+0x7a/0xb0

kernel: [496733.934691]  [<ffffffff81032015>] warn_slowpath_null+0x15/0x20

kernel: [496733.934711]  [<ffffffffa02e0c04>] btrfs_alloc_free_block+0x354/0x360 [btrfs]

kernel: [496733.934718]  [<ffffffff810d83a5>] ? pagevec_lru_move_fn+0xd5/0xf0

kernel: [496733.934738]  [<ffffffffa02e8280>] ? verify_parent_transid+0x170/0x170 [btrfs]

kernel: [496733.934756]  [<ffffffffa02cd4ff>] __btrfs_cow_block+0x11f/0x4e0 [btrfs]

kernel: [496733.934774]  [<ffffffffa02cd9b7>] btrfs_cow_block+0xf7/0x240 [btrfs]

kernel: [496733.934793]  [<ffffffffa02d1dbc>] btrfs_search_slot+0x44c/0x8f0 [btrfs]

kernel: [496733.934837]  [<ffffffffa02e51af>] btrfs_lookup_csum+0x6f/0x190 [btrfs]

kernel: [496733.934844]  [<ffffffff8110eef3>] ? kmem_cache_alloc+0x133/0x150

kernel: [496733.934865]  [<ffffffffa02e637c>] btrfs_csum_file_blocks+0xac/0x710 [btrfs]

kernel: [496733.934891]  [<ffffffffa03022bb>] ? try_merge_map+0x5b/0x130 [btrfs]

kernel: [496733.934930]  [<ffffffffa02f2ded>] add_pending_csums.isra.34+0x3d/0x60 [btrfs]

kernel: [496733.934966]  [<ffffffffa02f6d4f>] btrfs_finish_ordered_io+0x25f/0x3b0 [btrfs]

kernel: [496733.935000]  [<ffffffffa02f6eb0>] finish_ordered_fn+0x10/0x20 [btrfs]

kernel: [496733.935022]  [<ffffffffa03208c2>] worker_loop+0x162/0x570 [btrfs]

kernel: [496733.935044]  [<ffffffffa0320760>] ? btrfs_queue_worker+0x300/0x300 [btrfs]

kernel: [496733.935050]  [<ffffffff81053dfe>] kthread+0x8e/0xa0

kernel: [496733.935057]  [<ffffffff81434114>] kernel_thread_helper+0x4/0x10

kernel: [496733.935063]  [<ffffffff81053d70>] ? kthread_freezable_should_stop+0x60/0x60

kernel: [496733.935068]  [<ffffffff81434110>] ? gs_change+0xb/0xb

kernel: [496733.935072] ---[ end trace 9732eebab4a94df1 ]---

kernel: [496733.935125] btrfs: block rsv returned -28

kernel: [496733.935130] ------------[ cut here ]------------

kernel: [496733.935165] WARNING: at fs/btrfs/extent-tree.c:6221 btrfs_alloc_free_block+0x354/0x360 [btrfs]()

```

and btrfs tools don't work as advertised either such as online resizing:

```
kernel: [582161.806939] attempt to access beyond end of device

kernel: [582161.806945] dm-9: rw=0, want=476475568, limit=204800

kernel: [582161.806968] attempt to access beyond end of device

kernel: [582161.806973] dm-9: rw=0, want=476475576, limit=204800

kernel: [582161.806997] attempt to access beyond end of device

kernel: [582161.807003] dm-9: rw=0, want=476475584, limit=204800

kernel: [582161.807028] attempt to access beyond end of device

kernel: [582161.807032] dm-9: rw=0, want=476475592, limit=204800

kernel: [582161.807066] attempt to access beyond end of device

kernel: [582161.807068] dm-9: rw=0, want=476475600, limit=204800

kernel: [582161.807088] attempt to access beyond end of device

kernel: [582161.807093] dm-9: rw=0, want=476475608, limit=204800

kernel: [582161.807112] attempt to access beyond end of device

kernel: [582161.807116] dm-9: rw=0, want=476475616, limit=204800

kernel: [582161.807138] attempt to access beyond end of device

kernel: [582161.807142] dm-9: rw=0, want=476475624, limit=204800

kernel: [582161.807166] attempt to access beyond end of device

```

resulting in the most dreaded messages:

```
Failed to read: Input/output error
```

Some more btrfs fun:

```
kernel: [583152.227317] btrfs bad tree block start 0 105272111104

kernel: [583152.227354] btrfs no csum found for inode 2963 start 0 

kernel: [583152.243791] btrfs csum failed ino 2963 off 0 csum 236753646 private 0

kernel: [583152.259396] btrfs bad tree block start 0 105272111104

kernel: [583152.259680] btrfs bad tree block start 0 105272111104

kernel: [583152.259712] btrfs no csum found for inode 2963 start 3035136

kernel: [583152.265649] btrfs csum failed ino 2963 off 3035136 csum 2533619595 private 0

kernel: [583152.289879] btrfs bad tree block start 0 105272111104

kernel: [583152.289989] btrfs bad tree block start 0 105272111104

kernel: [583152.290010] btrfs no csum found for inode 2964 start 0 

kernel: [583152.292631] btrfs csum failed ino 2964 off 0 csum 4011485432 private 0

kernel: [583152.305696] btrfs bad tree block start 0 105272111104

kernel: [583152.305839] btrfs bad tree block start 0 105272111104

kernel: [583152.305864] btrfs no csum found for inode 2964 start 3174400

kernel: [583152.307372] btrfs csum failed ino 2964 off 3174400 csum 2012014669 private 0

kernel: [583152.344113] btrfs bad tree block start 0 105272111104

kernel: [583152.344262] btrfs bad tree block start 0 105272111104

kernel: [583152.344283] btrfs no csum found for inode 2965 start 0 

kernel: [583152.346437] btrfs csum failed ino 2965 off 0 csum 2548819551 private 0

kernel: [583152.374067] btrfs no csum found for inode 2965 start 3923968

kernel: [583152.374536] btrfs csum failed ino 2965 off 3923968 csum 3021966583 private 0

kernel: [583152.412142] btrfs no csum found for inode 2966 start 0 

kernel: [583152.414243] btrfs csum failed ino 2966 off 0 csum 3934913428 private 0

kernel: [583152.432632] btrfs no csum found for inode 2966 start 2437120

kernel: [583152.433277] btrfs csum failed ino 2966 off 2437120 csum 1299433636 private 0

kernel: [583152.456775] btrfs no csum found for inode 2967 start 0 

kernel: [583152.459333] btrfs csum failed ino 2967 off 0 csum 2966878781 private 0

kernel: [583152.565564] btrfs no csum found for inode 2967 start 2732032

kernel: [583152.566892] btrfs csum failed ino 2967 off 2732032 csum 1740098208 private 0

```

Then btrfs when working has it own set of problems like slow as hell with rsync, rm takes for ever, etc.

don't gamble with ur life move over to a safer saner fs. btrfs hype is a marketing campaign.

----------

## _______0

DO NOT USE BTRFS

trust me, have tried it since kernel 2.6 series up to 3.5 and does some shit all the time.

last time it killed dmesg, something uheard off prior in my life:

```
dmesg: klogctl failed: Bad address
```

Then 87MB in /var/log/messages with:

```
kernel: [583299.443396] btrfs no csum found for inode 3304 start 8990720
```

some other times:

```
kernel: [496733.934671] Pid: 10697, comm: btrfs-endio-wri Not tainted 3.5.4-gentoo #2

kernel: [496733.934673] Call Trace:

kernel: [496733.934685]  [<ffffffff81031fca>] warn_slowpath_common+0x7a/0xb0

kernel: [496733.934691]  [<ffffffff81032015>] warn_slowpath_null+0x15/0x20

kernel: [496733.934711]  [<ffffffffa02e0c04>] btrfs_alloc_free_block+0x354/0x360 [btrfs]

kernel: [496733.934718]  [<ffffffff810d83a5>] ? pagevec_lru_move_fn+0xd5/0xf0

kernel: [496733.934738]  [<ffffffffa02e8280>] ? verify_parent_transid+0x170/0x170 [btrfs]

kernel: [496733.934756]  [<ffffffffa02cd4ff>] __btrfs_cow_block+0x11f/0x4e0 [btrfs]

kernel: [496733.934774]  [<ffffffffa02cd9b7>] btrfs_cow_block+0xf7/0x240 [btrfs]

kernel: [496733.934793]  [<ffffffffa02d1dbc>] btrfs_search_slot+0x44c/0x8f0 [btrfs]

kernel: [496733.934837]  [<ffffffffa02e51af>] btrfs_lookup_csum+0x6f/0x190 [btrfs]

kernel: [496733.934844]  [<ffffffff8110eef3>] ? kmem_cache_alloc+0x133/0x150

kernel: [496733.934865]  [<ffffffffa02e637c>] btrfs_csum_file_blocks+0xac/0x710 [btrfs]

kernel: [496733.934891]  [<ffffffffa03022bb>] ? try_merge_map+0x5b/0x130 [btrfs]

kernel: [496733.934930]  [<ffffffffa02f2ded>] add_pending_csums.isra.34+0x3d/0x60 [btrfs]

kernel: [496733.934966]  [<ffffffffa02f6d4f>] btrfs_finish_ordered_io+0x25f/0x3b0 [btrfs]

kernel: [496733.935000]  [<ffffffffa02f6eb0>] finish_ordered_fn+0x10/0x20 [btrfs]

kernel: [496733.935022]  [<ffffffffa03208c2>] worker_loop+0x162/0x570 [btrfs]

kernel: [496733.935044]  [<ffffffffa0320760>] ? btrfs_queue_worker+0x300/0x300 [btrfs]

kernel: [496733.935050]  [<ffffffff81053dfe>] kthread+0x8e/0xa0

kernel: [496733.935057]  [<ffffffff81434114>] kernel_thread_helper+0x4/0x10

kernel: [496733.935063]  [<ffffffff81053d70>] ? kthread_freezable_should_stop+0x60/0x60

kernel: [496733.935068]  [<ffffffff81434110>] ? gs_change+0xb/0xb

kernel: [496733.935072] ---[ end trace 9732eebab4a94df1 ]---

kernel: [496733.935125] btrfs: block rsv returned -28

kernel: [496733.935130] ------------[ cut here ]------------

kernel: [496733.935165] WARNING: at fs/btrfs/extent-tree.c:6221 btrfs_alloc_free_block+0x354/0x360 [btrfs]()

```

and btrfs tools don't work as advertised either such as online resizing:

```
kernel: [582161.806939] attempt to access beyond end of device

kernel: [582161.806945] dm-9: rw=0, want=476475568, limit=204800

kernel: [582161.806968] attempt to access beyond end of device

kernel: [582161.806973] dm-9: rw=0, want=476475576, limit=204800

kernel: [582161.806997] attempt to access beyond end of device

kernel: [582161.807003] dm-9: rw=0, want=476475584, limit=204800

kernel: [582161.807028] attempt to access beyond end of device

kernel: [582161.807032] dm-9: rw=0, want=476475592, limit=204800

kernel: [582161.807066] attempt to access beyond end of device

kernel: [582161.807068] dm-9: rw=0, want=476475600, limit=204800

kernel: [582161.807088] attempt to access beyond end of device

kernel: [582161.807093] dm-9: rw=0, want=476475608, limit=204800

kernel: [582161.807112] attempt to access beyond end of device

kernel: [582161.807116] dm-9: rw=0, want=476475616, limit=204800

kernel: [582161.807138] attempt to access beyond end of device

kernel: [582161.807142] dm-9: rw=0, want=476475624, limit=204800

kernel: [582161.807166] attempt to access beyond end of device

```

resulting in the most dreaded messages:

```
Failed to read: Input/output error
```

Some more btrfs fun:

```
kernel: [583152.227317] btrfs bad tree block start 0 105272111104

kernel: [583152.227354] btrfs no csum found for inode 2963 start 0 

kernel: [583152.243791] btrfs csum failed ino 2963 off 0 csum 236753646 private 0

kernel: [583152.259396] btrfs bad tree block start 0 105272111104

kernel: [583152.259680] btrfs bad tree block start 0 105272111104

kernel: [583152.259712] btrfs no csum found for inode 2963 start 3035136

kernel: [583152.265649] btrfs csum failed ino 2963 off 3035136 csum 2533619595 private 0

kernel: [583152.289879] btrfs bad tree block start 0 105272111104

kernel: [583152.289989] btrfs bad tree block start 0 105272111104

kernel: [583152.290010] btrfs no csum found for inode 2964 start 0 

kernel: [583152.292631] btrfs csum failed ino 2964 off 0 csum 4011485432 private 0

kernel: [583152.305696] btrfs bad tree block start 0 105272111104

kernel: [583152.305839] btrfs bad tree block start 0 105272111104

kernel: [583152.305864] btrfs no csum found for inode 2964 start 3174400

kernel: [583152.307372] btrfs csum failed ino 2964 off 3174400 csum 2012014669 private 0

kernel: [583152.344113] btrfs bad tree block start 0 105272111104

kernel: [583152.344262] btrfs bad tree block start 0 105272111104

kernel: [583152.344283] btrfs no csum found for inode 2965 start 0 

kernel: [583152.346437] btrfs csum failed ino 2965 off 0 csum 2548819551 private 0

kernel: [583152.374067] btrfs no csum found for inode 2965 start 3923968

kernel: [583152.374536] btrfs csum failed ino 2965 off 3923968 csum 3021966583 private 0

kernel: [583152.412142] btrfs no csum found for inode 2966 start 0 

kernel: [583152.414243] btrfs csum failed ino 2966 off 0 csum 3934913428 private 0

kernel: [583152.432632] btrfs no csum found for inode 2966 start 2437120

kernel: [583152.433277] btrfs csum failed ino 2966 off 2437120 csum 1299433636 private 0

kernel: [583152.456775] btrfs no csum found for inode 2967 start 0 

kernel: [583152.459333] btrfs csum failed ino 2967 off 0 csum 2966878781 private 0

kernel: [583152.565564] btrfs no csum found for inode 2967 start 2732032

kernel: [583152.566892] btrfs csum failed ino 2967 off 2732032 csum 1740098208 private 0

```

Then btrfs when working has it own set of problems like slow as hell with rsync, rm takes for ever, etc.

don't gamble with ur life move over to a safer saner fs. btrfs hype is a marketing campaign.

----------

