Troubleshooting OMV/Pi – Mounting and Renaming Drives

The Raspberry Pi 2 (and 3) apparently has a problem with mounting USB drives at boot. This is probably due to the slow spin-up speed of HDD-based externals and the relatively fast boot of the Pi.

How to fix a Pi mounting error:
  1. Edit the Pi boot config: sudo nano /boot/cmdline.txt
    1. Add this line:
      rootdelay=5
    2. Change the root delay time from 5 to whatever option works for you (probably between 0 and 60 is best)
    3. Reboot: sudo reboot
  2. Edit the system boot config: sudo nano /etc/rc.local
    1. Add these lines:
      sleep 30
      sudo mount -a
      exit
    2. Reboot: sudo reboot

The second method worked for me.

 


 

When I connected my drives, I also had different functions and roles for them. The way they are now, I have a mirror of a data drive and a SnapRAIDed backup. So I needed to change the drive names in order to identify the drives.

How to change drive names in Linux:
  1. Identify the drives mount points: sudo lsblk  or sudo mount or sudo fstab -l
  2. Identify the drive names: sudo lsblk or sudo xfs_admin -l /dev/sdb1
  3. Unmount the drive: sudo umount /dev/sda1
  4. Rename the drive: sudo ntfslabel /dev/sda1 NAME for NTFS or sudo xfs_admin -L NAME /dev/sda1 for XFS
  5. Remount the drive: sudo mount /dev/sda1

You must use the specific drive tool for the different file systems of drives. You cannot use an NTFS drive renaming tool on an ext4 drive, for example. See more at Source 2.

Source 1, 2, 3