Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Disk Names in Moode (and elsewhere)
#1
This is not a Moode issue but is involved in my usage of Moode. I now have two SanDisk Extreme portable 1TB SSD drives that I use on my RPi 4 for Moode. Just got the second. No surprise, but the default name when mounted for both is "Extreme SSD". I understand that you can use any name you want if you reformat, but all I want to do is simply change the name of both (Thing 1 and Thing 2 or whatever). Adding to the potential issues is the fact that I do a lot of processing, for various purposes on my windows desktop. The drives are currently formatted in exfat which works fine on both system.

Is there a simple utility on either windows or the RPi OS as implemented by Moode that will change the name and be seen and function properly on both sides without having to backup and later restore all my files?

Your help here will be most appreciated.

Skip
Reply
#2
@Skip Pack

I don't know an easier fix than to use the exfatlabel utility which is already present in the moOde 7.5.0 player.

Here's what the man page says

Code:
EXFATLABEL(8)                               System Manager's Manual                               EXFATLABEL(8)

NAME
      exfatlabel - get or set an exFAT file system label

SYNOPSIS
      exfatlabel [ -V ] device [ label ]

DESCRIPTION
      exfatlabel reads or changes an exFAT file system label (volume name).

      If label argument is present, exfatlabel sets the new volume name. Empty label ('') removes volume name.
      Label can be up to 15 characters. This limit is shorter if characters beyond Unicode BMP  are  used  be‐
      cause internally label is stored in UTF-16.

      If label argument is omitted, exfatlabel just prints current volume name.

COMMAND LINE OPTIONS
      Command line options available:

      -V     Print version and copyright.

EXIT CODES
      Zero is returned on success. Any other code means an error.


To test this on a moOde 7.5.0 player, I plugged in a thumbdrive with one partition containing an exfat filesystem with the filesystem label "MYexFAT".

First, let's see what filesystems are mounted


Code:
pi@rpi3bp:~ $ lsblk --fs
NAME   FSTYPE LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                        
├─sda1 vfat   boot     EBBA-157F                             197.5M    22% /boot
└─sda2 ext4   rootfs   b3ce35cd-ade9-4755-a4bb-1571e37fc1b9     11G    19% /
sdb                                                                        
└─sdb1 exfat  MYexFAT  809C-FDEB                             495.3M     0% /media/MYexFAT


Let's change the label to "NewLabel" and then check that it changed [Ignore the WARN message; it's just calling me out for being a bad boy who now has to clean up after myself; the filesystem itself is working.]

Code:
# write the new label
pi@rpi3bp:~ $ sudo exfatlabel /dev/sdb1 NewLabel
WARN: volume was not unmounted cleanly.

# read the label
pi@rpi3bp:~ $ sudo exfatlabel /dev/sdb1
NewLabel


Always unplug and replug the drive after making changes like this so the changes propagate to the OS. Otherwise you'll find the filesysem is still being referred to by the old label.

Regards,
Kent

Notes: 
  1. to reiterate, moOde will not know the label has been changed until the drive is remounted
  2. the exfatlabel utility is for exfat filesystems only; there is also fatlabel and e2label (for ext2/ext3/ext4 filesystems)
  3. we're changing the filesystem label aka the volume name, not the partition label. Your favorite search engine is your friend if you want to know more about all the ins and outs of filesystems, partition tables, and such.
Reply
#3
That did the job as I was sure it would. It's a 'label', not a 'name'. I did the perfunctory searches before I asked, but not the right cues. Thanks a bunch Kent!
Reply


Forum Jump: