Symptoms:
When checking for bad blocks, following error is displayed:# badblocks -nvs /dev/sdb
/dev/sdb is apparently in use by the system; it's not safe to run badblocks!
Solution:
- Check the mounts (/etc/mtab), unmount with umount
- Check the swaps (/proc/swaps), unmount with swapoff
- Check volume groups (/dev/mapper/...), deactivate with vgchange -a n
This was helpful. I had originally checked only for conditions 1 and 2 and was stumped. Thanks.
ReplyDelete4. Check software RAID (/proc/mdstat), stop with mdadm
ReplyDeleteThanks @Martin Žember, it works
ReplyDeleteThanks, this helped me out alot. :)
ReplyDeleteThanks! But I found you too late, hopefully forced execute won't break the stick...
ReplyDeleteIf the tool could just say, where exactly the drive is used, it would much better in terms of UX.