Hi all,
Through a bit of digging, I've discovered how to set and get the volume name of an ext3 partition on my Linux box:
set the volume label
tune2fs -L MY-NEW-NAME /dev/disk/by-path/pci-0000\:00\:1f.2-scsi-2\:0\:0\:0-part1
get the volume's current level
dumpe2fs -h /dev/disk/by-path/pci-0000\:00\:1f.2-scsi-2\:0\:0\:0-part1 | grep 'volume name'
Those work fine, but I have several questions:
1) Are those commands the best way to set/get the volume name? Or is there an easier method that I don't know about?
2) How likely is changing a volume's label to break something? i.e. does a standard Linux system rely on volumes having certain names? Or can I rename volumes to any names I like, without causing problems?
3) At some point I would like to include in my program a GUI interface to the above functionality. One way to do that would be to have my program execute the above shell commands (via system() or whatever), but that seems a bit clunky and heavyweight... are there direct functions that I can call to do the same thing? If so, what are they?
Thanks, Jeremy