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.

[SOLVED] cache drive missing from Samba shares

Featured Replies

I had an issue where I ran out of memory and I think unRAID killed Samba. I did a Samba stop and Samba start, and at some point attempted to use unMenu to stop the array.

 

After rebooting, the cache drive mounts, and I can still access is via telnet, all the files are present, but it appears empty over Samba.

 

Syslog attached.

 

Thanks in advance for your help,

 

Neil.

syslog-2011-04-09.txt

I had an issue where I ran out of memory and I think unRAID killed Samba. I did a Samba stop and Samba start, and at some point attempted to use unMenu to stop the array.

 

After rebooting, the cache drive mounts, and I can still access is via telnet, all the files are present, but it appears empty over Samba.

 

Syslog attached.

 

Thanks in advance for your help,

 

Neil.

You'll probably need to reboot to get it back showing as usual.
  • Author

I had an issue where I ran out of memory and I think unRAID killed Samba. I did a Samba stop and Samba start, and at some point attempted to use unMenu to stop the array.

 

After rebooting, the cache drive mounts, and I can still access is via telnet, all the files are present, but it appears empty over Samba.

 

Syslog attached.

 

Thanks in advance for your help,

 

Neil.

You'll probably need to reboot to get it back showing as usual.

 

I've rebooted three times. I will try again.

I have the same issue. All the folders are there but no files are listed when looking over the network using SAMBA. I'm in the process of upgrading my server and starting with a fresh install. Will post back afterwards if anything changes.

 

Amerzel

  • Author

Doing this fixed it for me:

 

i did some more googling, and found this one liner to sort out my file permissions:

find /mnt/disk[1-4] -type f -exec chmod 644 {} \;

 

Taken from http://lime-technology.com/forum/index.php?topic=10461.0

 

Thanks,

Amerzel

 

How would that affect /mnt/cache ? This is a script for /mnt/disk1-4 isn't it?

 

I also aready did a chmod -R 777 /mnt/cache/

You'll need:

find /mnt/cache -type f -exec chmod 644 {} \;

  • Author

You'll need:

find /mnt/cache -type f -exec chmod 644 {} \;

 

Unfortunately, that made no difference, even after rebooting.

 

This may display the problem better -- I can copy files from the cache drive to a drive in the array over telnet and open them fine over samba once they are on the other drive, but can't access them directly on the cache drive over samba:

 

2le2t14.jpg

 

I've also tried accessing them from 3 different Windows machines, in case it was a client issue -- it's not.

Post the output of

ls -l /mnt/cache/Backups/

  • Author

Post the output of

ls -l /mnt/cache/Backups/

 

root@MICRO:/mnt/cache# ls -l /mnt/cache/Backups/
total 178786
-rwxrwxrwx 1 root root 60327668 2011-03-21 18:37 Firefox\ 3.6.14\ (en-US                                                                                                                             )\ -\ 2011-03-21.pcv*
-rwxrwxrwx 1 root root 55216833 2011-03-29 18:34 Firefox\ 3.6.14\ (en-US                                                                                                                             )\ -\ 2011-03-21.rar*
-rwxrwxrwx 1 root root 67347021 2011-03-31 16:40 Firefox\ 4.0\ (en-US)\                                                                                                                              -\ 2011-03-31.pcv*

 

I'm guessing it's a problem with how samba is mounting the cache drive.

 

The cache drive is 320GB, so this is wrong:

 

2lmq5jc.jpg

root@MICRO:/mnt/cache# ls -l /mnt/cache/Backups/
total 178786
-rwxrwxrwx 1 root root 60327668 2011-03-21 18:37 Firefox\ 3.6.14\ (en-US                                                                                                                             )\ -\ 2011-03-21.pcv*
-rwxrwxrwx 1 root root 55216833 2011-03-29 18:34 Firefox\ 3.6.14\ (en-US                                                                                                                             )\ -\ 2011-03-21.rar*
-rwxrwxrwx 1 root root 67347021 2011-03-31 16:40 Firefox\ 4.0\ (en-US)\                                                                                                                              -\ 2011-03-31.pcv*

 

I'm guessing it's a problem with how samba is mounting the cache drive.

 

The cache drive is 320GB, so this is wrong:

 

2lmq5jc.jpg

 

Yep it's the way Samba is mapping the file permissions to Windows file attributes (I really need to write a wiki article on this!).  Background on what is happening is available here.

 

Note the below commands will reset the permissions for ALL files and directories on your cache drive.  If that is not acceptable (ie some directories/files need different permissions) you need to know that before running those commands as there is no undo and modify the commands as appropriate...

 

To fix current files:

for files:

find /mnt/cache/ -type f -exec chmod 700 {} +

for dirs:

find /mnt/cache/ -type d -exec chmod 711 {} +

 

I'm not sure what caused the file permissions to get changed on your drive, this usually crops up when mounting a drive via CIFS/SMB on the unRaid server and copying files over.  Anyway once you run those commands above the file permissions should look like

