A quick question: SATA as IDE


Recommended Posts

It is actually pretty easy.

 

Create a file in the config folder on your flash drive named smb-extra.conf

in it put the following three lines

[Tower]

    path = /mnt/user

    read only = No

 

Then, you can stop and re-start unRAID, or you can get SAMBA to re-read its config files by typing this on the command line

smbcontrol smbd reload-config

 

This will create a "shared" drive named "Tower" having sub-folders for all your other top-level directories.

 

To make it easier, cutting and pasting these next 4 commands will create the file and re-read the config for you.

echo "[Tower]" >/boot/config/smb-extra.conf

echo "    path = /mnt/user" >> /boot/config/smb-extra.conf

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

smbcontrol smbd reload-config

 

Have fun.   You will probably need to re-select the server from network-neighborhood for windows to show you the new share.  It sometimes does not re-scan the available shares instantly. (By default, I think it only scans network neighborhood every 15 minutes or so)

 

If you want to name the share something else, just edit the name between the "[" and "]" characters.   Use an editor that does not put carriage-returns on the ends of the lines if you edit the file, or process it through fromdos.  If you cut and paste the "echo" commands above, this will not be an issue.

 

Joe L.

 

Very nice, tried it and love it ;-)

 

Joe, your instructions worked fine and I am very happy with it - this enables me to assign one Unraid Server to a single Driveletter in Windows.

One question left: If I use this Mapping in windows:

- Will it use the usershares with all it's rules if I copy something to it?

- Will it properly change the file- & directorystructure if I rename or move things within this mapping?

e.g.: Moving files or directories from one usershare to another usershare - will it update all disks and their filesystems properly?

 

thanks and regards,

Guzzi

Good questions...

I really don't know the answers. 

 

If you were to create a new "top" level folder, I don't know if user-shares space allocation will work until you stop and re-start the unRAID server.   I'm pretty sure the directories and files will be fine, but I don't know if file-allocation rules are applied if you create the new top level shares outside of unRAID's normal interface.   I know it applies "default" rules (or, at least it say it does in the syslog), so perhaps the default rules would apply.

 

As far as moving from e from one user-share to another, I expect it will work exactly as normal.

 

Keep us informed of your results as you use your array.  You've not changed the user-shares, just the samba view of them, so odds are good things will work as expected.

 

I have no idea where a newly created file would reside if you stored it at the "root" of your new "Tower" share.  It might just be in RAM, and not protected at all.  It might be on one of the physical disks...(if it was, it would be protected)  Until you know the answer, don't store a 4Gig ISO image there, especially if you only have 1Gig of RAM.  ;D

 

Edit: I created a new file at /mnt/user, it ended up written to /mnt/disk8 on my array, (the disk with the most free space on my array)

so... it looks like it is OK to create that big file...

Joe L.

 

Link to comment
  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

It is actually pretty easy.

 

Create a file in the config folder on your flash drive named smb-extra.conf

in it put the following three lines

[Tower]

    path = /mnt/user

    read only = No

 

Then, you can stop and re-start unRAID, or you can get SAMBA to re-read its config files by typing this on the command line

smbcontrol smbd reload-config

 

This will create a "shared" drive named "Tower" having sub-folders for all your other top-level directories.

 

To make it easier, cutting and pasting these next 4 commands will create the file and re-read the config for you.

echo "[Tower]" >/boot/config/smb-extra.conf

echo "    path = /mnt/user" >> /boot/config/smb-extra.conf

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

smbcontrol smbd reload-config

 

Have fun.   You will probably need to re-select the server from network-neighborhood for windows to show you the new share.  It sometimes does not re-scan the available shares instantly. (By default, I think it only scans network neighborhood every 15 minutes or so)

 

If you want to name the share something else, just edit the name between the "[" and "]" characters.   Use an editor that does not put carriage-returns on the ends of the lines if you edit the file, or process it through fromdos.  If you cut and paste the "echo" commands above, this will not be an issue.

 

Joe L.

 

Very nice, tried it and love it ;-)

 

Joe, your instructions worked fine and I am very happy with it - this enables me to assign one Unraid Server to a single Driveletter in Windows.

One question left: If I use this Mapping in windows:

