Re: Kernel Oops (bCache hangs on registering 3rd device)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6 November 2012 03:02, James Sefton <james@xxxxxxxxxxxx> wrote:
> Joseph Glanville <joseph.glanville@...> writes:
>
>> >>
>> >> 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.
>> >>
>> >
>> > 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.
>> >
>>
>> What kind of guests are these?
>>
>> If I am correct this is some sort of VPS environment, probably Xen or KVM?
>>
>> In that case if you pass through a logical volume and you properly
>> adjust the filter in the host OS to only scan the bcache devices and
>> not traverse recursively this works perfectly.
>> The guest OS will be able to partition the logical volume and the
>> guest will not be able the see the underlying volume group.
>>
>>
>> Joseph.
>>
>
>
> Hi Joseph,
>
> Again, thank you for putting in the time to help me.
>
> Yes, it is KVM.
>
> I don't think I had thought about it the way you describe. (Passing an LV to KVM
> instead of the bcache device)   I will certainly give it a try.  Sounds like it
> could solve all my problems.
>
> I will drop a reply here if it works.
>
> Thanks again,

No problem.

A word of warning though, if you intend to use LVM inside the guests
(or if they are untrusted guests) then you should certainly adjust the
filter line in lvm.conf to prevent recursive scanning.
Otherwise you will see the guest PVs (and thus VGs and LVs) inside the
host. Which is usually -bad-.

Something like:

filter = ["a/bcache.*/", "r/.*/"]

You obviously will need to also have an appropriate white list filter
for other LVM volumes you want to use. ( "a/sdb/" for example)

>
> James
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux