Skip to content

Multiple iSCSI fileIO Block Devices on One Btrfs Disk with bees #263

@a-priestley

Description

@a-priestley

I'm currently working on a project with the goal of setting up a remote game streaming service with simultaneous client capabilities, with a focus on efficient use of storage available over network.

For network storage availability, I'm using iSCSI fileIO image backstores -- one per client.

For the streaming service, I'm using wolf, which is a containerized service that dynamically spins up headless streaming displays using gstreamer for clients to connect to using moonlight.

The problem I am trying to solve when using this service is related to storage use. Each client would need its own filesystem, which means that storage use for duplicate files on the underlying disk would be multiplied by the number of clients using those files. Basically, two clients with the same game installed will double the storage requirements for that game.

The general idea is to use bees to reduce the storage requirements for these duplicate files. So I've currently got a 2TB hybrid drive formatted as a partitionless btrfs, which I'm running bees on, with a 256MB DB_SIZE. Inside the volume I've created an iSCSI target on a sparse image file.

For testing purposes, I'm connecting to the target on the same machine that I'm hosting from, and I've mounted the resulting block device as ext4, which I'm now testing out as a Steam library.

Unfortunately at this point I'm running into some trouble. While many titles are installing and running with no issue, others, particularly larger ones are unable to be verified by Steam due to disk read errors. I can see these coming in as btrfs corruption errors in the journal as well as beesd crawl errors such as:

Aug 18 10:28:45 bob beesd[837]: crawl_5_258[1016]: scan bbd BeesBlockData { 4K 0x1a425b17000 fd = 10 '/run/bees/mnt/424c18a1-e198-45af-b13e-7e64654e9e68/games.img', address = 0x118e523b000 }
Aug 18 10:28:45 bob beesd[837]: crawl_5_258[1016]: Extent { begin = 0x1a420000000, end = 0x1a428000000, physical = 0x118df724000, flags = 0, physical_len = 0x8000000, logical_len = 0x8000000 } block_count 32768
Aug 18 10:28:45 bob kernel: BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 0, flush 0, corrupt 4107, gen 0
Aug 18 10:28:45 bob beesd[837]: crawl_5_258[1016]: scan extent Extent { begin = 0x1a420000000, end = 0x1a428000000, physical = 0x118df724000, flags = 0, physical_len = 0x8000000, logical_len = 0x8000000 }

I'm trying to ascertain whether or not this project is even feasible. Is it advisable to use bees in this way? If anyone thinks it could work, are there any pointers you can give on how I can tweak the service?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions