Categories
Computing Linux Technology

Reformat Drives to 512 bytes / sector

Got some IBM NetApp drives? Or drives from some other big SAN? Operating system can’t see them? They might be low-level formatted to 520 byte sectors or some other oddball size. Many other drives you see on eBay (etc) have this same issue. These drives can be very affordable, but you can’t use them as-is.

This guy- https://youtu.be/BbtPPH3W7nU advises booting CentOS 6 and installing sg3utils, which I did. Under this regime, the drives are referred to as /dev/sgx where x is a number. Not the usual /dev/sdx or /dev/hdx.

  • dnf install sg3_utils
    • (or apt install for debian/ubuntu)
  • sg_scan -i
    • Look, it sees all my drives!
  • Format the drive:
    • sg_format --format --size=512 --fmtpinfo=0 /dev/sg3
    • Yup, sg3, not sdc
      • More recently, 2021-05-21, the syntax above worked perfectly,
      • Formatting two drives on the same controller (run from two different consoles) took 96m 16s
    • Sometimes this FAILED, so I did  this:
    • sg_format --FFF --size=512 --fmtpinfo=0 /dev/sg3
    • This forces the format, even if it can’t read the sense key properly.
    • If this completes without error, try it again without the -FFF, using just -F instead.
    • Using -FFF completes without error, but repeating with -F fails again.
    • So upon further research, I tried this:
    • sg_format --F --size=512 --six --fmtpinfo=0 /dev/sg3
    • The six option can be used in case the drive cannot be formatted with default 10 byte MODE SENSE/SELECT
    • Works much better (but no faster.) Eventually finished, 140m, 16s later, or 2 hours, 20 minutes, 16 seconds.
    • The drives work fine now, as do all drives I tried this on.

Categories
Computing Electronics Technology

USB3 Extension Box

Newer computer cases often have all the USB connections on the back. That’s fine for some, but I have a very crowded lab, and it’s a pain to reach back there and fumble around trying to plug/unplug equipment. So I created this USB 3.1 capable extender box.

I started with a search of Tiger Direct, Amazon, eBay, and several other of the usual suspects. I was looking for a relatively high density way to mount female USB jacks. They had to be mounted in something with some mass to it, so it won’t skitter around when I try to plug things in, and it needs non-skid rubber feet too. Ultimately, I took the guts out of an old 2400 baud modem. Remember those? You’re dating yourself. That provided the box to mount the USB jacks into. A little aluminum plate, some machining with a drill, punch, and file, and some specialty USB jacks, and Bob’s yer uncle.

Back of that old modem
An old 2400 baud modem
Shuck the modem of its guts…
Leaving a usable case.

BATIGE Dual Ports Square USB 3.0 Panel Flush Mount Extension Cable

These are what the panel-mount USB cables look like; Amazon has them in both 3 and 6 foot lengths.

This is what I used:
https://www.amazon.com/gp/product/B078LXX3MD.

After considerable machining (by hand) of some scrap aluminum…

The final product looks like the photos below.

Categories
Computing Linux Technology

Linux

Linux is an operating system, like Windows is an operating system, but they are not the same.

  • Windows is a for-profit product of Microsoft
  • Linux is Free and Open Source Software (FOSS) https://itsfoss.com/what-is-foss which is available for download at no cost. However, people and companies can and do charge for support contracts and other services, for those who feel they need it.
  • Windows is proprietary. The code/programming used to create it is (by and large) a closely guarded secret, and even if it did get out, it’s protected by copyright/patents/other legal guards.
  • Linux is open-source, which means that the code for it can be examined by anyone. This has a number of implications. Linux is known not to contain nefarious phone-home, tattle on the user, security-challenged features, because anyone can take it apart line-by-line and determine exactly what each line of code does.
  • Windows is known to “phone home” and report on what you’re doing, etc.
  • Windows, starting with Windows 10, forces users to accept all updates from Microsoft, even if it breaks things.
  • Linux leaves updates and version upgrades to the user, though performing them is very easy.
  • Windows requires an ever-increasing amount of hardware horsepower to run.
  • Linux makes excellent use of high-powered CPUs, memory, and other components, but also runs well on lower-powered equipment. It can often breath new life into older PCs and laptops that would otherwise hit the scrap heap.

Stay tuned for future posts on Linux and other FOSS technology.