USB HD not working

If none of the more specific forums is the right place to ask

USB HD not working

Postby LiamF » 2020-12-16 20:55

I have a 100GB USB (2.0) HD that I'm trying to use as a rescue/backup destination for ReaR.
When I attach the HD to my Linux box (buster), I can see it as /dev/sdb. (parted -l or lsusb or lsblk)
When I run /usr/sbin/rear format /dev/sdb, it fails with the following error:
Code: Select all
Warning: Error fsyncing/closing /dev/sdb: Remote I/O error

If I try to manually format it - parted /dev/sdb mklabel gpt - I essentially get the same message.
I then tried the same process on a 2nd Debian box and got the same results.

However, when I attach the drive to my Mac system and use Disk Utility, I can successfully erase and partition the disk.
Why would it be that my Debian system cannot successfully format the disk?

Just to be clear, I am not talking about getting my Linux box to access an HFS+ filesystem on this HD.
I'm looking to wipe the HD and dedicate it to Linux. My Mac systems and Windows systems have no problem with the HD; Debian is reporting I/O errors.

Could there be something fundamental about this drive that it only works for macOS and Windows?
LiamF
 
Posts: 9
Joined: 2018-08-06 10:54

Re: USB HD not working

Postby MagicPoulp » 2020-12-17 10:40

Maybe try the rear community support?
https://relax-and-recover.org/support/

with dd you can put 0s on the disc. This i s how I reinitialized corrupted USB sticks.

But extra sure the /dev/sdb is not your main hard drive or it will erase it.
You must check it before you run the command.

Code: Select all
dd if=/dev/zero of=/dev/sdb bs=512 count=1



If it does not work maybe you have a real hardware failure. The flash memory is known to have a quite short writing lifetime. THat is why I installed debian on a SSD usb and not on a flash usb.

I know nothing about rear. But it seems quite overkill. And even if it is in apt packages, it is not in the list of debian backup tools
https://wiki.debian.org/BackupAndRecovery

I never do backups. I just save my data in 7z archives for the data. The system can easily be reinstalled. Actually it often cleans my system haha.


What is the format?
If it is FAT32, linux can use it normally, but it cannot create linux modes for files.

Maybe Rear requires mounting in read AND write properly?
MagicPoulp
 
Posts: 423
Joined: 2018-11-05 21:30

Re: USB HD not working

Postby LiamF » 2020-12-18 07:39

I did try 'dd if=/dev/zero ...' and restarted the process. Still the same error.
The external USB drive I'm using is a standard 2.5" HDD, i.e. "spinning rust," not an SSD or flash.

The idea is that ReaR will (essentially) create a mirror copy of your system. The first thing it does is duplicate the layout (partitioning et al.) of your system's HD to the backup drive.
This is the step that was failing with errors. Even when I tried manually partitioning with parted or fdisk, the disk reported the same failures.
You would think this is just some simple hardware failure, but as I said, the drive works flawlessly on my macOS and Windows systems.
I'm thinking the drive's manufacturer did something that prevents the disk from being used on anything else but macOS and Windows.
(I don't think this was something nefarious; I think it was more a lazy/cheap shortcut during manufacturing, something a macOS or Windows system either ignores or overlooks.)

With all that said, I picked up a 128G flash drive and ... well, it (ReaR) is working so far. I've successfully created the "rescue" part; I still have to try the "backup" part.
This was more a test; I don't want to use a flash drive for my rescue/backup.

Unfortunately, this is a large production server. While it's quick enough to wipe the system and reinstall Debian, the restoration of all services, applications, and their associated configurations will take days to complete. And a full wipe/rebuild is an unnecessary risk; all it takes is one small change in a "standard" Debian installation to turn a restoration process into a reintegration nightmare. And sometimes it's hard to separate "your data" from "system data" when a good portion of "your data" lives in system locations.

Thanks for the feedback and info; I'm going to call this a "funky hardware issue" and see if I can find a different external HD that is compatible. In the past month, I've now learned that not all modern flash drive "behave the same," nor do external hard drives. I guess the "universal" in USB stops with the cable/connector/protocol. I suppose it's back to buy, try, and cry until I find a device that works.
LiamF
 
Posts: 9
Joined: 2018-08-06 10:54

Re: USB HD not working

Postby MagicPoulp » 2020-12-18 11:41

Since you run servers, maybe you can help me in my own thread about a web server swapping.

You should try to run fsck
Code: Select all
man fsck
sudop fsck /dev/sdb


I know little about rear. But it seems strange that you can use a disc without formatting it manually first.

Did you try to install gparted and there clear the disc and then format it as an ext4 filesytem?.

Using flash as backup may be acceptable if the write frequency is not too high. Flash as a short life time but it works.

You can use a cloud provide and store there in a disctributed system (it cannot disappear) like azure blobs or Amazon S1. They have HTTP APIs to upload directly.

If you have good deployment tools (puppet, chef, ... or even docker that I don't like), you do not need backups.
MagicPoulp
 
Posts: 423
Joined: 2018-11-05 21:30


Return to General Questions

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable