Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plugin: Drive Mount (simple features required)

Featured Replies

this plugin lets you control and mount any drive, which is not part of the array. I use this to mount my app drive at bootup and for easy control of the mount point via the web gui.

this is especially useful, if you want to use an extra disk for your plugin data directories. this plugin ensures, that the disk is mounted at the time, the plugins want's to access it. (at least all plugins i've tested and those that are reasonably coded...)

 

this should work with most drive formats.  (to write ntfs formatted drives, ntfs-3g must be installed)

 

to install place the plg file into /boot/config/plugins

then reboot the server or run installplg /boot/config/plugins/drive_mount.plg

 

Download:

https://raw.github.com/Benni-chan/unraid_plugins/master/drive_mount.plg

 

Configuration:

Your drives are listed on the plugin page (settings -> mount drives)

[*]you need to set the drive name. this will be used as the mountpoint (don't use any special chars). the drive will be mounted in /mnt/DRIVE_NAME. The same name will be used for network shares.

[*]set enable drive to yes and hit apply

[*]to share the drive over network, select export -> yes. (so far, only public, not hidden shares are supported)

 

 

NOTE: This is the start of a complete rewrite. I've updated the UI of the plugin and fixed several bugs. The new UI requires the simple features plugin (the core plugin is fine. you will get more features, if you also install disk_health).

  • Replies 94
  • Views 21.6k
  • Created
  • Last Reply

Every time I try to boot my server with this plugin enabled I get the following message on the console and the boot process stops dead in it's tracks.

 

/boot/config/plugins/drive_mount/drive_mount.sh: line 57: /var/local/emhttp/disks.ini: no such file or directory

 

I don't know if it matters but my config file contains

 

[scsi-SATA_WDC_WD10EACS-00_WD-WCAU40837909]

DRIVE_NAME="sde"

DRIVE_MOUNT="/mnt/stuff"

DRIVE_MOUNTED="enable"

DRIVE_ENABLED="enable"

  • Author

ah, damn...

 

i'll look at it (didn't restart my server while testing. was a little lazy...)

 

edit: have to rewrite quite a bit, because the disks.ini hasn't been created yet when the plugin is installed.

i try to have a new version ready later today or tomorrow.

  • Author

new version, now the plugin should work at boot time.

 

for update, you have to delete /boot/config/plugins/drive_mount/drive_mount.sh

the plugin installer can't overwrite it, so it needs to be deleted manually (afaik)

Works great now.  Thanks!

I have ntfs-3g when I plug my usb drive in the plugin can see it but it won't mount it,

mounting works fine from the command line just not through the plugin,

nothing in the logs either.

 

  • Author

i'll add a correct recognition for drive formats in the next version.

currently working on enabling share over smb of the mounted drives

afp would be awesome also.  Would be happy to test it if you don't have access to a Mac.

  • Author

i'm using a mac too.

but i have to check, how i can add custom shares to afp

smb is easy

I may be talking out my ass but I think you just have to muck with /etc/netatalk/AppleVolumes.default

  • 2 weeks later...

Any chance you've been able to look at why ntfs drives don't map ?

 

Cheers

 

  • 5 weeks later...

I am using this plugin and when I try to access the share it requires a username and password. I can access all my other shares without any trouble so I am not sure where the issue is.

  • 4 weeks later...

I just wondering, would this plugin allow me to install another USB stick, and mount it to use as my plugin/data storage location so it doesn't get overwritten on startup, and isn't sitting on a drive keeping it spun up all the time?

 

I know it would kill the flash drive faster, but how fast?  I don't mind replacing it every year or 3 if necessary.  it's probably cheaper than keeping a disk spinning and by extension, my whole system running all the time?

 

One would want to back it up regularly, so when the flash fails, you're not totally hosed.

 

I don't know, I'm still very new to all this, so I'm sort of just thinking out loud about this.

  • Author

actually, i don't really know :) haven't tested yet, if it recognize usb stick correctly.

it works with usb hdds (if i remember correctly)...

 

(an update for this plugin with share configuration is pretty high up on my todo list, but no release date yet)

 

(there was only one reason why i created this plugin: to mount my hdd for usenet apps :) )