- Will it use the usershares with all it's rules if I copy something to it?

- Will it properly change the file- & directorystructure if I rename or move things within this mapping?

e.g.: Moving files or directories from one usershare to another usershare - will it update all disks and their filesystems properly?

 

thanks and regards,

Guzzi

Good questions...

I really don't know the answers. 

 

If you were to create a new "top" level folder, I don't know if user-shares space allocation will work until you stop and re-start the unRAID server.   I'm pretty sure the directories and files will be fine, but I don't know if file-allocation rules are applied if you create the new top level shares outside of unRAID's normal interface.   I know it applies "default" rules (or, at least it say it does in the syslog), so perhaps the default rules would apply.

 

As far as moving from e from one user-share to another, I expect it will work exactly as normal.

 

Keep us informed of your results as you use your array.  You've not changed the user-shares, just the samba view of them, so odds are good things will work as expected.

 

I have no idea where a newly created file would reside if you stored it at the "root" of your new "Tower" share.  It might just be in RAM, and not protected at all.  It might be on one of the physical disks...(if it was, it would be protected)  Until you know the answer, don't store a 4Gig ISO image there, especially if you only have 1Gig of RAM.  ;D

 

Edit: I created a new file at /mnt/user, it ended up written to /mnt/disk8 on my array, (the disk with the most free space on my array)

so... it looks like it is OK to create that big file...

Joe L.

 

 

Hi Joe,

I am not planning to create directories on the toplevel - will create those always in the webgui. Also I am not planning to store files there - although both would be interesting if it would break anything - seems not according your tests.

Instead I just wanna use this smb-mapping to access all usershares via one driveletter.

I might need some more tests with smaller files - but so far it seems to work as expected. Just afraid to break something.

Since the usershareview is an aggregated view of the content of several disks (resp. their filesystems) I was wondering what would happen, if I move a directory into another tree that is distributed on several disks. Or even more: What happens, if there are duplicate filenames residing? usershare only shows the "1st one" - what happens, if such a folder will be moved? And what happens, if it will be moved to another usershare? What happens, if it will be moved to a usershare, that is only residing on "other disks"? Does it create the directorystructure on those disks to show them appropriately?

Will this affect the cache drive and the "Mover-Process"? Means: If a structure has been moved - and a directorystructure disappeared - will the mover still work? Or will the move also be performed on the files that are still on the cache drive (before nightly move)? - which would be a more logical behaviour for the user...

Sorry, lot's of questions, that I have put to myself, but fearing to break my data - maybe I will do some tests with unimportant files later...

cheers, Guzzi

Link to comment

Hi Joe,

I am not planning to create directories on the toplevel - will create those always in the webgui. Also I am not planning to store files there - although both would be interesting if it would break anything - seems not according your tests.

Instead I just wanna use this smb-mapping to access all usershares via one driveletter.

Sounds fine.

I might need some more tests with smaller files - but so far it seems to work as expected. Just afraid to break something.

Since the usershareview is an aggregated view of the content of several disks (resp. their filesystems) I was wondering what would happen, if I move a directory into another tree that is distributed on several disks.

This question applies even if they were two user-shared folders on the LAN.  I'm guessing normal allocation rules you have in place are used.

Or even more: What happens, if there are duplicate filenames residing? usershare only shows the "1st one" - what happens, if such a folder will be moved?
You are living dangerously... normally, moving a file into a directory where it already exists will overwrite the original.  If you have duplicate files in parallel directories, don't just move folders... you might not end up with what you wanted.
  And what happens, if it will be moved to another usershare?
It has nothing to do with how the folders are shared on the LAN, it is all in the user-share file-system Tom created.  These same file-system logic is used no matter how you move the files.
What happens, if it will be moved to a usershare, that is only residing on "other disks"? Does it create the directorystructure on those disks to show them appropriately?
You'll need to test this.  Pretty sure the directory structure will be created based on your split level rules.  If not enough space exists, a move might fail.  (How gracefully it fails is a different matter... Hopefully, it will not delete the original until the move is successful... but test first with copies of files, not with files that are important.

Will this affect the cache drive and the "Mover-Process"? Means: If a structure has been moved - and a directorystructure disappeared - will the mover still work?

