File System Mounting Examples

Since the system restores xiRAID Classic RAIDs after loading an appropriate Linux core and sending a RAID-restore command, to perform automatic mounting at system startup of file systems for these RAIDs, use one of the following instructions.

Tip:

To set up automatic mounting at system startup, we recommend using systemd.mount.

systemd.mount

Example: mounting xfs located on a RAID /dev/xi_raidname into /mnt/raid/ through systemd.mount:

  1. Create a file at /etc/systemd/system/ with the mount options.

    The file name must match the path of the mount directory with "/" replaced by "-" (for example, for /mnt/raid the file name will be "mnt-raid.mount").

    The example file /etc/systemd/system/mnt-raid.mount

    [Unit]

    Description=Mount filesystem on xiRAID Classic

    DefaultDependencies=no

    Before=umount.target

    Conflicts=umount.target

     

    [Mount]

    What=/dev/xi_raidname

    Where=/mnt/raid/

    Options=defaults

    Type=xfs

     

    [Install]

    WantedBy=multi-user.target

  2. Run the command

    # systemctl daemon-reload

    Enable automatic mounting at system startup:

    # systemctl enable mnt-raid.mount

    Start the service to mount the file system:

    # systemctl start mnt-raid.mount

/etc/fstab

Warning:

Make sure to only use the block device name, such as /dev/xi_raidname, and not the UUID or LABEL.

Example: mounting xfs located on a RAID /dev/xi_raidname into /mnt/raid/ through /etc/fstab:

The string from the file /etc/fstab

/dev/xi_raidname    /mnt/raid/   xfs   defaults  0   0