Linux bcache driver list
 help / color / mirror / Atom feed
From: James Sefton <james-3k2nYdb70uTQXOPxS62xeg@public.gmane.org>
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Kernel Oops (bCache hangs on registering 3rd device)
Date: Mon, 5 Nov 2012 14:32:22 +0000 (UTC)	[thread overview]
Message-ID: <loom.20121105T151725-920@post.gmane.org> (raw)
In-Reply-To: CAOzFzEjpdgNNnsXB4TQyJ2hAG91HZ19JEGJ+H9sQ9+akKiDW2g@mail.gmail.com

Joseph Glanville <joseph.glanville@...> writes:

> 
> On 6 November 2012 00:15, James Sefton <james@...> wrote:
> > James Sefton <james@...> writes:
> >
> > Aha,  I have more information.
> >
> > ls /dev/block -l
> >
> > <filtered results to relevant>
> > lrwxrwxrwx 1 root root 10 Nov  5 12:51 252:0 -> ../bcache0
> > lrwxrwxrwx 1 root root 10 Nov  5 12:51 252:1 -> ../bcache1
> > lrwxrwxrwx 1 root root 12 Nov  5 12:51 252:2 -> ../bcache1p1
> >
> >
> > Our script does things in the following order:
> > 1. Registers bcache0 - OK
> >  - links bcache0 in /dev/block/252:0
> > 2. Registers bcache1 - OK
> >  - links bcache1 in /dev/block/252:1
> > 3. Partitions bcache1 - OK  (single partition at the moment)
> >  - links bcache1p1 in /dev/block/252:2
> > 4. Partitions bcache0 - Partition table writes okay, but bcache0p1 does not 
get
> > created.
> >  - presumably attempts to link /dev/block/252:1 or something, and fails.
> > 5. Registers bcache2 - FAIL, prevents any further bcache devices being
> > registered and prevents system shut-down.
> >  - attempts to link bcache2 in /dev/block/252:2, which is already used for
> > bcache1p1.
> >
> > Probably explains why this has not been seen before since we only just added
> > support for partitions with the patch details you recently gave me.
> >
> > Any chance of a patch to fix the numbering?
> > (I wish my C++ was up to scratch so that I could do it myself as it looks 
like
> > it could be relatively simple!)
> >
> > Many Thanks,
> >
> > James
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> > the body of a message to majordomo@...
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> Though not a fix, a workaround could be to use LVM rather than partitions.
> 
> LVM ontop of bcache works quite nicely you just need to add the
> following to /etc/lvm.conf
> 
> types = [ "bcache", 16 ]
> 
> Also check your filter line to ensure that /dev/bcacheX will be scanned as a 
PV.
> 
> Once you have done that you can create a volume group as usual:
> 
> vgcreate vg0 /dev/bcache0
> 
> And then any number of LVs:
> 
> lvcreate -n root -L50G vg0
> 
> In my opinion this is considerably better than partitions.
> 
> Joseph.
> 


Hi Joseph,

Many thanks for the suggestion.

I wish I could do that but the cache devices are being exposed to virtual 
machines as virtual disks and so the clients could easily repartition them back 
which would then reproduce the conflicting block device numbers.

I am also not sure how well LVM might cope if the PV's (etc..) were detected 
both in the host operating system and within a guest.

Even if LVM could work - I would still need to be able to accommodate a client 
the does not want LVM and chooses to repartition the device, and currently that 
would break the host server.

I do really appreciate the suggestion though.

Regards,

James

  reply	other threads:[~2012-11-05 14:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04  3:27 Kernel Oops (bCache hangs on registering 3rd device) James Sefton
2012-11-05 13:01 ` James Sefton
2012-11-05 13:15   ` James Sefton
     [not found]     ` <loom.20121105T140203-975-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2012-11-05 13:49       ` Joseph Glanville
2012-11-05 14:32         ` James Sefton [this message]
     [not found]           ` <loom.20121105T151725-920-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2012-11-05 15:37             ` Joseph Glanville
2012-11-05 16:02               ` James Sefton
     [not found]                 ` <loom.20121105T165829-696-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2012-11-05 16:20                   ` Joseph Glanville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20121105T151725-920@post.gmane.org \
    --to=james-3k2nydb70utqxopxs62xeg@public.gmane.org \
    --cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox