title: Efficient way to query or set the volume name of an ext3 partition under Linux?
body: <p>Through a bit of digging, I've discovered how to set and get the volume name of an ext3 partition on my Linux box:</p>
  
  <h1>set the volume label</h1>
  
  <p>tune2fs -L MY-NEW-NAME /dev/disk/by-path/pci-0000:00:1f.2-scsi-2:0:0:0-part1</p>
  
  <h1>get the volume's current level</h1>
  
  <p>dumpe2fs -h /dev/disk/by-path/pci-0000:00:1f.2-scsi-2:0:0:0-part1 | grep 'volume name'</p>
  
  <p>Those work fine, but I have several questions:</p>
  
  <p>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?</p>
  
  <p>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?</p>
  
  <p>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?</p>
  
  <p>Thanks,
  Jeremy</p>