Announcement

Collapse
No announcement yet.

Reboot loses /storage on external USB drive

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reboot loses /storage on external USB drive

    Hi - I'm hoping someone can help me find what is likely to be something simple, but beyond my Linux knowledge.
    I have just installed VB 2.4 on a Dell 64-bit PC. I followed all the steps to add my external USB drive to /storage, and updated /etc/fstab to make the addition persist. The steps I followed are here https://wiki.vortexbox.org/how_to_us...ve_for_storage
    All went well at first - Logitech Media Server Version: 7.9.1 - 0.7.20180404git1522249619 scanned and built my library and I was in business.
    Then I rebooted after removing the monitor and keyboard to run headless, and no music files were in /storage - I could only see the /storage on the internal hard disc.

    This is what is in my /etc/fstab:
    Code:
    #
    # /etc/fstab
    # Created by anaconda on Fri Nov  6 01:22:25 2015
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    UUID=a0008081-aa57-4fad-bf0b-2f64f1070a8a /                       ext4    defaults        1 1
    UUID=33251abe-7e37-4570-b7e5-0a53a3886361 /boot                   ext4    defaults        1 2
    UUID=3b66a5aa-1768-41da-bed4-cdcd304746ca swap                    swap    defaults        0 0
    # 
    /dev/sdb1 /storage ntfs defaults 0 0
    #
    And now when I try to umount /storage and mount the external USB drive I get this error message:
    Code:
    # mount /dev/sdb1 /storage
    Mount is denied because the NTFS volume is already exclusively opened.
    The volume may be already mounted, or another software may use it which
    could be identified for example by the help of the 'fuser' command.
    The log file from the latest boot is attached.

    My workaround is clunky - comment out the USB mount line in /etc/fstab, boot again, umount /storage and mount the external usb drive once more.

    Can anyone point me to the solution for this, so that a reboot will successfully load LMS and the music on the external drive? I've got the same setup working on another ancient Dell PC, but with VB 2.3 - and that restarts correctly.
    All help will be greatly appreciated!
    Attached Files

  • #2
    Suggest adding the UUID to your /etc/fstab file.
    Here's a copy of mine:

    UUID=a0008081-aa57-4fad-bf0b-2f64f1070a8a / ext4 defaults 1 1

    UUID=33251abe-7e37-4570-b7e5-0a53a3886361 /boot ext4 defaults 1 2

    UUID=3b66a5aa-1768-41da-bed4-cdcd304746ca swap swap defaults 0 0

    UUID=703c0188-7f1d-4986-b5bc-117c2d8953bf /storage ext4 defaults 2 2

    Comment


    • #3
      Thanks for the suggestion. If I've understood correctly where Google led me with UUIDs, they are the specific Id, like a mac, for a device. And from what I've seen in the log file, Linux has found the device, correctly but not mounted it to /storage. I'll try with the UUID for the drive and see if that makes a difference. The wiki 'how to do it' page mentions UUIDs and points out the differences between using the USB device number and the UUID. Still worth a try, though.

      Comment


      • #4
        Originally posted by Sully View Post
        Suggest adding the UUID to your /etc/fstab file.
        Here's a copy of mine:
        Same result as before for me, so no change - I'm now struggling to find some other solution with help from Google...

        Comment


        • #5
          Since a little tweak makes the system run as it should, I can keep going by:
          • Boot the Dell 64-bit machine running VB 2.4
            (and without the "USB mount" line in /etc/fstab)
          • Log in as root, and type "mount /dev/sdb1 /storage"
          • Logitech Media Server is then happy with my music library accessible on the external drive.
          Since typing one line is all that is required, I thought it should be possible, maybe even easy, to create a start-up script to issue the mount command. I'm now stuck on that!

          Can anyone tell me if it is sensible for me to try and create a systemd service to issue the mount command during start-up?

          If it's sensible, I'll post here what I've managed to work out so far, and maybe someone can pinpoint why I'm getting Error code 203, no such file or folder, when ExecStart goes looking for the target shell script file.

          And of course, the original question remains - why does the boot process correctly identify the USB drive, appear to mount it to /storage (line 1532 of the log file attached to post #1), but the data on the USB drive is not accessible in /storage? If I can fix that, I'll be very happy!

          Comment


          • #6
            This could be a solution. Maybe not elegant, but it seems to work.

            Edit crontab to include this line
            Code:
            @reboot mount /dev/sdb1 /storage
            Now, after rebooting, all the music on the USB external drive is found in /storage, Logitech Media Server is happy - and so am I!

            Comment

            Working...
            X