Re: How to release backing device from bcache?

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

 



Nm, user error.

Should have been using 'losetup -o 8192 /dev/loop0 /dev/dm-1'.

Thanks,
Brendan

On Fri, Jan 22, 2021 at 10:52 AM Brendan Boerner <bboerner.biz@xxxxxxxxx> wrote:
>
> How do I get bcache to completely give up access to a backing device
> so I can mount it using losetup?
>
> My backing device is an lvm logical volume which I expanded in size.
>
> I want to mount it using losetup to use xfs_growfs however I can't
> access the backing device:
>
> root@timber4:/var/log# umount /mnt/archives/ ; echo 1 >
> /sys/block/bcache1/bcache/stop ; echo 1 > /sys/block/dm-1/bcache/stop
> ; losetup -o 8192 /dev/loop0 /dev/vg-bfd02/archives_bc
> -bash: /sys/block/dm-1/bcache/stop: No such file or directory
> losetup: /dev/vg-bfd02/archives_bc: failed to set up loop device:
> Device or resource busy
>
> I know in some cases udev is scurrying in and causing the cache to be
> recreated but even immediately after the stop and before udev can get
> in the backing device is still locked:
>
> Jan 22 11:48:33 timber4 kernel: [370093.820204] XFS (bcache1):
> Unmounting Filesystem
> Jan 22 11:48:33 timber4 kernel: [370093.830609] bcache:
> bcache_device_free() bcache1 stopped
> Jan 22 11:48:33 timber4 systemd[1]: Stopped File System Check on
> /dev/disk/by-uuid/cb9c1149-73b8-4929-bcc6-d1599d41da73.
> Jan 22 11:48:33 timber4 kernel: [370093.904348] bcache:
> register_bcache() error /dev/dm-1: device busy
>
> I was able to do this in the past when I first started learning to use
> bcache which is why this is especially perplexing.
>
> Suggestions?
>
> Thanks,
> Brendan



[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