* Kernel oops adding bitmap @ 2012-03-19 16:44 Larkin Lowrey 2012-03-19 21:32 ` NeilBrown 0 siblings, 1 reply; 7+ messages in thread From: Larkin Lowrey @ 2012-03-19 16:44 UTC (permalink / raw) To: linux-raid The following command oopsed. mdadm -G --bitmap=internal /dev/md0 The array is a two disk raid1 and hosts the root filesystem. Is it not possible/allowed to add a bitmap to an active/mounted array? [ 339.521575] scsi_verify_blk_ioctl: 662 callbacks suppressed [ 339.531128] mdadm: sending ioctl 1261 to a partition! [ 339.539999] mdadm: sending ioctl 1261 to a partition! [ 339.549504] mdadm: sending ioctl 1261 to a partition! [ 339.558273] mdadm: sending ioctl 1261 to a partition! [ 339.570764] md0: bitmap file is out of date (0 < 47) -- forcing full recovery [ 339.574628] mdadm: sending ioctl 800c0910 to a partition! [ 339.574635] mdadm: sending ioctl 800c0910 to a partition! [ 339.574646] mdadm: sending ioctl 1261 to a partition! [ 339.574650] mdadm: sending ioctl 1261 to a partition! [ 339.580825] mdadm: sending ioctl 800c0910 to a partition! [ 339.580832] mdadm: sending ioctl 800c0910 to a partition! [ 339.634433] created bitmap (1 pages) for device md0 [ 341.719752] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [ 341.720673] IP: [<ffffffff81473cc0>] bitmap_endwrite+0x130/0x250 [ 341.720673] PGD 0 [ 341.720673] Oops: 0000 [#1] SMP [ 341.720673] CPU 1 [ 341.720673] Modules linked in: lockd it87 hwmon_vid ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter nf_conntrack_ipv4 nf_defrag_ipv4 xt_state ip6_tables nf_conntrack keyspan snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device microcode edac_core sp5100_tco snd_pcm edac_mce_amd i2c_piix4 r8169 k10temp mii serio_raw snd_timer snd soundcore snd_page_alloc shpchp uinput sunrpc raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx pata_acpi ata_generic raid0 raid1 firewire_ohci firewire_core crc_itu_t pata_atiixp mvsas libsas scsi_transport_sas wmi radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: scsi_wait_scan] [ 341.720673] [ 341.720673] Pid: 0, comm: swapper/1 Not tainted 3.2.9-1.fc16.x86_64 #1 Gigabyte Technology Co., Ltd. GA-MA790GPT-UD3H/GA-MA790GPT-UD3H [ 341.720673] RIP: 0010:[<ffffffff81473cc0>] [<ffffffff81473cc0>] bitmap_endwrite+0x130/0x250 [ 341.867091] RSP: 0018:ffff880227c43b90 EFLAGS: 00010046 [ 341.867091] RAX: 0000000000000000 RBX: ffff8802110edd00 RCX: 0000000000000000 [ 341.867091] RDX: 00000000000000a4 RSI: 00000000000008a4 RDI: 0000000000000000 [ 341.867091] RBP: ffff880227c43bf0 R08: 0000000000000000 R09: 000000000000000b [ 341.867091] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000001485d40 [ 341.867091] R13: ffff8802110edd3c R14: 0000000000000202 R15: 0000000000000008 [ 341.867091] FS: 00007fa3e76bd7c0(0000) GS:ffff880227c40000(0000) knlGS:0000000000000000 This is all I got over the serial console. --Larkin ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kernel oops adding bitmap 2012-03-19 16:44 Kernel oops adding bitmap Larkin Lowrey @ 2012-03-19 21:32 ` NeilBrown 2012-03-19 21:40 ` Larkin Lowrey 0 siblings, 1 reply; 7+ messages in thread From: NeilBrown @ 2012-03-19 21:32 UTC (permalink / raw) To: Larkin Lowrey; +Cc: linux-raid [-- Attachment #1: Type: text/plain, Size: 4027 bytes --] On Mon, 19 Mar 2012 11:44:45 -0500 Larkin Lowrey <llowrey@nuclearwinter.com> wrote: > The following command oopsed. > > mdadm -G --bitmap=internal /dev/md0 > > The array is a two disk raid1 and hosts the root filesystem. > > Is it not possible/allowed to add a bitmap to an active/mounted array? It is. But it is busted. Either use an older mdadm (3.2.2 or earlier), or apply this patch http://neil.brown.name/git?p=md;a=commitdiff;h=4474ca42e2577563a919fd3ed782e2ec55bf11a2 which has been sent to Linus already and should appear in -stable kernels in a couple of weeks. NeilBrown diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index cdf36b1..239af9a 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1904,6 +1904,8 @@ location_store(struct mddev *mddev, const char *buf, size_t len) if (mddev->pers) { mddev->pers->quiesce(mddev, 1); rv = bitmap_create(mddev); + if (!rv) + rv = bitmap_load(mddev); if (rv) { bitmap_destroy(mddev); mddev->bitmap_info.offset = 0; > [ 339.521575] scsi_verify_blk_ioctl: 662 callbacks suppressed > [ 339.531128] mdadm: sending ioctl 1261 to a partition! > [ 339.539999] mdadm: sending ioctl 1261 to a partition! > [ 339.549504] mdadm: sending ioctl 1261 to a partition! > [ 339.558273] mdadm: sending ioctl 1261 to a partition! > [ 339.570764] md0: bitmap file is out of date (0 < 47) -- forcing full > recovery > [ 339.574628] mdadm: sending ioctl 800c0910 to a partition! > [ 339.574635] mdadm: sending ioctl 800c0910 to a partition! > [ 339.574646] mdadm: sending ioctl 1261 to a partition! > [ 339.574650] mdadm: sending ioctl 1261 to a partition! > [ 339.580825] mdadm: sending ioctl 800c0910 to a partition! > [ 339.580832] mdadm: sending ioctl 800c0910 to a partition! > [ 339.634433] created bitmap (1 pages) for device md0 > [ 341.719752] BUG: unable to handle kernel NULL pointer dereference at > 0000000000000010 > [ 341.720673] IP: [<ffffffff81473cc0>] bitmap_endwrite+0x130/0x250 > [ 341.720673] PGD 0 > [ 341.720673] Oops: 0000 [#1] SMP > [ 341.720673] CPU 1 > [ 341.720673] Modules linked in: lockd it87 hwmon_vid ip6t_REJECT > nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter nf_conntrack_ipv4 > nf_defrag_ipv4 xt_state ip6_tables nf_conntrack keyspan > snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_seq > snd_seq_device microcode edac_core sp5100_tco snd_pcm edac_mce_amd > i2c_piix4 r8169 k10temp mii serio_raw snd_timer snd soundcore > snd_page_alloc shpchp uinput sunrpc raid456 async_raid6_recov async_pq > raid6_pq async_xor xor async_memcpy async_tx pata_acpi ata_generic raid0 > raid1 firewire_ohci firewire_core crc_itu_t pata_atiixp mvsas libsas > scsi_transport_sas wmi radeon ttm drm_kms_helper drm i2c_algo_bit > i2c_core [last unloaded: scsi_wait_scan] > [ 341.720673] > [ 341.720673] Pid: 0, comm: swapper/1 Not tainted 3.2.9-1.fc16.x86_64 > #1 Gigabyte Technology Co., Ltd. GA-MA790GPT-UD3H/GA-MA790GPT-UD3H > [ 341.720673] RIP: 0010:[<ffffffff81473cc0>] [<ffffffff81473cc0>] > bitmap_endwrite+0x130/0x250 > [ 341.867091] RSP: 0018:ffff880227c43b90 EFLAGS: 00010046 > [ 341.867091] RAX: 0000000000000000 RBX: ffff8802110edd00 RCX: > 0000000000000000 > [ 341.867091] RDX: 00000000000000a4 RSI: 00000000000008a4 RDI: > 0000000000000000 > [ 341.867091] RBP: ffff880227c43bf0 R08: 0000000000000000 R09: > 000000000000000b > [ 341.867091] R10: 0000000000000000 R11: 0000000000000001 R12: > 0000000001485d40 > [ 341.867091] R13: ffff8802110edd3c R14: 0000000000000202 R15: > 0000000000000008 > [ 341.867091] FS: 00007fa3e76bd7c0(0000) GS:ffff880227c40000(0000) > knlGS:0000000000000000 > > This is all I got over the serial console. > > --Larkin > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Kernel oops adding bitmap 2012-03-19 21:32 ` NeilBrown @ 2012-03-19 21:40 ` Larkin Lowrey 2012-03-21 13:21 ` CoolCold 0 siblings, 1 reply; 7+ messages in thread From: Larkin Lowrey @ 2012-03-19 21:40 UTC (permalink / raw) To: NeilBrown; +Cc: linux-raid On 3/19/2012 4:32 PM, NeilBrown wrote: > On Mon, 19 Mar 2012 11:44:45 -0500 Larkin Lowrey <llowrey@nuclearwinter.com> > wrote: > >> The following command oopsed. >> >> mdadm -G --bitmap=internal /dev/md0 >> >> The array is a two disk raid1 and hosts the root filesystem. >> >> Is it not possible/allowed to add a bitmap to an active/mounted array? > > It is. But it is busted. > > Either use an older mdadm (3.2.2 or earlier), or apply this patch > > http://neil.brown.name/git?p=md;a=commitdiff;h=4474ca42e2577563a919fd3ed782e2ec55bf11a2 > > which has been sent to Linus already and should appear in -stable kernels in > a couple of weeks. > > NeilBrown Thank you for the explanation. --Larkin ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kernel oops adding bitmap 2012-03-19 21:40 ` Larkin Lowrey @ 2012-03-21 13:21 ` CoolCold 2012-03-21 13:52 ` John Robinson 2012-03-21 20:03 ` NeilBrown 0 siblings, 2 replies; 7+ messages in thread From: CoolCold @ 2012-03-21 13:21 UTC (permalink / raw) To: Larkin Lowrey; +Cc: NeilBrown, linux-raid Btw, was interested in, where bitmap will be placed when adding it on live array? I.e. as it requires some diskspace, we should provide some free space, but where it can be taken from if array is already created and used by, say filesystem? On Tue, Mar 20, 2012 at 1:40 AM, Larkin Lowrey <llowrey@nuclearwinter.com> wrote: > On 3/19/2012 4:32 PM, NeilBrown wrote: >> On Mon, 19 Mar 2012 11:44:45 -0500 Larkin Lowrey > <llowrey@nuclearwinter.com> >> wrote: >> >>> The following command oopsed. >>> >>> mdadm -G --bitmap=internal /dev/md0 >>> >>> The array is a two disk raid1 and hosts the root filesystem. >>> >>> Is it not possible/allowed to add a bitmap to an active/mounted array? >> >> It is. But it is busted. >> >> Either use an older mdadm (3.2.2 or earlier), or apply this patch >> >> http://neil.brown.name/git?p=md;a=commitdiff;h=4474ca42e2577563a919fd3ed782e2ec55bf11a2 >> >> which has been sent to Linus already and should appear in -stable > kernels in >> a couple of weeks. >> >> NeilBrown > > Thank you for the explanation. > > --Larkin > > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best regards, [COOLCOLD-RIPN] -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kernel oops adding bitmap 2012-03-21 13:21 ` CoolCold @ 2012-03-21 13:52 ` John Robinson 2012-03-21 20:03 ` NeilBrown 1 sibling, 0 replies; 7+ messages in thread From: John Robinson @ 2012-03-21 13:52 UTC (permalink / raw) To: CoolCold; +Cc: linux-raid On 21/03/2012 13:21, CoolCold wrote: > Btw, was interested in, where bitmap will be placed when adding it on > live array? I.e. as it requires some diskspace, we should provide some > free space, but where it can be taken from if array is already created > and used by, say filesystem? There's room allocated in the metadata for it at create time, whether or not it's used from create time, ever since bitmaps were introduced. Before mdadm 3.1.2, total metadata size depended on the array size, because the bitmap size depended on the array size, but from 3.1.2 on mdadm allocates 1MB for metadata including the bitmap (which is much more than is really needed but helps keep things 1MB-aligned). Cheers, John. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kernel oops adding bitmap 2012-03-21 13:21 ` CoolCold 2012-03-21 13:52 ` John Robinson @ 2012-03-21 20:03 ` NeilBrown 2012-03-22 19:54 ` CoolCold 1 sibling, 1 reply; 7+ messages in thread From: NeilBrown @ 2012-03-21 20:03 UTC (permalink / raw) To: CoolCold; +Cc: Larkin Lowrey, linux-raid [-- Attachment #1: Type: text/plain, Size: 1830 bytes --] On Wed, 21 Mar 2012 17:21:55 +0400 CoolCold <coolthecold@gmail.com> wrote: > Btw, was interested in, where bitmap will be placed when adding it on > live array? I.e. as it requires some diskspace, we should provide some > free space, but where it can be taken from if array is already created > and used by, say filesystem? For 0.90 metadata there is 60K of unused space after the superblock. The bitmap is stored there. For 1.x, the metadata stores a data_offset and data_size. All array data is in that range. Anything out side there is available for mdadm to use. When mdadm creates an array it reserves enough space for bitmap and possible other uses. NeilBrown > > On Tue, Mar 20, 2012 at 1:40 AM, Larkin Lowrey > <llowrey@nuclearwinter.com> wrote: > > On 3/19/2012 4:32 PM, NeilBrown wrote: > >> On Mon, 19 Mar 2012 11:44:45 -0500 Larkin Lowrey > > <llowrey@nuclearwinter.com> > >> wrote: > >> > >>> The following command oopsed. > >>> > >>> mdadm -G --bitmap=internal /dev/md0 > >>> > >>> The array is a two disk raid1 and hosts the root filesystem. > >>> > >>> Is it not possible/allowed to add a bitmap to an active/mounted array? > >> > >> It is. But it is busted. > >> > >> Either use an older mdadm (3.2.2 or earlier), or apply this patch > >> > >> http://neil.brown.name/git?p=md;a=commitdiff;h=4474ca42e2577563a919fd3ed782e2ec55bf11a2 > >> > >> which has been sent to Linus already and should appear in -stable > > kernels in > >> a couple of weeks. > >> > >> NeilBrown > > > > Thank you for the explanation. > > > > --Larkin > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kernel oops adding bitmap 2012-03-21 20:03 ` NeilBrown @ 2012-03-22 19:54 ` CoolCold 0 siblings, 0 replies; 7+ messages in thread From: CoolCold @ 2012-03-22 19:54 UTC (permalink / raw) To: NeilBrown; +Cc: Larkin Lowrey, linux-raid, John Robinson On Thu, Mar 22, 2012 at 12:03 AM, NeilBrown <neilb@suse.de> wrote: > On Wed, 21 Mar 2012 17:21:55 +0400 CoolCold <coolthecold@gmail.com> wrote: > >> Btw, was interested in, where bitmap will be placed when adding it on >> live array? I.e. as it requires some diskspace, we should provide some >> free space, but where it can be taken from if array is already created >> and used by, say filesystem? > > For 0.90 metadata there is 60K of unused space after the superblock. The > bitmap is stored there. > > For 1.x, the metadata stores a data_offset and data_size. All array data is > in that range. Anything out side there is available for mdadm to use. > When mdadm creates an array it reserves enough space for bitmap and possible > other uses. > > NeilBrown > John, Neil, thanks for sharing this info! May be add it this to wiki? >> >> On Tue, Mar 20, 2012 at 1:40 AM, Larkin Lowrey >> <llowrey@nuclearwinter.com> wrote: >> > On 3/19/2012 4:32 PM, NeilBrown wrote: >> >> On Mon, 19 Mar 2012 11:44:45 -0500 Larkin Lowrey >> > <llowrey@nuclearwinter.com> >> >> wrote: >> >> >> >>> The following command oopsed. >> >>> >> >>> mdadm -G --bitmap=internal /dev/md0 >> >>> >> >>> The array is a two disk raid1 and hosts the root filesystem. >> >>> >> >>> Is it not possible/allowed to add a bitmap to an active/mounted array? >> >> >> >> It is. But it is busted. >> >> >> >> Either use an older mdadm (3.2.2 or earlier), or apply this patch >> >> >> >> http://neil.brown.name/git?p=md;a=commitdiff;h=4474ca42e2577563a919fd3ed782e2ec55bf11a2 >> >> >> >> which has been sent to Linus already and should appear in -stable >> > kernels in >> >> a couple of weeks. >> >> >> >> NeilBrown >> > >> > Thank you for the explanation. >> > >> > --Larkin >> > >> > -- >> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in >> > the body of a message to majordomo@vger.kernel.org >> > More majordomo info at http://vger.kernel.org/majordomo-info.html >> >> >> > -- Best regards, [COOLCOLD-RIPN] -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-22 19:54 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-19 16:44 Kernel oops adding bitmap Larkin Lowrey 2012-03-19 21:32 ` NeilBrown 2012-03-19 21:40 ` Larkin Lowrey 2012-03-21 13:21 ` CoolCold 2012-03-21 13:52 ` John Robinson 2012-03-21 20:03 ` NeilBrown 2012-03-22 19:54 ` CoolCold
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).