Author Topic: How to use only the 2nd drive for user data  (Read 3907 times)

hermanvh

  • Regular Poster
  • **
  • Posts: 28
    • View Profile
How to use only the 2nd drive for user data
« on: September 07, 2010, 09:21:25 pm »
In my core I have 2 hard drives, the first one is used for the OS.
The 2nd drive is auto detected and has the LMCE directory structure.
I want the exposed samba shares point to the 2nd drive only, so users use the 2nd drive only.

I modified /etc/samba/smb.conf to do this which work fine, but this gets reset to the default configuration after a reboot (which I expected).

Any suggestions how let users (through samba) only access the 2nd drive?

Best regards,

Herman

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: How to use only the 2nd drive for user data
« Reply #1 on: September 08, 2010, 11:06:48 am »
Have you been finding that LMCE is using your OS drive and your OS drive only? I believe that LMCE is set up to just use the drive with the largest amount of free space. I have the same set up as you (hard drive wise) and have never had to manually alter anything.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

hermanvh

  • Regular Poster
  • **
  • Posts: 28
    • View Profile
Re: How to use only the 2nd drive for user data
« Reply #2 on: September 08, 2010, 02:54:06 pm »
Purps,

Thanks for your reply.
Linuxmce will use the largest disk, so no issue there.
But the users access the samba shares through there private pc's (laptops), if they are not carefull they store the data on the OS drive.
The user sees the following directory structure when accessing a samba share:

share --- videos ---- Media [39]     (my 2nd drive)
           |             +- Other subdirs
           |
           - music ----- Media [39]
           |             +- Other subdirs
          etc..

If data is not stored in Media [39] it does not end up on the 2nd drive.

I modified smb.conf to point to   /mnt/dev/Media [39]/user_1/data in stead of /home/user_1/data
which does what I need, but will get reset after a reboot.


How are you keeping user data seperate from the OS disk?

Best regards
Herman

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: How to use only the 2nd drive for user data
« Reply #3 on: September 08, 2010, 02:58:18 pm »
Sorry mate, I didn't read your post properly.

When I browse the files on the core through other PCs, I access the folders through "public" rather than individual user folders, and at some point (in "videos", "audio" I think?) you reach a symlink which links to the folder on the 2nd hard drive. So not sure I can help you.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

ladekribs

  • Veteran
  • ***
  • Posts: 86
    • View Profile
Re: How to use only the 2nd drive for user data
« Reply #4 on: September 08, 2010, 04:07:10 pm »
Hi,

If your users run windows You can map the share to a drive letter in explorer


BR Stefan

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: How to use only the 2nd drive for user data
« Reply #5 on: September 08, 2010, 06:04:06 pm »
I believe you can do a similar thing in ubuntu as well, by adding a "bookmark" in the side pane (assuming you are using nautilus, although I am sure it's a similar thing for other file browsers).
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: How to use only the 2nd drive for user data
« Reply #6 on: September 09, 2010, 03:36:34 pm »
Hermanvh, Please do not modify the samba configuration unless you know what you are doing. You will break the storage layer in spectacular ways, and I have half a mind to slap you silly.

Your samba changes will be overwritten at some point later, as this system is a self repairing appliance.

-Thom

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: How to use only the 2nd drive for user data
« Reply #7 on: September 10, 2010, 05:19:33 pm »
Hi Hermanvh,

I have a similar setup,
80Gb primary HDD --> OS
1.5TB Secondary HDD --> Media

Cant remember off hand how I got it working, but I didnt have to edit any config files,
I added yhe second HDD after the install of Linuxmce was completed. Then the orbiter on my Core/Hybrid came up and asked if I want to use the second HDD. If I recall corectly I chose as "FileServer Storage" or something similar.
After this was done I was able to browse to my Core from a WinXP pc and just map it to a network drive.

Im not at home at the moment, but will test it later and post my findings.

Karel