actually, i don't really know :) haven't tested yet,

(there was only one reason why i created this plugin: to mount my hdd for usenet apps :) )

 

hehe, great minds... :)

  • 1 month later...

Hi Benni-chan,

 

As I mentioned in your sb/sab/cp thread I just reformated my drive to reiserfs format so I tried using this again (I was getting nowhere with an NTFS drive).

 

When I install the plugin I get 2 drives.  The only USB drive I have is the unraid one, so why is there an entry for USB?  Surely it would be already allocated as boot.

 

# drive_mount configuration

[scsi-SATA_WDC_WD1200JD]

DRIVE_NAME="sde"

DRIVE_MOUNT="/mnt/Apps"

DRIVE_MOUNTED="enable"

DRIVE_ENABLED="enable"

[usb-Sa]

DRIVE_NAME=""

DRIVE_MOUNT="/mnt/Apps"

DRIVE_MOUNTED="enable"

DRIVE_ENABLED="enable"

 

Is /mnt/Apps the correct infromation to put in to mount an Apps drive?  /mnt/disk/Apps didn't work.

 

And just one more question, but is there a way to access this drive from a Windows machine over the network like SNAP does?  I can share it via unmenu, but it appears as sde1, and can't be accessed.  It would be nice to put a folder in there to be watched so that SABNZB picks it up and downloads it.

  • Author

please run this command in your console and post the output (it should list all drives connected to your system)

