Hoje comprei um disco SSD de 128 MB, instalei-o e instalei bcache-tools
. Depois de tentar acessar o dispositivo, recebi esses erros:
root@dev:/sys/block/sda/bcache# make-bcache -B /dev/sdb1 /dev/sdb1 -C /dev/sda
Can't open dev /dev/sda: Device or resource busy
root@dev:/sys/block/sda/bcache# fdisk /dev/sda
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
/dev/sda: device contains a valid 'bcache' signature; it is strongly recommended to wipe the device with wipefs(8) if this is unexpected, in order to avoid possible collisions
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xfef282bc.
Command (m for help): q
root@dev:/sys/block/sda/bcache# wipefs -a /dev/sda
wipefs: error: /dev/sda: probing initialization failed: Device or resource busy
root@dev:/sys/block/sda/bcache#
Então, tenho as seguintes perguntas:
bcache
começou a usar meu disco SSD (/ dev / sda) sem nem me pedir permissão? Isso é muito desrespeito à autoridade. bcache
para que eu possa formatar corretamente os dispositivos, eles ainda não estão formatados. Esta é a saída de ls -l em bcache
devices:
root@dev:/sys/block/sda/bcache# ls -l
total 0
-r--r--r-- 1 root root 4096 Apr 26 18:47 block_size
-r--r--r-- 1 root root 4096 Apr 26 18:47 btree_written
-r--r--r-- 1 root root 4096 Apr 26 18:47 bucket_size
-rw-r--r-- 1 root root 4096 Apr 26 18:47 cache_replacement_policy
--w------- 1 root root 4096 Apr 26 18:47 clear_stats
-rw-r--r-- 1 root root 4096 Apr 26 18:47 discard
-r--r--r-- 1 root root 4096 Apr 26 18:47 io_errors
-r--r--r-- 1 root root 4096 Apr 26 18:47 metadata_written
-r--r--r-- 1 root root 4096 Apr 26 18:47 nbuckets
-r--r--r-- 1 root root 4096 Apr 26 18:47 priority_stats
lrwxrwxrwx 1 root root 0 Apr 26 18:47 set -> ../../../../../../../../../../fs/bcache/b9d9517a-a606-4ac2-86dc-3399e9678381
-r--r--r-- 1 root root 4096 Apr 26 18:47 written
root@dev:/sys/block/sda/bcache# pwd
/sys/block/sda/bcache
root@dev:/sys/block/sda/bcache#
.
root@dev:/sys/fs/bcache# ls -l
total 0
drwxr-xr-x 7 root root 0 Apr 26 19:00 b9d9517a-a606-4ac2-86dc-3399e9678381
--w------- 1 root root 4096 Apr 26 19:00 register
--w------- 1 root root 4096 Apr 26 19:00 register_quiet
root@dev:/sys/fs/bcache#