Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unable to mount btrfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sat Jan 02, 2016 3:55 pm    Post subject: unable to mount btrfs Reply with quote

I had a raid 5 array of 3 disks using btrfs (raid provided by btrfs)
one of the disks was damaged and I replaced the disk via :
btrfs device add /dev/sdc /media/raid/
btrfs device delete missing /media/raid/

which forced a rebalance accross the disks, after which the FS was fine

one reboot later:
[11152.188020] BTRFS info (device sdb): enabling auto defrag
[11152.188028] BTRFS info (device sdb): disk space caching is enabled
[11152.189762] BTRFS: failed to read chunk tree on sdb
[11152.196224] BTRFS: open_ctree failed

pc ~ # mount -a
mount: wrong fs type, bad option, bad superblock on /dev/sde,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.


the OS started by commenting out that line in fstab, I've uncommented that line afterwards
LABEL="raid" /media/raid btrfs compress=lzo,noatime,autodefrag
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Sun Jan 03, 2016 1:25 pm    Post subject: Reply with quote

Does it mount when adding degraded to mount options?
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sun Jan 03, 2016 1:41 pm    Post subject: Reply with quote

no :(

I've tried btrfs rescue chunk-recover /dev/sdb -v

got plenty of :
Chunk: start = 1461400371200, len = 2147483648, type = 81, num_stripes = 3
Stripes list:
[ 0] Stripe: devid = 4, offset = 299575017472
[ 1] Stripe: devid = 3, offset = 119194779648
[ 2] Stripe: devid = 1, offset = 119214702592
Chunk: start = 1463547854848, len = 2147483648, type = 81, num_stripes = 3
Stripes list:
[ 0] Stripe: devid = 4, offset = 300648759296
[ 1] Stripe: devid = 3, offset = 118121037824
[ 2] Stripe: devid = 1, offset = 118140960768
Chunk: start = 1465695338496, len = 2147483648, type = 81, num_stripes = 3
Stripes list:
[ 0] Stripe: devid = 4, offset = 301722501120
[ 1] Stripe: devid = 3, offset = 117047296000
[ 2] Stripe: devid = 1, offset = 117067218944


and plenty of:
Device extent: devid = 4, start = 413391650816, len = 1073741824, chunk offset = 1689033637888
Device extent: devid = 4, start = 414465392640, len = 1073741824, chunk offset = 1691181121536
Device extent: devid = 4, start = 415539134464, len = 1073741824, chunk offset = 1693328605184


but ended with:
Floating point exception
Back to top
View user's profile Send private message
ATpwwu
n00b
n00b


Joined: 17 Dec 2015
Posts: 5

PostPosted: Sun Jan 03, 2016 4:17 pm    Post subject: Reply with quote

just restore from backup
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sun Jan 03, 2016 4:31 pm    Post subject: Reply with quote

I have no backup, I was hoping raid 5 would protect me from all this
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1696

PostPosted: Sun Jan 03, 2016 5:19 pm    Post subject: Reply with quote

raid systems are not a replacement for a backup. A raid is only there to provide some redundancy in case of a hardware failure. Raid 0 is an exception in that it provides no redundancy either. Most times, the other raids may protect you from 1-2 device failures (depending on raid level, and number of devices) and could still end up causing you to loose everything (when rebuilding the raid, causing more drives to die)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sun Jan 03, 2016 5:38 pm    Post subject: Reply with quote

well is there anyway to recover the raid?
if not, any way to recover the data?
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Sun Jan 03, 2016 6:11 pm    Post subject: Reply with quote

Did you try to run btrfs check --repair /dev/sdb? If all fails try to get help at the btrfs mailing list.
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sun Jan 03, 2016 6:23 pm    Post subject: Reply with quote

enabling repair mode
warning, device 4 is missing
checksum verify failed on 1699771072512 found 35F941C0 wanted D11AFC76
checksum verify failed on 1699771072512 found 35F941C0 wanted D11AFC76
bytenr mismatch, want=1699771072512, have=65536
Couldn't read chunk root
Couldn't open file system
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sun Jan 03, 2016 7:08 pm    Post subject: Reply with quote

any way I can at least recover the data on the device?

pc ~ # btrfs restore /dev/sdb /media/hdd/ -o
warning devid 2 not found already
parent transid verify failed on 1699771121664 wanted 270069 found 270891
parent transid verify failed on 1699771121664 wanted 270069 found 270891
checksum verify failed on 1699771121664 found 267F2F7E wanted C29C92C8
parent transid verify failed on 1699771121664 wanted 270069 found 270891
Ignoring transid failure
Error mapping block -2
Error copying data for /media/hdd/downloads/The.Butterfly.Effect.2004.DC.1080p.BluRay.AAC.x264-tomcat12[ETRG]/Torrent Downloaded From ExtraTorrent.cc.txt
Error searching /media/hdd/downloads/The.Butterfly.Effect.2004.DC.1080p.BluRay.AAC.x264-tomcat12[ETRG]/Torrent Downloaded From ExtraTorrent.cc.txt
Error searching /media/hdd/downloads/The.Butterfly.Effect.2004.DC.1080p.BluRay.AAC.x264-tomcat12[ETRG]/Torrent Downloaded From ExtraTorrent.cc.txt
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum