USB storage drives renaming on their own

I have a new install of ZimaOS, and all is going well, except that I have a USB drive that whenever the server reboots it will have one name, 2TB, and after an hour or two, it will rename itself to 2TB-2. Any way to keep this from happening or to assign it a permanent name?

What’s happening (I believe):

  • Linux/ZimaOS auto-mounts USB drives.
  • If two drives share the same label (e.g. 2TB), or the USB re-enumerates after boot, ZimaOS avoids conflicts by renaming it to 2TB-2.

This is normal behavior, not a failing disk.

Best fix (I suggest): give the drive a unique label

From SSH:

lsblk -f

Find the USB partition (e.g. /dev/sdb1).

If ext4:

e2label /dev/sdb1 USB_2TB_BACKUP

If exFAT:

exfatlabel /dev/sdb1 USB_2TB_BACKUP

Reboot once. The name will stay stable.

Summary

  • -2 means label conflict or USB re-enumeration
  • Unique filesystem label = permanent name
  • No data loss risk

That’s the cleanest solution on ZimaOS.

Would this work on sata drives too?

I ended up plugging into a USB C port on the front of the Beelink EQR6. Apparently the USB 3 ports in the back tend to randomly drop and pick back up unless you tweak something in the BIOS. It’s ugly, but I don’t feel like taking it down plugging it into a monitor right now.

11 years daily driving Linux and I’ve never seen either of those *label commands before. Thank you for your response. I learned something

Jsg

Yes 100%.

This works on any drive type, SATA HDD/SSD, NVMe, USB because it’s changing the filesystem label, not the hardware.

So if your SATA drive is ext4:

e2label /dev/sdX1 MY_SATA_DRIVE

(Replace /dev/sdX1 with the correct partition.)

Nice one Jsg, that actually makes perfect sense.

If the rear USB3 ports are briefly dropping / re-enumerating, ZimaOS will often remount the disk and you’ll see the 2TB-2 behaviour. Moving it to the front USB-C port is a totally valid “don’t-touch-the-BIOS” fix.

And yep those label tools are old-school Linux gems:

  • e2label = ext4 label
  • exfatlabel = exFAT label

Glad it helped mate

1 Like