The mover will move it to the original directory it was supposed to be in... It will create the directory if needed, it will not move a file to a new folder just because you renamed it... (Unless Tom's logic is smart enough to rename the folder on the cache drive too when you rename the user-share...  Since I don't have a cache drive assigned, you'll need to test that one.
Or will the move also be performed on the files that are still on the cache drive (before nightly move)? - which would be a more logical behaviour for the user...

Sorry, lot's of questions, that I have put to myself, but fearing to break my data - maybe I will do some tests with unimportant files later...

cheers, Guzzi

As I said, let us know what it does.

 

Joe L.

Link to comment

Hi Joe,

I am not planning to create directories on the toplevel - will create those always in the webgui. Also I am not planning to store files there - although both would be interesting if it would break anything - seems not according your tests.

Instead I just wanna use this smb-mapping to access all usershares via one driveletter.

Sounds fine.

I might need some more tests with smaller files - but so far it seems to work as expected. Just afraid to break something.

Since the usershareview is an aggregated view of the content of several disks (resp. their filesystems) I was wondering what would happen, if I move a directory into another tree that is distributed on several disks.

This question applies even if they were two user-shared folders on the LAN.  I'm guessing normal allocation rules you have in place are used.

Or even more: What happens, if there are duplicate filenames residing? usershare only shows the "1st one" - what happens, if such a folder will be moved?
You are living dangerously... normally, moving a file into a directory where it already exists will overwrite the original.   If you have duplicate files in parallel directories, don't just move folders... you might not end up with what you wanted.
   And what happens, if it will be moved to another usershare?
It has nothing to do with how the folders are shared on the LAN, it is all in the user-share file-system Tom created.  These same file-system logic is used no matter how you move the files.
What happens, if it will be moved to a usershare, that is only residing on "other disks"? Does it create the directorystructure on those disks to show them appropriately?
You'll need to test this.  Pretty sure the directory structure will be created based on your split level rules.  If not enough space exists, a move might fail.  (How gracefully it fails is a different matter... Hopefully, it will not delete the original until the move is successful... but test first with copies of files, not with files that are important.

Will this affect the cache drive and the "Mover-Process"? Means: If a structure has been moved - and a directorystructure disappeared - will the mover still work?

The mover will move it to the original directory it was supposed to be in... It will create the directory if needed, it will not move a file to a new folder just because you renamed it... (Unless Tom's logic is smart enough to rename the folder on the cache drive too when you rename the user-share...  Since I don't have a cache drive assigned, you'll need to test that one.
Or will the move also be performed on the files that are still on the cache drive (before nightly move)? - which would be a more logical behaviour for the user...

Sorry, lot's of questions, that I have put to myself, but fearing to break my data - maybe I will do some tests with unimportant files later...

cheers, Guzzi

As I said, let us know what it does.

 

Joe L.

 

To be honest: I do not want to test this on my "prod-data". I think I will set up a testsystem with my sparelicense and do the tests there - might be a good thing for the future anyway and I can use my 120G drives lying around and being useless for other things.

btw: the "nice thing" seems to be (?), that moves between usershares and structures do NOT move the filedata itself - so the "usersharefilesystemdriver" seems just to be handling the directorystructures. Thus I don't think the allocation rules even could be used. But as you know: A broken filesystemstructure is not a funny thing - I just tried to recreate a superblock on a 1TB drive without success, that's enough ;-)

But lot's of questions, will set up a separate system to test ... ("beat the curiousity...")

cheers, Guzzi

PS: I didn't want to "hijaak" this thread, sorry - feel free to move it elsewhere with a better fitting headline - at least might also be interesting for others...

Link to comment
  • 3 weeks later...

Well, I can report that when doing this trick, user level security is ignored; any user share created will be visible to all users and everyone can read/write regardless of settings. Disk shares doesn't show up either.

 

While we're on the subject, what's the purpose of being able to specify 'Vaild' and 'Invalid' users? If I choose 1 valid user, wouldn't everyone else be invalid by default and vice versa?

And 'Exceptions': exception to what? Does a user on the exceptions list have the opposite rights of the export mode? Or will that user just abide to some default rules we can't set through the webgui?

 

These questions are probably stupid, but it doesn't make much sense to me...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.