Jump to content

Been asked before, but i cant seem to get a reliable drive outside of array...


eruji

Recommended Posts

Warning: Noob to Linux and command based things in general

 

I have the free edition of Unraid (5.0 RC5) and have the array working great. Would love to add a drive outside of array for applications etc.

 

What ive tried:

Original SNAP: cant seem to find my partitions. (even though ive tried creating them NTFS from windows, ext3 from linux, reiserfs from unmenu)

 

New GUI SNAP: doesnt seem to work at all

 

Unmenu: i can format the drive, mount and share but its not automatic

 

Other: Tried formating the drive and applying a label and tried modifying the go script with some success ( i think i could mount it but could not get write permissions connecting from windows, i tried to modify the samba config file with no luck)

 

 

So what is the preferred method, am i missing something. I thought the by label route would be best since i think ive seen my drive show up as both hdb1 and sdb1 after reboots.

 

If i can get the unmenu method to auto mount and share on reboot that would be preferrable since its the furthest ive gotten so far. But will the changing \dev\ID be a problem?

 

 

Link to comment

If you know how to format, mount and share the drive manually. Just add the mount command to you /boot/go (think that's the location) script and the share info in smb.extra.conf (I'm guessing at file names as I'm not near my PC) and it should work after reboot.

 

Sent from my SGH-I727R using Tapatalk 2

Link to comment

If you know how to format, mount and share the drive manually. Just add the mount command to you /boot/go (think that's the location) script and the share info in smb.extra.conf (I'm guessing at file names as I'm not near my PC) and it should work after reboot.

 

Sent from my SGH-I727R using Tapatalk 2

Basically, correct.  Once formatted and a file-system created (you only need do that once.)

You can mount via the /dev/disk/by-id/xxxxxxxxx-part1 name.

 

add these lines to the config/go file:

mkdir /mnt/app_drive

mount -t reiserfs /dev/disk/by-id/ata-ST31500341AS_9VS4F16T-part1 /mnt/app_drive

echo '[app_drive]' >>/boot/config/smb-extra.conf

echo ' path = /mnt/app_drive' >>/boot/config/smb-extra.conf

echo ' read only = No' >>/boot/config/smb-extra.conf

smbcontrol smbd reload-config

 

Of course, you'll need to first use unMENU to format the drive, and then use YOUR drive's by-id name to its "-part1"entry.  (typically it is based on model/serial number, so it should be pretty easy to identify when you list the directory with

ls -l /dev/disk/by-id/

 

 

 

 

Link to comment

Okay, so i formatted the drive with unmenu to reiserfs

 

found the device-part1 that it created

and modified the go file.

 

I verified that the device exists and is mounted after a reboot, but cannot see it from windows. As a side note im connecting from win 7 machine with a different user than "root". If i try to browse Tower i get  password prompt which no matter what i enter never goes away.

 

Here is the new part of my go file:

 

#eruji mount drive and share via smb

mkdir /mnt/app_drive

mount -t reiserfs /dev/disk/by-id/ata-WDC_WD800BB-00FJA0_WD-WCAJ93444609-part1 /mnt/app_drive

echo '[app_drive]' >>/boot/config/smb-extra.conf

echo ' path = /mnt/app_drive' >>/boot/config/smb-extra.conf

echo ' read only = No' >>/boot/config/smb-extra.conf

smbcontrol smbd reload-config

 

This wipes the smb-extra.conf file so the Global part is replaced, is that correct? as a test i also added the global above, but still could not see the shares.

 

I would like to be able to browse and write to the app_drive share. For some reason i cannot even see my flash and array drives at this point. Im pretty sure its because of the smb file.

Link to comment

This wipes the smb-extra.conf file so the Global part is replaced, is that correct?

There is not normally any smb-extra.conf file unless you created such a file, but even if there was, the three "echo" commands APPEND the three lines to the bottom of the existing smb-extra.conf contents. It will not overwrite existing contents.

(in "shell" syntax, the double ">>" redirect appends to existing contents, a single ">" truncates if a file exists, or creates if not, then appends.)

 

One machine on your LAN has the role of "master browser" and is responsible for keeping track of the available shares.

That process only scans the LAN every 15 minutes or so, so it can take a bit before a given share is seen by your PC.

 

As far as paswords and user ids go, you can add additional lines in the smb-extra.conf file for the user list.  (I do not know the exact syntax,  but you can try adding two more lines to the "go" file, after the three "echo" statements already added and rebooting once more

echo 'browseable = yes' >>/boot/config/smb-extra.conf

echo 'public = yes' >>/boot/config/smb-extra.conf

 

Worst case, look in the /etc/samba/smb-shares.conf file for how a passworded share is configured and duplicate its syntax.

Joe L.

Link to comment

After struggling more with this, i realized that it really wasnt working. The problem was that for what ever reason my drive partition was not showing up here

/dev/disk/by-id/xxxxxxxxx-part1 name.

 

I could see the drive:

/dev/disk/by-id/xxxxxxxxx-part name

 

but not the partition.

 

So what i ended up doing is using fdisk to delete and recreate the partition. (dont think that was necessary)

 

Formatted it in the ext3 format with the label app_drive

 

added this to my go file:

 

#Mount app_drive

mkdir /mnt/app_drive

mount -L app_drive /mnt/app_drive

mount -o remount,rw /mnt/app_drive 2>&1

 

(the mount commands were copied from what unmenu does when mounting drives, not sure if the second mount command is necessary or if it can be consolidated into the first)

 

added this to my smb-extra.conf:

 

[app_drive]

  path = /mnt/app_drive

  comment = App Drive

  browseable = yes

  # Public

  public = yes

  writeable = yes

 

Joe, it seems in the version of unraid i have the smb-extra.conf is persistent so appending the code everytime was duplicating on every boot.

 

after a few reboots to verify it was working, i installed sab and sickbeard and setup an install and data directory on the app_drive, finally working. Thanks for all the help.

Link to comment

Joe, it seems in the version of unraid i have the smb-extra.conf is persistent so appending the code everytime was duplicating on every boot.

 

after a few reboots to verify it was working, i installed sab and sickbeard and setup an install and data directory on the app_drive, finally working. Thanks for all the help.

Oops... you are absolutely correct in every version of unRAID. config/smb-extra.conf is persistent

 

Those echo statements need only be done once from the command line, or, you can edit the config/smb.conf file with an appropriate editor that does not put MS-DOS style carriage returns on the ends of the files.

Link to comment
  • 4 months later...

After struggling more with this, i realized that it really wasnt working. The problem was that for what ever reason my drive partition was not showing up here

/dev/disk/by-id/xxxxxxxxx-part1 name.

 

I could see the drive:

/dev/disk/by-id/xxxxxxxxx-part name

 

I've recently upgraded from 4.7 to RC10, and with SNAP not working anymore, and mount drive not reloading on reboot I went looking for an alternative, and found this. :)

 

I've got exactly the same problem as above.  I was having all sort of permission problems with only some folders, and had a backup so I just started again, and ran a pre-clear on the drive, and then formated it to reiserfs via unmenu.

 

The problem I have is when I go into putty, and type "ls -l /dev/disk/by-id/" I don't get a -part1 listed for the drive. :(  This is all I get.

 

lrwxrwxrwx 1 root root  9 2013-01-13 14:27 ata-WDC_WD1200JD-00GBB0_WD-WMAET2169779 -> ../../hdb

 

I tried adding manually running the command that I entered in the go script as per JoeL's help above and this is the result I got.

 

root@Tower:~# mount -t reiserfs /dev/disk/by-id/ata-WDC_WD1200JD-00GBB0_WD-WMAET2169779-part1 /mnt/apps                                                                                                                                      mount: special device /dev/disk/by-id/ata-WDC_WD1200JD-00GBB0_WD-WMAET2169779-part1 does not exist

 

So why don't I have a part1?  And how can I mount this drive via the go script?

 

FYI I have mounted the drive successfully via Benni-chan's mount drive plugin, but it don't remount on reboot.  I really need an apps drive that survives a reboot because Sickbeard, SAB & my DNLA server run off this drive.  At the moment the upgrade is at a standstill.

Link to comment

Hi Lacehim,

 

Even though this was not that long ago i have a hard time remembering what i did exactly to get it working. I think what i basically did was format the drive and give it a name, i dont recall the command to do that. For whatever reason, i could not get the partition to show up as ****-part1. But the nickname would work. So my prior post would show how to get it all working but its missing the format command that also gives it a name. I took a look at my dev/disk/by-id and still dont see the partition for my drive, but its there under dev/disk/by-label. Try giving your partition a label and then have unraid mount it. Good luck.

Link to comment

Archived

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

×
×
  • Create New...