• 4 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: June 26th, 2023

help-circle






  • Btrfs and df don’t get along. There are all sorts of internals to btrfs that non btrfs utils ignore. You should run

    sudo btrfs filesystem df /
    sudo btrfs device usage /
    

    It will give you a better picture of what is going on.

    Balancing my help as someone above pointed out, or you may need to boot to a live media of some kind and rebuild the free space cache. Especially with btrfs I encourage people to join their mailing list for help. The devs are awesome and can help you get sorted out.




  • Fedora is systems, right? The easiest way to gain some (temporary) space is to clean out the journal and whatever logs you don’t need. It can grow quite big.

    sudo journalctl --vacuum-size=100M
    

    Will shrink it to something manageable. This will buy you some time to clean up until the journal grows again.

    Also, clearing the apt cache will probably help free up some root partition space

    sudo apt clean
    

    Your root partition where packages are stored and all the logs and transactional databases might be full even if your home directory has tons of free space.






  • Can you plug the drive in directly and test it? You might also just have a dead drive. Either way if you were planning on using it as a backup medium I would tell you it’s probably not a good idea. If you are trying to recover data from it, good luck. Is it making any sound? You could try buying the same, old but good hard drive and swapping the control board on it. You may also have to swap the nvram chip on it to make sure you have the same sector mappings. Either way there is a lot of stuff you can try, but hopefully this is an educational experience for you (as in learning how to recover a dead drive, not as in learning about the need for proper backup methods) as opposed to a desperate attempt to recover data that is most likely unrecoverable.


  • You should be able to use smartctl on a USB drive. I’ve never had an issue anyway. You may need to specify the transport type tho. I had a drive that it couldn’t figure out on its own, but since it was an sata drive in an external enclosure, atapi is the transport protocol to use

    sudo smartctl -a -d ata /dev/<devid>

    Using the same switch you can run a long test. It’s sort of a pain as it will kill the test on finding a bad sector. But you can take that sector number and plug it into hdparm to rewrite the sector hoping it will remap it. You won’t be able to recover the data in a bad sector, But There are these extra sectors on the drive that firmware can replace the bad one with. It does this on a forced write command.Something along the lines of

    hdparm --repair-sector --yes-i-know-what-i-am-doing </dev/<driveid> <sector number from smartctl>

    Again, you have data loss, you can’t go back to no loss. All you can do is rescue anything important. You may (probably) need to run a long smartctl test again, and fix another sector. I have saved data off of drives with 100+ bad sectors this way… It’s tedious and eventually I scripted it but it does work.


  • It’s not great but it’s not really world ending. About a year ago someone filed for unemployment in bot my wife’s name and my name. Which came as a shock to my employer as I was was still happily at work. I work for a small mom-n-pop store, my wife works at a mega corporation. She caries insurance etc and one of her companies providers had a leak of ssn and other personal information. We both locked our credit and signed up for a protection pin for filing taxes. We reported to the local unemployment office that they were fraudulent claims. I look back and realized we probably should have locked our credit long ago and got tax pins as well, just for the security side of things.

    The funny thing is my employer brought it to my attention. My wife’s employer didn’t even notice and was getting ready to pay the claim even tho she was still working there as the system is all automated in her company. Eventually it came out about the leak and they are providing 5 years of credit monitoring for free.