Skip to contentSkip to conversation

Registering bcache devices

DISCUSSION Andrew Thrift 2 participants 2 messages Jan 23, 2013 1 message not in the archive bcache (block layer cache)

lore
Share & tools
lore
#0 lore raw

Hi,

I am attempting to get bcache devices to register by echoing all /dev/sd* and /dev/dm-* to the bcache registration in /sys but get the following:

echo /dev/dm-* > /sys/fs/bcache/register
bash: echo: write error: Invalid argument

echo /dev/sd* > /sys/fs/bcache/register
bash: echo: write error: Invalid argument

I am using a 3.7 kernel pulled from 4747cd9 revision.

Is this a bug, or am I just "doing it wrong" ?

Regards,

Andrew Thrift

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 9 lines · Andrew Thrift

Hi,

I am attempting to get bcache devices to register by echoing all /dev/sd* and /dev/dm-* to the bcache registration in /sys but get the following:

echo /dev/dm-* > /sys/fs/bcache/register
bash: echo: write error: Invalid argument

Quoted 7 lines

echo /dev/sd* > /sys/fs/bcache/register
bash: echo: write error: Invalid argument

I am using a 3.7 kernel pulled from 4747cd9 revision.

Is this a bug, or am I just "doing it wrong" ?

You've got to echo them one at a time, like so:

for i in ls /dev/sd*; do
echo $i > /sys/fs/bcache/register_quiet
done

(initramfs/script in bcache-tools does this)