how to release device locked by bcache

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












Today I bought a 128MB SSD disk, installed it, then installed bcache-tools. After attempting to access the device I got these errors:



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#


So I have the following questions:



  • Why did bcache started to use my SSD disk (/dev/sda) without even asking me for permission? That's a lot of disrespect to the authority.

  • How do I disable bcache so I can properly format the devices, they are not formatted yet.

This is the output of ls -l in 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#






share|improve this question
























    up vote
    0
    down vote

    favorite












    Today I bought a 128MB SSD disk, installed it, then installed bcache-tools. After attempting to access the device I got these errors:



    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#


    So I have the following questions:



    • Why did bcache started to use my SSD disk (/dev/sda) without even asking me for permission? That's a lot of disrespect to the authority.

    • How do I disable bcache so I can properly format the devices, they are not formatted yet.

    This is the output of ls -l in 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#






    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Today I bought a 128MB SSD disk, installed it, then installed bcache-tools. After attempting to access the device I got these errors:



      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#


      So I have the following questions:



      • Why did bcache started to use my SSD disk (/dev/sda) without even asking me for permission? That's a lot of disrespect to the authority.

      • How do I disable bcache so I can properly format the devices, they are not formatted yet.

      This is the output of ls -l in 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#






      share|improve this question












      Today I bought a 128MB SSD disk, installed it, then installed bcache-tools. After attempting to access the device I got these errors:



      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#


      So I have the following questions:



      • Why did bcache started to use my SSD disk (/dev/sda) without even asking me for permission? That's a lot of disrespect to the authority.

      • How do I disable bcache so I can properly format the devices, they are not formatted yet.

      This is the output of ls -l in 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#








      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 27 at 0:05









      Nulik

      1186




      1186

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028573%2fhow-to-release-device-locked-by-bcache%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028573%2fhow-to-release-device-locked-by-bcache%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491