User Tools

Site Tools


faq:0136

Q: Can I mount disks/file systems using labels instead of device names?
A:
Yes you can! In fact this is highly recommended as the number of disks in a system increase, since it helps to accurately keep track of which disk is which.

As of v9, labels are used automatically whenever possible, so you should not have to manually add or change them. There are some circumstances where it may be necessary to manage disks outside of the WebGUI, manually. It is good for you to understand and be able to use labels if you run into an unusual situation. You should read Mounting Removable Disk(filesystem) Using Label[Solved], which illustrates a situation where you may have to manually use labels in CLI/shell. The following example comes from that topic:

In this example I'll use disk ad1, formatted using XigmaNAS WebGUI and having one partition p1.

  1. You need to get the label for the file system on partition ad1p1:
      #glabel list ad1p1
      Geom name: ad1p1
      Providers:
      1. Name: ufsid/4bd57b7a8fd27a9e
         Mediasize: 250059315712 (233G)
         Sectorsize: 512
         Mode: r0w0e0
         secoffset: 0
         offset: 0
         seclength: 488397101
         length: 250059315712
         index: 0
      Consumers:
      1. Name: ad1p1
         Mediasize: 250059315712 (233G)
         Sectorsize: 512
         Mode: r0w0e0
      

    The label is ufsid/4bd57b7a8fd27a9e

  2. Create a mount point for this partition via XigmaNAS WebGUI, disk: ad1, partition type: EFI/GPT, partition number 1.
  3. Go to Advanced|File Editor and load /conf/config.xml
  4. Look for your mount point:
      <mount>
        <uuid>9b04de04-5aa8-4ea0-af11-397a66a72911</uuid>
        <type>disk</type>
        <mdisk>/dev/ad1</mdisk>
        <partition>p1</partition>
        <fstype>ufs</fstype>
        <devicespecialfile>/dev/ad1p1</devicespecialfile>
        <sharename>data</sharename>
        <desc/>
        <accessrestrictions>
           <owner>root</owner>
           <group>wheel</group>
           <mode>0777</mode>
        </accessrestrictions>
      </mount>
  5. Replace the entry for <devicespecialfile> with the label:
      <mount>
        <uuid>9b04de04-5aa8-4ea0-af11-397a66a72911</uuid>
        <type>disk</type>
        <mdisk>/dev/ad1</mdisk>
        <partition>p1</partition>
        <fstype>ufs</fstype>
        <devicespecialfile>/dev/ufsid/4bd57b7a8fd27a9e</devicespecialfile>
        <sharename>data</sharename>
        <desc/>
        <accessrestrictions>
           <owner>root</owner>
           <group>wheel</group>
           <mode>0777</mode>
        </accessrestrictions>
      </mount>
  6. Save the config.xml file.
  7. Go to Advanced|Execute Command and umount your file system
     
      #umount /mnt/data
  8. Go to Disks|Mount Point|Management where you will see the status for your mount is “Error-Retry”, click on “Error-Retry” and the file system should once again be mounted.

If you use decide to use this method, it is a good idea to check all devices (disks) in your system and make sure they are properly mounted using labels.

Advanced Basic storage concept ⇒9.0.0.1
faq/0136.txt · Last modified: 2018/08/10 15:04 by zoon01