-rwx------

and similar for directories.

 

Windows can't get network drive sizes right to save its life.  MS should just give up on showing the number considering it is wrong 99.9999999% of the time :P

  • Author

That made no difference. I don't think it's Samba permissions, it must be a Samba mounting issue, but I don't know enough about Linux to fit it myself.

 

Where are the Limetech support people?

Post the output of

testparm -s

 

If the permissions changed when you ran the find commands, samba should be exposing the files, if the permissions didn't change you got other problems.

 

Official support is via email, Limetech monitors the boards some but it you want official support you have to request it.

  • Author

Post the output of

testparm -s

 

If the permissions changed when you ran the find commands, samba should be exposing the files, if the permissions didn't change you got other problems.

 

Official support is via email, Limetech monitors the boards some but it you want official support you have to request it.

 

I checked the permissions afterwards, they did change, but cache is still appearing empty.

 

I know most of the people helping out here are unpaid unRAID users, but someone from Limetech should come here occasionally to provide support when those users are stumped. This is not an unofficial forum, it's hosted on the lime-technology.com domain.

testparm.txt

Map hidden and map system are both enabled so having the file perms set to 777 would definitely cause the files on the cache share to be exposed as hidden files to a windows box.  Try mounting the cache/Backups share as a drive on the windows box

net use x: \\MICRO\cache\Backups

then get the attributes of some of the files

attrib Firefox*

and post the result.  I'm guessing your going to see something like

A  SH        Z:\newfile.txt

showing the hidden and system flags set.  You shouldn't need to restart samba for the permissions to change but you do need to refresh your view (F5) if you had the share open in an explorer window.

  • Author


X:\>net use y: \\MICRO\cache\Backups
System error 55 has occurred.

The specified network resource or device is no longer available.


X:\>net use y: \\MICRO\cache
The command completed successfully.


X:\>dir y:
Volume in drive Y is cache
Volume Serial Number is 0453-043D

Directory of Y:\

07/04/2011  09:12    <DIR>          .
10/04/2011  08:06    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  439,262,756,864 bytes free

 

 

You got me.  Even with the smbd process being terminated abnormally, the config shouldn't have gotten jacked and since you've removed the world execute bit there's no reason for samba to mark the files as hidden.  Hopefully someone else has another idea.  I am curious to know what the problem ends up being...

Try entering "chmod 711 /mnt/cache/Backups" to make Backups visible to Windows.

  • Author

Try entering "chmod 711 /mnt/cache/Backups" to make Backups visible to Windows.

 

No dice. The whole drive is missing from Samba. I think we can chmod until we're blue in the face, and it'll do nothing.

Your server is having trouble with the share config files

 

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Backup cache drive_files.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Buffalo.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Cyrus (2010) Blu-ray.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Keith Richards - Life part1.mp3.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Movies (DVD).cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Movies (HD DVD).cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Movies (HD).cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Music (Blu-ray).cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Music (DVD).cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Music (HD).cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/P.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/P-new.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Popcorn Hour.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Recycled.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/TV.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/TV (DVD).cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/Transmission.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/True Grit (1969) Blu-ray.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/cache.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/iTunes Backup.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/removed from Unstoppable.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/sabnzbd before 6.cfg: No such file or directory - assigning defaults

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/share.cfg: No such file or directory - assigning defaults

 

Did you create a cache.cfg file yourself?

 

Do you have a user share, ie a top level directory on any data disk, that is called cache?

 

You're also doing things like storing "True Grit (1969) Blu-ray" in the top level of a disk which creates a user share.

 

Peter

 

  • Author

Your server is having trouble with the share config files

 

Apr  9 19:48:20 MICRO emhttp: get_config_idx: fopen /boot/config/shares/cache.cfg: No such file or directory - assigning defaults

 

Did you create a cache.cfg file yourself?

 

Do you have a user share, ie a top level directory on any data disk, that is called cache?

 

You're also doing things like storing "True Grit (1969) Blu-ray" in the top level of a disk which creates a user share.

 

Peter

 

That was it! Well done. There was a folder on the cache drive called "cache". I deleted it and stopped and started the array and all is well. Thanks!

 

There are a load of user shares that are created because they are on the cache drive. Is there a way of excluding the cache drive from user shares? I couldn't see anything in the settings.

 

If you are using the cache as temp storage try making a single share for it. You can make a hidden directory starting with a period (.temp for example) to use as temp storage and it will never be moved to the array. Just set Windows so it will show hidden files.

 

Peter

There are a load of user shares that are created because they are on the cache drive. Is there a way of excluding the cache drive from user shares?

No, in fact, its primary role in life is to merge its contents, including new top level folders as new user-shares.

About all you can do is set each of those "new" user shares as not exported, or hidden on the user-shares page.

 

Joe L.

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.