I messed up disk replace of RAID5
Hi, I have a copy of this data online and a backup offline but I would like to find out if we can recover this. A drive broke and I made a mess while replacing it. each of sda,sdb,sdc,sdd is a 2 disk hardware RAID0. one disk of sda died and. I replaced it. Made a new raid0 array: sde This was my mistake right? With btrfs filesystem still mounted I replicated GUID partition using gdisk /dev/sdd u /dev/sde w q then to randomize GUID (but it was already too late right? ) gdisk /dev/sde g w q btrfs already took the new partion in. Infact btrfs fi show showed 4 drives and no missing drives. Here I made some more mistakes like a btrfs de remove than stopped and some other command. Then I umounted the filesystem. wipefs on /dev/sde5 and then zero to all /dev/sde5 to be sure Rebooted the machine. mount -o degraded btrfs device add /dev/sda5 (after reboot sde-> sda) btrfs device remove missing /data/btrfs ERROR: error removing device 'missing': Input/output error btrfs balance start /data/btrfs [...] Input/output error btrfs fi show Label: 'btrfs-data' uuid: dee27729-64b0-45e0-af2b-97557357c021 Total devices 5 FS bytes used 12.86TiB devid2 size 7.12TiB used 4.29TiB path /dev/sdb5 devid3 size 7.12TiB used 4.29TiB path /dev/sdc5 devid4 size 7.12TiB used 4.29TiB path /dev/sdd5 devid5 size 7.12TiB used 60.34GiB path /dev/sda5 *** Some devices missing uname -a Linux kvm4.prisma 4.18.13-1.el7.elrepo.x86_64 #1 SMP Wed Oct 10 15:37:55 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux btrfs --version btrfs-progs v4.15.1 btrfs fi show Label: 'btrfs-data' uuid: dee27729-64b0-45e0-af2b-97557357c021 Total devices 5 FS bytes used 12.86TiB devid2 size 7.12TiB used 4.29TiB path /dev/sdb5 devid3 size 7.12TiB used 4.29TiB path /dev/sdc5 devid4 size 7.12TiB used 4.29TiB path /dev/sdd5 devid5 size 7.12TiB used 60.34GiB path /dev/sda5 *** Some devices missing btrfs fi df /data/btrfs/ Data, RAID5: total=12.83TiB, used=12.83TiB System, RAID5: total=12.00MiB, used=912.00KiB Metadata, RAID5: total=31.88GiB, used=30.94GiB GlobalReserve, single: total=512.00MiB, used=0.00B [ 3011.971936] BTRFS info (device sdb5): found 66028 extents [ 3012.489634] BTRFS info (device sdb5): relocating block group 14141113761792 flags data|raid5 [ 3020.107263] BTRFS info (device sdb5): found 5057 extents [ 3024.248896] BTRFS info (device sdb5): found 5057 extents [ 3024.341585] BTRFS info (device sdb5): relocating block group 13945625640960 flags data|raid5 [ 3041.911748] BTRFS info (device sdb5): found 95400 extents [ 3043.288820] BTRFS error (device sdb5): bad tree block start 0 13851980791808 Data is readable and seem also writeable but is this array recoverable or should I make a new filesystem? Regards, Marco
btrfs defrag kernel 3.11
serio_raw snd_seq snd_seq_device snd_timer scsi_dh snd ohci_pci soundcore bluetooth btrfs zlib_deflate libcrc32c raid10 raid456 async_memcpy async_raid6_recov async_pq async_xor async_tx xor raid6_pq raid0 multipath linear hid_generic usbhid hid raid1 usb_storage radeon wmi i2c_algo_bit ttm r8169 mii drm_kms_helper ahci drm libahci [17838.564104] CPU: 0 PID: 2093 Comm: btrfs-endio-wri Tainted: G W3.11.0-031100-generic #201309021735 [17838.564106] Hardware name: System manufacturer System Product Name/F1A75-V EVO, BIOS 0702 07/12/2011 [17838.564107] 089e 8801ba3bfa58 81720fca 5dd9 [17838.564109] 8801ba3bfa98 8106534c 8801ba3bfa78 [17838.564111] 8801ebe98ea0 0001 8801a7919900 1600 [17838.564113] Call Trace: [17838.564119] [81720fca] dump_stack+0x46/0x58 [17838.564122] [8106534c] warn_slowpath_common+0x8c/0xc0 [17838.564124] [8106539a] warn_slowpath_null+0x1a/0x20 [17838.564135] [a030c7c9] record_one_backref+0x3a9/0x420 [btrfs] [17838.564146] [a030c420] ? btrfs_submit_direct+0x190/0x190 [btrfs] [17838.564158] [a035f3f2] iterate_leaf_refs+0x52/0xc0 [btrfs] [17838.564169] [a030c420] ? btrfs_submit_direct+0x190/0x190 [btrfs] [17838.564181] [a0361e58] iterate_extent_inodes+0x198/0x270 [btrfs] [17838.564192] [a0361fc2] iterate_inodes_from_logical+0x92/0xb0 [btrfs] [17838.564203] [a030c420] ? btrfs_submit_direct+0x190/0x190 [btrfs] [17838.564214] [a030888c] record_extent_backrefs+0x7c/0xf0 [btrfs] [17838.564225] [a03131e4] relink_file_extents+0x44/0x180 [btrfs] [17838.564236] [a0313455] btrfs_finish_ordered_io+0x135/0x4d0 [btrfs] [17838.564247] [a0313805] finish_ordered_fn+0x15/0x20 [btrfs] [17838.564258] [a03341d0] worker_loop+0xa0/0x320 [btrfs] [17838.564269] [a0334130] ? check_pending_worker_creates.isra.1+0xe0/0xe0 [btrfs] [17838.564272] [81088fe0] kthread+0xc0/0xd0 [17838.564274] [81088f20] ? flush_kthread_worker+0xb0/0xb0 [17838.564277] [81735a2c] ret_from_fork+0x7c/0xb0 [17838.564279] [81088f20] ? flush_kthread_worker+0xb0/0xb0 [17838.564281] ---[ end trace b632fc27406d3441 ]--- Is there some problem? Regards, Marco L. Crociani -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Btrfs: fix crash in scrub repair code when device is missing
On Thu, May 3, 2012 at 11:31 AM, Stefan Behrens sbehr...@giantdisaster.de wrote: Fix that when scrub tries to repair an I/O or checksum error and one of the devices containing the mirror is missing, it crashes in bio_add_page because the bdev is a NULL pointer for missing devices. Reported-by: Marco L. Crociani marco.croci...@gmail.com Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/scrub.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index b679bf6..7e487be 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -998,6 +998,7 @@ static int scrub_setup_recheck_block(struct scrub_dev *sdev, page = sblock-pagev + page_index; page-logical = logical; page-physical = bbio-stripes[mirror_index].physical; + /* for missing devices, bdev is NULL */ page-bdev = bbio-stripes[mirror_index].dev-bdev; page-mirror_num = mirror_index + 1; page-page = alloc_page(GFP_NOFS); @@ -1042,6 +1043,12 @@ static int scrub_recheck_block(struct btrfs_fs_info *fs_info, struct scrub_page *page = sblock-pagev + page_num; DECLARE_COMPLETION_ONSTACK(complete); + if (page-bdev == NULL) { + page-io_error = 1; + sblock-no_io_error_seen = 0; + continue; + } + BUG_ON(!page-page); bio = bio_alloc(GFP_NOFS, 1); if (!bio) -- 1.7.10.1.362.g242cab3 May 3 18:53:08 evo kernel: [ 5270.759254] btrfs: checksum error at logical 756637261824 on dev /dev/sda3, sector 881151024, root 259, inode 1821286, offset 325373952, length 4096, links 1 (path: [...]) May 3 18:53:08 evo kernel: [ 5270.759286] btrfs: unable to fixup (regular) error at logical 756637261824 on dev /dev/sda3 scrub device /dev/sda3 (id 1) status scrub started at Thu May 3 17:30:35 2012, running for 6594 seconds total bytes scrubbed: 568.65GB with 1 errors error details: csum=1 corrected errors: 0, uncorrectable errors: 1, unverified errors: 0 scrub device (id 2) history scrub started at Thu May 3 17:30:35 2012 and finished after 0 seconds total bytes scrubbed: 0.00 with 0 errors scrub device /dev/sdb3 (id 3) status scrub started at Thu May 3 17:30:35 2012, running for 6594 seconds total bytes scrubbed: 536.66GB with 0 errors May 3 20:07:51 evo kernel: [ 9752.940360] btrfs: checksum error at logical 1284041527296 on dev /dev/sda3, sector 1907567464, root 259, inode 1327815, offset 1691832320, length 4096, links 1 (path: [...]) May 3 20:07:51 evo kernel: [ 9752.940392] btrfs: unable to fixup (regular) error at logical 1284041527296 on dev /dev/sda3 May 3 20:25:45 evo kernel: [10826.760001] btrfs: checksum error at logical 1378644791296 on dev /dev/sda3, sector 2092339464, root 259, inode 1759403, offset 767893504, length 4096, links 1 (path: [...]) May 3 20:25:45 evo kernel: [10826.760025] btrfs: unable to fixup (regular) error at logical 1378644791296 on dev /dev/sda3 May 3 20:27:04 evo kernel: [10905.612849] btrfs: checksum error at logical 1386199773184 on dev /dev/sda3, sector 2107095288, root 259, inode 1580366, offset 1526546432, length 4096, links 1 (path: [...]) May 3 20:27:04 evo kernel: [10905.612881] btrfs: unable to fixup (regular) error at logical 1386199773184 on dev /dev/sda3 May 3 20:29:46 evo kernel: [11067.396252] btrfs: checksum error at logical 1401913339904 on dev /dev/sda3, sector 2137785848, root 259, inode 1851460, offset 515543040, length 4096, links 1 (path: [...]) May 3 20:29:46 evo kernel: [11067.408660] btrfs: unable to fixup (regular) error at logical 1401913339904 on dev /dev/sda3 That patch worked for me. Thanks! -- Marco Lorenzo Crociani, marco.croci...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Errors in rebalancing RAID1 array after disk failure.
On Wed, May 2, 2012 at 4:54 PM, David Sterba d...@jikos.cz wrote: On Thu, Apr 19, 2012 at 05:42:05PM +0200, Marco L. Crociani wrote: Apr 19 17:38:41 evo kernel: [ 347.661915] Call Trace: Apr 19 17:38:41 evo kernel: [ 347.661964] [a00b76ac] btrfs_ioctl_dev_info+0x15c/0x1a0 [btrfs] Apr 19 17:38:41 evo kernel: [ 347.662013] [a00ba9b1] btrfs_ioctl+0x571/0x6c0 [btrfs] Apr 19 17:38:41 evo kernel: [ 347.662024] [81193839] do_vfs_ioctl+0x99/0x330 Apr 19 17:38:41 evo kernel: [ 347.662032] [8118d345] ? putname+0x35/0x50 Apr 19 17:38:41 evo kernel: [ 347.662040] [81193b71] sys_ioctl+0xa1/0xb0 Apr 19 17:38:41 evo kernel: [ 347.662049] [816691a9] system_call_fastpath+0x16/0x1b Fixed by http://comments.gmane.org/gmane.comp.file-systems.btrfs/16302 reported earlier http://article.gmane.org/gmane.comp.file-systems.btrfs/16796 and it's part of 3.4-rc5. I was on 3.4-rc5! -- Marco Lorenzo Crociani, marco.croci...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Errors in rebalancing RAID1 array after disk failure.
Is there anything I missed for steps to reproduce it? All the story is in previous mails. http://thread.gmane.org/gmane.comp.file-systems.btrfs/16829 http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg15949.html First mail is missing from mail-archive... Summary: Some damaged sectors on one device. Seems to be ok after rewriteing so I started a scrub. During scrub (kernel 3.2.x) device completely broke down with A LOT of dameged sectors --- other device fills up -- out of space --- unclean shotdown. With 3.3 kernels I was able to mount it and add a new device. I tried 3.4-rc4 but the patch wasn't there. I had problem compiling from git, before I tried DKMS, then the whole kernel, (set CONCURRENCY = 5 with quadcore is wrong? ) so I waited rc5. With the tar from kernel.org I have successfully compiled 3.4-rc5 (with CONCURRENCY = 4). Errors with scrub. Here we are. On Wed, May 2, 2012 at 5:27 PM, David Sterba d...@jikos.cz wrote: On Wed, May 02, 2012 at 04:59:03PM +0200, Marco L. Crociani wrote: On Thu, Apr 19, 2012 at 05:42:05PM +0200, Marco L. Crociani wrote: Apr 19 17:38:41 evo kernel: [ 347.661964] [a00b76ac] btrfs_ioctl_dev_info+0x15c/0x1a0 [btrfs] [...] I was on 3.4-rc5! You really saw this crash with 3.4-rc5 ? Yes. I tell you now what I did before your response today. From this point: btrfs fi sh Label: 'RootFS' uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 Total devices 3 FS bytes used 1015.83GB devid3 size 1.75TB used 357.00GB path /dev/sdb3 devid1 size 1.75TB used 1.34TB path /dev/sda3 *** Some devices missing I reached: btrfs fi show Label: 'RootFS' uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 Total devices 3 FS bytes used 1004.23GB devid3 size 1.75TB used 1.25TB path /dev/sdb3 devid1 size 1.75TB used 1.33TB path /dev/sda3 *** Some devices missing using btrfs balance start -dvrange=1..[group where it fails minus 1] a number of times (I started writing some notes on http://btrfs.ipv5.de/index.php?title=User:Tyrael ). These should be all the errors (sorry for the confusion): --- Apr 30 19:53:13 evo kernel: [ 3163.927548] btrfs csum failed ino 510 off 910946304 csum 432355644 private 175165154 May 1 23:15:12 evo kernel: [101661.681997] btrfs: relocating block group 1742452293632 flags 17 May 1 23:15:39 evo kernel: [101688.412777] btrfs: found 328 extents May 1 23:15:47 evo kernel: [101696.543742] btrfs: found 328 extents May 1 23:15:48 evo kernel: [101697.575754] btrfs: relocating block group 1741378551808 flags 17 May 1 23:16:16 evo kernel: [101724.754908] btrfs: found 137 extents May 1 23:16:24 evo kernel: [101732.915791] btrfs: found 137 extents May 1 23:16:24 evo kernel: [101733.275939] btrfs: relocating block group 1401002393600 flags 17 May 1 23:16:45 evo kernel: [101753.889479] btrfs csum failed ino 2876 off 910946304 csum 432355644 private 175165154 Apr 30 20:55:09 evo kernel: [ 6879.601004] btrfs: relocating block group 1738157326336 flags 17 Apr 30 20:55:10 evo kernel: [ 6879.995377] btrfs: relocating block group 1401002393600 flags 17 Apr 30 20:55:29 evo kernel: [ 6898.819546] btrfs csum failed ino 636 off 910946304 csum 432355644 private 175165154 Apr 30 20:55:29 evo kernel: [ 6898.849422] btrfs csum failed ino 636 off 910946304 csum 432355644 private 175165154 Apr 30 20:55:29 evo kernel: [ 6898.849689] btrfs csum failed ino 636 off 910946304 csum 432355644 private 175165154 Apr 30 20:55:29 evo kernel: [ 6898.878413] btrfs csum failed ino 636 off 910946304 csum 432355644 private 175165154 Apr 30 20:55:29 evo kernel: [ 6898.878668] btrfs csum failed ino 636 off 910946304 csum 432355644 private 175165154 May 1 15:26:26 evo kernel: [73542.827058] btrfs: relocating block group 1394559942656 flags 17 May 1 15:26:38 evo kernel: [73555.038433] btrfs csum failed ino 1581 off 648593408 csum 283516648 private 3975454589 Apr 30 20:58:26 evo kernel: [ 7076.525087] btrfs: relocating block group 1394559942656 flags 17 Apr 30 20:58:38 evo kernel: [ 7088.082493] btrfs csum failed ino 642 off 648593408 csum 283516648 private 3975454589 Apr 30 20:58:38 evo kernel: [ 7088.108851] btrfs csum failed ino 642 off 648593408 csum 283516648 private 3975454589 May 1 15:28:41 evo kernel: [73677.797363] btrfs: relocating block group 1385970008064 flags 17 May 1 15:28:45 evo kernel: [73681.242643] btrfs csum failed ino 1582 off 229765120 csum 3096851068 private 993448323 Apr 30 21:30:46 evo kernel: [ 9016.216885] btrfs: found 223 extents Apr 30 21:30:46 evo kernel: [ 9016.533470] btrfs: relocating block group 1385970008064 flags 17 Apr 30 21:30:49 evo kernel: [ 9019.630665] btrfs csum failed ino 650 off 229765120 csum 3096851068 private 993448323 Apr 30 21:56:29 evo kernel: [10558.769597] btrfs: relocating block group 1378453815296 flags 17 Apr 30 21:56:31 evo kernel: [10561.185029] btrfs csum failed ino 657 off 190976000 csum 3234929648
Re: Errors in rebalancing RAID1 array after disk failure.
Hi all, today another episode... I have compiled and tried kernel 3.4-rc5 ./btrfs fi sh Label: 'RootFS' uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 Total devices 3 FS bytes used 1006.67GB devid3 size 1.75TB used 357.00GB path /dev/sdb3 devid1 size 1.75TB used 1.34TB path /dev/sda3 *** Some devices missing Btrfs Btrfs v0.19 ./btrfs device delete missing /mnt/sda3 ERROR: error removing the device 'missing' - Input/output error Apr 30 13:17:51 evo kernel: [ 103.074835] device label RootFS devid 1 transid 47082 /dev/sda3 Apr 30 13:17:52 evo kernel: [ 103.281796] device label RootFS devid 3 transid 47082 /dev/sdb3 Apr 30 13:17:57 evo kernel: [ 108.865001] device label RootFS devid 1 transid 47082 /dev/sda3 Apr 30 13:17:57 evo kernel: [ 108.866205] btrfs: allowing degraded mounts Apr 30 13:17:57 evo kernel: [ 108.866214] btrfs: disk space caching is enabled Apr 30 13:18:32 evo kernel: [ 143.274899] btrfs: relocating block group 1401002393600 flags 17 Apr 30 13:19:25 evo kernel: [ 196.888248] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 30 13:19:25 evo kernel: [ 196.889900] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 30 13:19:25 evo kernel: [ 196.890429] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 30 13:19:25 evo kernel: [ 197.087419] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 30 13:19:25 evo kernel: [ 197.087681] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 ./btrfs inspect-internal inode-resolve -v 257 /mnt/sda3/ ioctl ret=-1, error: No such file or directory ./btrfs scrub status /mnt/sda3/ scrub status for c87975a0-a575-405e-9890-d3f7f25bbd96 scrub started at Mon Apr 30 13:26:26 2012 and was aborted after 4367 seconds total bytes scrubbed: 406.64GB with 2 errors error details: csum=2 corrected errors: 0, uncorrectable errors: 0, unverified errors: 0 Apr 30 14:37:24 evo kernel: [ 4875.275776] btrfs: checksum error at logical 752871157760 on dev /dev/sda3, sector 873795352, root 259, inode 1580389, offset 612610048, length 4096, links 1 (path: .ecryptfs/[ ] Apr 30 14:37:24 evo kernel: [ 4875.275838] BUG: unable to handle kernel NULL pointer dereference at 0090 Apr 30 14:37:24 evo kernel: [ 4875.275848] IP: [811ae841] bio_add_page+0x11/0x60 Apr 30 14:37:24 evo kernel: [ 4875.275862] PGD 0 Apr 30 14:37:24 evo kernel: [ 4875.275868] Oops: [#1] SMP Apr 30 14:37:24 evo kernel: [ 4875.275875] CPU 2 Apr 30 14:37:24 evo kernel: [ 4875.275878] Modules linked in: ip6table_filter ip6_tables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle xt_tcpudp iptable_filter ip_tables x_tables bridge stp kvm_amd kvm rfcomm bnep dm_crypt parport_pc bluetooth ppdev snd_hda_codec_realtek snd_hda_codec_hdmi uvcvideo videobuf2_core snd_hda_intel snd_hda_codec videodev videobuf2_vmalloc snd_usb_audio videobuf2_memops snd_hwdep snd_pcm snd_usbmidi_lib snd_seq_midi snd_rawmidi eeepc_wmi asus_wmi snd_seq_midi_event snd_seq snd_timer snd_seq_device mac_hid sparse_keymap snd binfmt_misc soundcore snd_page_alloc dm_multipath k10temp i2c_piix4 microcode lp parport raid10 raid456 async_pq async_xor xor async_memcpy async_raid6_recov raid6_pq async_tx raid0 multipath linear btrfs zlib_deflate libcrc32c raid1 usbhid hid wmi r8169 Apr 30 14:37:24 evo kernel: [ 4875.276004] Apr 30 14:37:24 evo kernel: [ 4875.276010] Pid: 3401, comm: btrfs-scrub-1 Not tainted 3.4.0-rc5-mio01 #1 System manufacturer System Product Name/F1A75-V EVO Apr 30 14:37:24 evo kernel: [ 4875.276022] RIP: 0010:[811ae841] [811ae841] bio_add_page+0x11/0x60 Apr 30 14:37:24 evo kernel: [ 4875.276033] RSP: 0018:88017135bba0 EFLAGS: 00010246 Apr 30 14:37:24 evo kernel: [ 4875.276038] RAX: RBX: 8801710ac000 RCX: Apr 30 14:37:24 evo kernel: [ 4875.276044] RDX: 1000 RSI: ea0004c2b8c0 RDI: 88017775b900 Apr 30 14:37:24 evo kernel: [ 4875.276050] RBP: 88017135bba0 R08: 8801bed16590 R09: 0001 Apr 30 14:37:24 evo kernel: [ 4875.276056] R10: 710d1001 R11: 0007 R12: 88017775b900 Apr 30 14:37:24 evo kernel: [ 4875.276061] R13: 8801710ac000 R14: R15: 88017135bbf8 Apr 30 14:37:24 evo kernel: [ 4875.276068] FS: 7f33e7e239c0() GS:8801bed0() knlGS:f66a2b70 Apr 30 14:37:24 evo kernel: [ 4875.276074] CS: 0010 DS: ES: CR0: 8005003b Apr 30 14:37:24 evo kernel: [ 4875.276080] CR2: 0090 CR3: 00017b6e4000 CR4: 07e0 Apr 30 14:37:24 evo kernel: [ 4875.276086] DR0: DR1: DR2: Apr 30 14:37:24 evo kernel: [ 4875.276092] DR3: DR6: 0ff0 DR7: 0400
Re: Errors in rebalancing RAID1 array after disk failure.
Today I tried scrub... Apr 19 17:36:01 evo kernel: [ 187.932297] device label RootFS devid 1 transid 47046 /dev/sda3 Apr 19 17:36:02 evo kernel: [ 188.145858] device label RootFS devid 3 transid 47046 /dev/sdb3 Apr 19 17:36:19 evo kernel: [ 205.483044] device label RootFS devid 1 transid 47046 /dev/sda3 Apr 19 17:36:19 evo kernel: [ 205.483730] btrfs: allowing degraded mounts Apr 19 17:36:19 evo kernel: [ 205.483737] btrfs: disk space caching is enabled Apr 19 17:38:41 evo kernel: [ 347.661603] BUG: unable to handle kernel NULL pointer dereference at (null) Apr 19 17:38:41 evo kernel: [ 347.661617] IP: [8131ff94] strncpy+0x14/0x30 Apr 19 17:38:41 evo kernel: [ 347.661633] PGD 17b672067 PUD 17b5ed067 PMD 0 Apr 19 17:38:41 evo kernel: [ 347.661643] Oops: [#1] SMP Apr 19 17:38:41 evo kernel: [ 347.661650] CPU 3 Apr 19 17:38:41 evo kernel: [ 347.661654] Modules linked in: ip6table_filter ip6_tables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle xt_tcpudp iptable_filter ip_tables x_tables bridge stp kvm_amd kvm rfcomm bnep bluetooth parport_pc ppdev dm_crypt snd_hda_codec_realtek snd_hda_codec_hdmi snd_usb_audio snd_usbmidi_lib snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event uvcvideo snd_seq snd_timer snd_seq_device snd videobuf2_core videodev v4l2_compat_ioctl32 videobuf2_vmalloc soundcore videobuf2_memops dm_multipath eeepc_wmi mac_hid asus_wmi binfmt_misc snd_page_alloc fglrx(PO) i2c_piix4 k10temp sparse_keymap lp parport raid10 raid456 async_pq async_xor xor async_memcpy async_raid6_recov raid6_pq async_tx raid0 multipath linear btrfs zlib_deflate libcrc32c raid1 usbhid hid wmi r8169 Apr 19 17:38:41 evo kernel: [ 347.661780] Apr 19 17:38:41 evo kernel: [ 347.661787] Pid: 3218, comm: btrfs Tainted: P O 3.3.2-030302-generic #201204131335 System manufacturer System Product Name/F1A75-V EVO Apr 19 17:38:41 evo kernel: [ 347.661799] RIP: 0010:[8131ff94] [8131ff94] strncpy+0x14/0x30 Apr 19 17:38:41 evo kernel: [ 347.661810] RSP: 0018:880182559e08 EFLAGS: 00010206 Apr 19 17:38:41 evo kernel: [ 347.661816] RAX: 8801b14eac00 RBX: 8801b14ea000 RCX: Apr 19 17:38:41 evo kernel: [ 347.661822] RDX: 0400 RSI: RDI: 8801b14eac00 Apr 19 17:38:41 evo kernel: [ 347.661827] RBP: 880182559e08 R08: 8801b048b8b8 R09: 0002 Apr 19 17:38:41 evo kernel: [ 347.661833] R10: 0010 R11: 0206 R12: 8801b1741800 Apr 19 17:38:41 evo kernel: [ 347.661839] R13: 00d55040 R14: 8801b14ea008 R15: 8801b048b898 Apr 19 17:38:41 evo kernel: [ 347.661846] FS: 7f73c9f34760() GS:8801bed8() knlGS: Apr 19 17:38:41 evo kernel: [ 347.661852] CS: 0010 DS: ES: CR0: 80050033 Apr 19 17:38:41 evo kernel: [ 347.661857] CR2: CR3: 0001827db000 CR4: 06e0 Apr 19 17:38:41 evo kernel: [ 347.661863] DR0: DR1: DR2: Apr 19 17:38:41 evo kernel: [ 347.661869] DR3: DR6: 0ff0 DR7: 0400 Apr 19 17:38:41 evo kernel: [ 347.661875] Process btrfs (pid: 3218, threadinfo 880182558000, task 88017b5e44d0) Apr 19 17:38:41 evo kernel: [ 347.661880] Stack: Apr 19 17:38:41 evo kernel: [ 347.661884] 880182559e78 a00b76ac 8801b1504e00 Apr 19 17:38:41 evo kernel: [ 347.661895] 880182559f48 5bfc4f67 Apr 19 17:38:41 evo kernel: [ 347.661905] 00012c2c 8801824a2600 00d55040 88018c7df800 Apr 19 17:38:41 evo kernel: [ 347.661915] Call Trace: Apr 19 17:38:41 evo kernel: [ 347.661964] [a00b76ac] btrfs_ioctl_dev_info+0x15c/0x1a0 [btrfs] Apr 19 17:38:41 evo kernel: [ 347.662013] [a00ba9b1] btrfs_ioctl+0x571/0x6c0 [btrfs] Apr 19 17:38:41 evo kernel: [ 347.662024] [81193839] do_vfs_ioctl+0x99/0x330 Apr 19 17:38:41 evo kernel: [ 347.662032] [8118d345] ? putname+0x35/0x50 Apr 19 17:38:41 evo kernel: [ 347.662040] [81193b71] sys_ioctl+0xa1/0xb0 Apr 19 17:38:41 evo kernel: [ 347.662049] [816691a9] system_call_fastpath+0x16/0x1b Apr 19 17:38:41 evo kernel: [ 347.662054] Code: 48 83 c2 01 84 c9 75 ef c9 c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 85 d2 48 89 f8 48 89 e5 75 08 eb 18 66 90 48 83 c7 01 0f b6 0e 80 f9 01 88 0f 48 83 de ff 48 83 ea 01 75 ea c9 c3 0f Apr 19 17:38:41 evo kernel: [ 347.662128] RIP [8131ff94] strncpy+0x14/0x30 Apr 19 17:38:41 evo kernel: [ 347.662137] RSP 880182559e08 Apr 19 17:38:41 evo kernel: [ 347.662141] CR2: Apr 19 17:38:41 evo kernel: [ 347.662147] ---[ end trace 9a8c295d04917ed2 ]--- -- Marco Lorenzo Crociani, marco.croci...@gmail.com -- To unsubscribe from this
Re: Errors in rebalancing RAID1 array after disk failure.
On Mon, Apr 16, 2012 at 3:46 PM, David Sterba d...@jikos.cz wrote: On Sat, Apr 14, 2012 at 06:39:12PM +0200, Marco L. Crociani wrote: Apr 14 18:07:52 evo kernel: [ 431.054709] btrfs: relocating block group 1401002393600 flags 17 Apr 14 18:08:14 evo kernel: [ 453.506541] btrfs csum failed ino 362 off 910946304 csum 432355644 private 175165154 The failed checksums prevent balance to relocate the blockgroup, which is a needed step during 'dev delete'. Unless the csum is fixable by using another copy, I think the only option left is to delete the file (not counting the unsafe way of resetting the block's cheksum). I deleted the files. ( find /mnt/sda3 -inum 362 -ls is correct to find them? ) Now it gives me errors on inode 257 I deleted a file but it still gives me errors on inode 257 but find /mnt/sda3 -inum 257 -ls gives me nothing now. Apr 17 00:41:49 evo kernel: [ 156.530441] device label RootFS devid 1 transid 47037 /dev/sda3 Apr 17 00:41:49 evo kernel: [ 156.734993] device label RootFS devid 3 transid 47037 /dev/sdb3 Apr 17 00:42:12 evo kernel: [ 179.496155] device label RootFS devid 1 transid 47037 /dev/sda3 Apr 17 00:42:12 evo kernel: [ 179.496881] btrfs: allowing degraded mounts Apr 17 00:42:12 evo kernel: [ 179.496888] btrfs: disk space caching is enabled Apr 17 00:42:24 evo kernel: [ 191.290093] btrfs: relocating block group 1401002393600 flags 17 Apr 17 00:42:53 evo kernel: [ 220.417535] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.480570] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.480868] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.505168] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.528368] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 -- Marco Lorenzo Crociani, -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Errors in rebalancing RAID1 array after disk failure.
On Tue, Apr 17, 2012 at 12:56 AM, Marco L. Crociani marco.croci...@gmail.com wrote: On Mon, Apr 16, 2012 at 3:46 PM, David Sterba d...@jikos.cz wrote: On Sat, Apr 14, 2012 at 06:39:12PM +0200, Marco L. Crociani wrote: Apr 14 18:07:52 evo kernel: [ 431.054709] btrfs: relocating block group 1401002393600 flags 17 Apr 14 18:08:14 evo kernel: [ 453.506541] btrfs csum failed ino 362 off 910946304 csum 432355644 private 175165154 The failed checksums prevent balance to relocate the blockgroup, which is a needed step during 'dev delete'. Unless the csum is fixable by using another copy, I think the only option left is to delete the file (not counting the unsafe way of resetting the block's cheksum). I deleted the files. ( find /mnt/sda3 -inum 362 -ls is correct to find them? ) Now it gives me errors on inode 257 I deleted a file but it still gives me errors on inode 257 but find /mnt/sda3 -inum 257 -ls gives me nothing now. Apr 17 00:41:49 evo kernel: [ 156.530441] device label RootFS devid 1 transid 47037 /dev/sda3 Apr 17 00:41:49 evo kernel: [ 156.734993] device label RootFS devid 3 transid 47037 /dev/sdb3 Apr 17 00:42:12 evo kernel: [ 179.496155] device label RootFS devid 1 transid 47037 /dev/sda3 Apr 17 00:42:12 evo kernel: [ 179.496881] btrfs: allowing degraded mounts Apr 17 00:42:12 evo kernel: [ 179.496888] btrfs: disk space caching is enabled Apr 17 00:42:24 evo kernel: [ 191.290093] btrfs: relocating block group 1401002393600 flags 17 Apr 17 00:42:53 evo kernel: [ 220.417535] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.480570] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.480868] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.505168] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 Apr 17 00:42:53 evo kernel: [ 220.528368] btrfs csum failed ino 257 off 910946304 csum 432355644 private 175165154 -- Marco Lorenzo Crociani, Running another time btrfs dev delete missing return a different error (something like invalid argument), and no log activity. Then umount completely freeze the system. Keyboard's leds start blinking. Also alt gr + print screen + REISUB doesn't work. -- Marco Lorenzo Crociani, marco.croci...@gmail.com Telefono: +39 02320622509 Fax: +39 02700540121 -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Can't resize second device in RAID1
On Sat, Jan 14, 2012 at 3:42 PM, Sander san...@humilis.net wrote: Marco L. Crociani wrote (ao): On Sat, Jan 14, 2012 at 12:17 AM, Hugo Mills h...@carfax.org.uk wrote: On Sat, Jan 14, 2012 at 12:12:06AM +0100, Marco L. Crociani wrote: # ./btrfs fi sh Label: 'RootFS'?? uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 ?? Total devices 2 FS bytes used 284.98GB ?? devid?? 2 size 311.82GB used 286.51GB path /dev/sdb3 ?? devid?? 1 size 897.76GB used 286.51GB path /dev/sda3 /dev/sdb3 is the same. How can I resize /dev/sdb3? ?? I think the syntax you need is btrfs fi resize max /mnt/RootFS:2 ./btrfs fi resize max /mnt/RootFS:2 ERROR: can't access to '/mnt/RootFS:2' btrfs filesystem resize 2:max /mnt/RootFS Sander -- Humilis IT Services and Solutions http://www.humilis.net Perfect, Thank you! I've written a section on: http://btrfs.ipv5.de/index.php?title=UseCases -- Marco Lorenzo Crociani, marco.croci...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Can't resize second device in RAID1
Hi, the situation: Label: 'RootFS' uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 Total devices 2 FS bytes used 284.98GB devid 2 size 311.82GB used 286.51GB path /dev/sdb3 devid 1 size 897.76GB used 286.51GB path /dev/sda3 RootFS created when sda3 was 897.76GB and sdb3 311.82GB. I have now freed other space on sdb. So I deleted sdb3 and recreated it occupying all available space. Disk /dev/sdb: 2000 GB, 2000396321280 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes /dev/sdb3 54 117249 941368837 83 Linux same as /dev/sda3 54 117249 941368837 83 Linux # ./btrfs filesystem resize max /mnt/RootFS Resize '/mnt/RootFS' of 'max' on dmesg I get only: [ 657.438464] btrfs: new size for /dev/sda3 is 963962208256 # ./btrfs fi sh Label: 'RootFS' uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 Total devices 2 FS bytes used 284.98GB devid 2 size 311.82GB used 286.51GB path /dev/sdb3 devid 1 size 897.76GB used 286.51GB path /dev/sda3 /dev/sdb3 is the same. How can I resize /dev/sdb3? Regards, -- Marco Lorenzo Crociani, marco.croci...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Can't resize second device in RAID1
On Sat, Jan 14, 2012 at 12:17 AM, Hugo Mills h...@carfax.org.uk wrote: On Sat, Jan 14, 2012 at 12:12:06AM +0100, Marco L. Crociani wrote: Hi, the situation: Label: 'RootFS' uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 Total devices 2 FS bytes used 284.98GB devid 2 size 311.82GB used 286.51GB path /dev/sdb3 devid 1 size 897.76GB used 286.51GB path /dev/sda3 RootFS created when sda3 was 897.76GB and sdb3 311.82GB. I have now freed other space on sdb. So I deleted sdb3 and recreated it occupying all available space. Disk /dev/sdb: 2000 GB, 2000396321280 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes /dev/sdb3 54 117249 941368837 83 Linux same as /dev/sda3 54 117249 941368837 83 Linux # ./btrfs filesystem resize max /mnt/RootFS Resize '/mnt/RootFS' of 'max' on dmesg I get only: [ 657.438464] btrfs: new size for /dev/sda3 is 963962208256 # ./btrfs fi sh Label: 'RootFS' uuid: c87975a0-a575-405e-9890-d3f7f25bbd96 Total devices 2 FS bytes used 284.98GB devid 2 size 311.82GB used 286.51GB path /dev/sdb3 devid 1 size 897.76GB used 286.51GB path /dev/sda3 /dev/sdb3 is the same. How can I resize /dev/sdb3? I think the syntax you need is btrfs fi resize max /mnt/RootFS:2 It's wrong :( ./btrfs fi resize max /mnt/RootFS:2 ERROR: can't access to '/mnt/RootFS:2' But I could be wrong. If it works, can you add it to the UseCases page on the wiki, please? Sure. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Someone's been throwing dead sheep down my Fun Well --- -- Marco Lorenzo Crociani, marco.croci...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
How to handle badblocks with btrfs?
Hi, I have some errors in dmesg: [ 542.255788] ata1.00: exception Emask 0x0 SAct 0xff SErr 0x0 action 0x0 [ 542.255797] ata1.00: irq_stat 0x4008 [ 542.255805] ata1.00: failed command: READ FPDMA QUEUED [ 542.255821] ata1.00: cmd 60/00:00:1a:b7:7a/04:00:1d:00:00/40 tag 0 ncq 524288 in [ 542.255824] res 41/40:00:a0:b7:7a/00:00:1d:00:00/40 Emask 0x409 (media error) F [ 542.255831] ata1.00: status: { DRDY ERR } [ 542.255837] ata1.00: error: { UNC } [ 542.264434] ata1.00: configured for UDMA/133 [ 542.264505] ata1: EH complete [ 545.075811] ata1.00: exception Emask 0x0 SAct 0xd7c6ff SErr 0x0 action 0x0 [ 545.075820] ata1.00: irq_stat 0x4008 [ 545.075829] ata1.00: failed command: READ FPDMA QUEUED [ 545.075845] ata1.00: cmd 60/00:b8:1a:b7:7a/04:00:1d:00:00/40 tag 23 ncq 524288 in [ 545.075848] res 41/40:00:a0:b7:7a/00:00:1d:00:00/40 Emask 0x409 (media error) F [ 545.075855] ata1.00: status: { DRDY ERR } [ 545.075860] ata1.00: error: { UNC } [ 545.084251] ata1.00: configured for UDMA/133 [ 545.084301] ata1: EH complete [ 547.859837] ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0 [ 547.859846] ata1.00: irq_stat 0x4008 [ 547.859854] ata1.00: failed command: READ FPDMA QUEUED [ 547.859869] ata1.00: cmd 60/00:00:1a:b7:7a/04:00:1d:00:00/40 tag 0 ncq 524288 in [ 547.859872] res 41/40:00:a0:b7:7a/00:00:1d:00:00/40 Emask 0x409 (media error) F [ 547.859880] ata1.00: status: { DRDY ERR } [ 547.859885] ata1.00: error: { UNC } [ 547.868063] ata1.00: configured for UDMA/133 [ 547.868116] ata1: EH complete [ 550.727871] ata1.00: exception Emask 0x0 SAct 0x3fc0f SErr 0x0 action 0x0 [ 550.727880] ata1.00: irq_stat 0x4008 [ 550.727890] ata1.00: failed command: READ FPDMA QUEUED [ 550.727905] ata1.00: cmd 60/00:88:1a:b7:7a/04:00:1d:00:00/40 tag 17 ncq 524288 in [ 550.727908] res 41/40:00:a0:b7:7a/00:00:1d:00:00/40 Emask 0x409 (media error) F [ 550.727916] ata1.00: status: { DRDY ERR } [ 550.727921] ata1.00: error: { UNC } [ 550.735913] ata1.00: configured for UDMA/133 [ 550.735964] ata1: EH complete [ 553.499907] ata1.00: exception Emask 0x0 SAct 0xfff SErr 0x0 action 0x0 [ 553.499916] ata1.00: irq_stat 0x4008 [ 553.499924] ata1.00: failed command: READ FPDMA QUEUED [ 553.499939] ata1.00: cmd 60/00:00:1a:b7:7a/04:00:1d:00:00/40 tag 0 ncq 524288 in [ 553.499942] res 41/40:00:a0:b7:7a/00:00:1d:00:00/40 Emask 0x409 (media error) F [ 553.499950] ata1.00: status: { DRDY ERR } [ 553.499955] ata1.00: error: { UNC } [ 553.508800] ata1.00: configured for UDMA/133 [ 553.508847] ata1: EH complete [ 556.283938] ata1.00: exception Emask 0x0 SAct 0xfff SErr 0x0 action 0x0 [ 556.283947] ata1.00: irq_stat 0x4008 [ 556.283956] ata1.00: failed command: READ FPDMA QUEUED [ 556.283971] ata1.00: cmd 60/00:58:1a:b7:7a/04:00:1d:00:00/40 tag 11 ncq 524288 in [ 556.283975] res 41/40:00:a0:b7:7a/00:00:1d:00:00/40 Emask 0x409 (media error) F [ 556.283982] ata1.00: status: { DRDY ERR } [ 556.283987] ata1.00: error: { UNC } [ 556.292610] ata1.00: configured for UDMA/133 [ 556.292671] sd 0:0:0:0: [sda] Unhandled sense code [ 556.292678] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 556.292686] sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor] [ 556.292697] Descriptor sense data with sense descriptors (in hex): [ 556.292703] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 [ 556.292725] 1d 7a b7 a0 [ 556.292735] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed [ 556.292746] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 1d 7a b7 1a 00 04 00 00 [ 556.292767] end_request: I/O error, dev sda, sector 494581664 [ 556.292808] ata1: EH complete [ 556.313976] btrfs_readpage_end_io_hook: 6 callbacks suppressed [ 556.313987] btrfs csum failed ino 13966 off 236142592 csum 2566472073 private 305113664 [ 556.314076] btrfs csum failed ino 13966 off 236146688 csum 2566472073 private 2675414968 [ 556.314135] btrfs csum failed ino 13966 off 236150784 csum 2566472073 private 3814599931 [ 556.314190] btrfs csum failed ino 13966 off 236154880 csum 2566472073 private 1494803575 [ 556.314247] btrfs csum failed ino 13966 off 236158976 csum 2566472073 private 3963245343 [ 556.314304] btrfs csum failed ino 13966 off 236163072 csum 2566472073 private 423696632 [ 556.314360] btrfs csum failed ino 13966 off 236167168 csum 2566472073 private 2701184196 [ 556.314416] btrfs csum failed ino 13966 off 236171264 csum 2566472073 private 2585003232 [ 556.314471] btrfs csum failed ino 13966 off 236175360 csum 2566472073 private 3223805718 [ 556.314528] btrfs csum failed ino 13966 off 236179456 csum 2566472073 private 2971487607 [ 559.523993] ata1.00: exception Emask 0x0 SAct 0x20 SErr 0x0 action 0x0 [ 559.524002] ata1.00: irq_stat 0x4008 [ 559.524011] ata1.00: failed command: READ FPDMA QUEUED [ 559.524026] ata1.00: cmd