On Fri, Sep 25, 2015 at 11:45:44PM +0200, Marcel Bischoff wrote: > Hello all, > > I have kind of a serious problem with one of my disks. > > The controller of one of my external drives died (WD Studio). The > disk is alright though. I cracked open the case, got the drive out > and connected it via a SATA-USB interface. > > Now, mounting the filesystem is not possible. Here's the message: > > $ btrfs fi show > warning devid 3 not found already > Label: none uuid: bd6090df-5179-490e-a5f8-8fbad433657f > Total devices 3 FS bytes used 3.02TiB > devid 1 size 596.17GiB used 532.03GiB path /dev/sdd > devid 2 size 931.51GiB used 867.03GiB path /dev/sde > *** Some devices missing > > Yes, I did bundle up three drives with very different sizes with the > --single option on creating the file system. OK, that's entirely possible. Not a problem in itself. Now, asuming that the missing device is actually unrecoverable: Since you've said it's single, you've lost some large fraction of the file data on your filesystem, so this isn't going to end well in any case. I hope you have good backups. Was the metadata on the filesystem also single? If so, then I have no hesitation in declaring this filesystem completely dead. If it was RAID-1 (or RAID-5 or RAID-6), then the metadata should still be OK, and you should be able to mount the FS with -o degraded. That will give you a working (read-only) filesystem where some of the data will return EIO where the data is missing. ddrescue should help you to recover partial files for those cases where partial recovery is acceptable. But it might be recoverable, because... > I have already asked for help on StackExchange but replies have been > few. Now I thought people on this list, close to btrfs development > may be able and willing to help. This would be so much appreciated. > > Here's the issue with lots of information and a record of what I/we > have tried up until now: http://unix.stackexchange.com/questions/231174/btrfs-too-many-missing-devices-writeable-mount-is-not-allowed I think Vincent Yu there has the right idea -- there's no superblock showing up on the device in the place that's expected. However, your update 3 shows that there is a superblock offset by 1 MiB (1114176-65600 = 1048576 = 1024*1024). So the recovery approach here would be to construct a block device using an offset of 1 MiB into /dev/sdc. dmsetup shoudld be able to do this, I think. It's been a long time since I used dmsetup in anger, but something like this may work: # dmsetup load /dev/sdc --table "256 <N> linear /dev/mapper/sdc_offset 0" where <N> is the number of sectors of /dev/sdc, less the 256 at the start. I recommend reading the man page in detail and double-checking that what I've got there is actually what's needed. That will (I think) give you a device /dev/mapper/sdc_offset, which should then show up in btfs fi show, and allow you to keep using the FS. Hugo. -- Hugo Mills | If you see something, say nothing and drink to hugo@... carfax.org.uk | forget http://carfax.org.uk/ | PGP: E2AB1DE4 | Welcome to Night Vale
Attachment:
signature.asc
Description: Digital signature