ls /dev/disk/by-id/* -l | grep -v -- "-part" | grep -v -- "wwn" | grep -v -- "ata" | cut -c60-

 

it is important, that the directory in which you mount the drive, doesn't exist already. if there is no /mnt/drive/Apps, it should work.

I recommend using only one subdirectory in /mnt, like /mnt/Apps (on my server, i use /mnt/usenet).

 

to access that drive via network, you have to edit the smb-extra file in /boot/config

here is my file, as an example:

 

[usenet]
   path = /mnt/usenet
   read only = no
   guest ok = yes

max protocol = SMB2

 

when i have time to do it, this script will also allow easy sharing of mounted drives...

to access that drive via network, you have to edit the smb-extra file in /boot/config

here is my file, as an example:

 

[usenet]
   path = /mnt/usenet
   read only = no
   guest ok = yes

max protocol = SMB2

 

when i have time to do it, this script will also allow easy sharing of mounted drives...

 

Works good!

Thank you Benni-chan  :)

 

  • 3 weeks later...

I'm trying to get this to work for me as well, I have a 1tb hitachi I'd like to mount for app purposes and here is the result of of the drive list command you asked us to run above

 

root@Tower:/boot/config/plugins/drive_mount# ls /dev/disk/by-id/* -l | grep -v -- "-part" | grep -v -- "wwn" | grep -v -- "ata" | cut -c60-
scsi-SATA_Hitachi_HDS7210_JP2911HQ13SEJA -> ../../sdn
scsi-SATA_SAMSUNG_HD204UIS2H7J90B821071 -> ../../sde
scsi-SATA_SAMSUNG_HD204UIS2H7J90B821094 -> ../../sdd
scsi-SATA_SAMSUNG_HD204UIS2H7J90B821101 -> ../../sdf
scsi-SATA_SAMSUNG_HD204UIS2H7J9KB804713 -> ../../sdb
scsi-SATA_SAMSUNG_HD204UIS2H7J9KB804714 -> ../../sdm
scsi-SATA_SAMSUNG_HD204UIS2H7J9KB804715 -> ../../sdk
scsi-SATA_SAMSUNG_HD204UIS2H7J9KB804716 -> ../../sdj
scsi-SATA_SAMSUNG_HD204UIS2H7J9KB804717 -> ../../sdl
scsi-SATA_SAMSUNG_HD204UIS2H7JD2B505199 -> ../../sdi
scsi-SATA_SAMSUNG_HD204UIS2H7JD2B505200 -> ../../sdc
scsi-SATA_SAMSUNG_HD204UIS2H7JD2B505209 -> ../../sdg
scsi-SATA_ST3300831AS_5NF1KY6T -> ../../sdh
usb-PNY_USB_2.0_FD_UTYM2864015312-0:0 -> ../../sda

 

here is my drive_mount.cfg contents

root@Tower:/boot/config/plugins/drive_mount# cat drive_mount.cfg
# drive_mount configuration
[scsi-SATA_Hitachi_HDS7210_JP2911HQ13SEJA]
DRIVE_NAME="sd"
DRIVE_MOUNT="/boot"
DRIVE_MOUNTED="enable"
DRIVE_ENABLED="enable"
[scsi-SATA_ST3300831AS_5NF1KY6T]
DRIVE_NAME="sdh"
DRIVE_MOUNT=""
DRIVE_MOUNTED="disable"
DRIVE_ENABLED="disable"

 

and here is what it looks like in the menu's in the plugin.

pluginresults.jpg

 

This is how it looks after installing the plugin without making any changes myself, I had installed it before but the drive wasn't formatted, now it's formatted with reiserfs and the plugin re-installed and this is what I get, any suggestions on how to fix it?

I have similar issue

 

1 drive already mounted the thing says but i just installed it

 

# drive_mount configuration
[scsi-SATA_WDC_WD10EADS-00_WD-WCAU4C232503]
DRIVE_NAME="sdp"
DRIVE_MOUNT=""
DRIVE_MOUNTED="disable"
DRIVE_ENABLED="disable"
[scsi-SATA_WDC_WD10EADS-00_WD-WCAU4D176083]
DRIVE_NAME="sd"
DRIVE_MOUNT="/boot
/mnt/cache"
DRIVE_MOUNTED="enable"
DRIVE_ENABLED="enable"
[scsi-SATA_WDC_WD5000AAKS-_WD-WCATR3564669]
DRIVE_NAME="sde"
DRIVE_MOUNT=""
DRIVE_MOUNTED="disable"
DRIVE_ENABLED="disable"
[usb-Swissbit_mi]
DRIVE_NAME="issbit_mi"
DRIVE_MOUNT=""
DRIVE_MOUNTED="disable"
DRIVE_ENABLED="disable"

 

would like to see the expansion to the samba changes through the script also :)  just like to do things trough a gui ;)

 

yeah for now I'm using unmenu's ability to mount a drive but if it's /dev/sd assignment changes it will break the apps I have using that path, I think I may have to learn some new tricks to do this right =) which is never a bad thing I suppose.

I think you need to use /mnt in the setting for mount directory. And as per Benni-Chan, use a directory that doesn't already exist and use only one subdirectory.

Example:

/mnt/apps

/mnt/usenet

/mnt/stuff

 

Sent from my DROID2 using Tapatalk

 

I think you need to use /mnt in the setting for mount directory. And as per Benni-Chan, use a directory that doesn't already exist and use only one subdirectory.

Example:

/mnt/apps

/mnt/usenet

/mnt/stuff

 

Sent from my DROID2 using Tapatalk

 

The problem is it can't get that far, if I try to make a change to the config file it just gets overwritten.  If I try using the gui it doesn't happen, it just fails to make any changes.  When I load the gui it says the drive is already active so I can't change the path, if I try to deactivate it to be able to change the path it won't let me change it.  not to mention the drive is not just /dev/sd, it's missing the letter designation.

 

yeah for now I'm using unmenu's ability to mount a drive but if it's /dev/sd assignment changes it will break the apps I have using that path, I think I may have to learn some new tricks to do this right =) which is never a bad thing I suppose.

Is it still mounted in unmenu? If so, you might try unmounting in unmenu first.

 

Sent from my DROID2 using Tapatalk

Was never mounted in unmenu till after trying to use the plug in.  Formatted unmounted disk /dev/sdn with partition /dev/sdn1, unmenu not even running after a reboot.  Install the plugin and immediately shows as I listed above, showing the drive as (/dev/sd), mount point of /boot and saying it's enabled.  Try to make changes and as described, nothing changes, remove plugin reboot and use unmenu to mount and share the drive for now, because it at least worked for me.  Would prefer to use gui plugin and a name for the mount point other than the "likely to change disk designation" /dev/sdn1

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.