1. Store
  2. Apps
  3. Hardware
  4. Support
  5. Solutions

ClearFoundation

Forums
Welcome, Guest
Flexshares on secondary hard drive
(1 viewing) 1 Guest
Go to bottomPage: 123
TOPIC: Flexshares on secondary hard drive
**
#6769
Flexshares on secondary hard drive 3 Years, 2 Months ago  
Hi,

I'm currently in the tinkering and exploring stages with ClearOS. I've played with Ubuntu and various other distros in the past but, until now, none of them particularly caught my interest. That's all changed now. Anyway, having installed ClearOS and set up some flex shares I noticed that the flex shares and home folders are all on the primary hard drive. My primary hard drive is relatively small and I would much rather have these folders on the secondary (or external usb) drives. I've found a solution to this which hasn't required modifying any files and want to know whether this is an acceptable solution or if there are some caveats to it that I'm not aware of...

Basically my second hard drive is mounted into /mnt/share. (My externals are labelled and mounted into /mnt/backup and /mnt/media). I've created various folders in there which contain the same name as the home folders and the same names as the flex shares. Now comes the part that *seems* to work very well but may be breaking some unknown rules. I've deleted each home folder from /home and replaced them all with links to the folders of the same name that I've created in /mnt/share. I've also deleted all the flexshare folders from /var/flexshares/shares and replaced them with links to the folders of the same name that I've created in /mnt/share, /mnt/backup, /mnt/media, etc.

Is this an acceptable method of redirecting the home and flexshare folders or is there some easier and/or better method?
Cliff
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6771
Re: Flexshares on secondary hard drive 3 Years, 2 Months ago  
There is a much easier way, create the flexshare within the webconfig, then mount your hard drive to this flexshare folder This way you can have control over the folder pemrissions and still use the other access functions like FTP (FTP doesn't like symlinks)

Code:

mount /dev/sda1 /var/flexshare/shares/mysharename



It achieves the same as what you have posted, but doesn't require deletion of files / folders etc. But off hand I cannot think of another reason why your method shouldn't work...why did you delete and redirect the home user directories?
Tim Burgess
Moderator
Posts: 5802
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6772
Re:Flexshares on secondary hard drive 3 Years, 2 Months ago  
FTP doesn't follow sym links...if that doesn't bother you, you're probably OK.

If you want to tinker, try adding:

Code:


FlexshareDirCustom=ExternalDisk:/mnt/media



To the /etc/flexshare.conf file.

Then edit a Flexshare...you should see that you can change the default mount point (whereas, before it would be impossible to change from the default /var/flexshare/shares/<sharename>

Using this solution will provide full Flexshare compatibility, even with FTP.

Ben
Ben Chambers
Developer
Posts: 418
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6775
Re: Flexshares on secondary hard drive 3 Years, 2 Months ago  
Tim wrote:There is a much easier way, create the flexshare within the webconfig, then mount your hard drive to this flexshare folder This way you can have control over the folder pemrissions and still use the other access functions like FTP (FTP doesn't like symlinks)
I didn't realise I could do this. Definitely a much neater solution for pointing flex shares to use entire drives. If I modify my fstab file accordingly I assume it will all mount up correctly at boot time?

Tim wrote:why did you delete and redirect the home user directories?
I moved the home directories as they didn't offer much in the way of storage on the primary drive and wanted every user to have more storage in their own folders. I could do the same with flex shares I guess, but I like the fact that each user's home folder is only visible to that user on the network.

Ben wrote:If you want to tinker, try adding:

Code:

FlexshareDirCustom=ExternalDisk:/mnt/media


To the /etc/flexshare.conf file.

I've just tried that and it works great from the web ui. So I can use this to point to a subfolder if I want? Is there a way of adding more than one custom directory in this manner?

Thanks for your help and advice
Cliff
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6777
Re: Flexshares on secondary hard drive 3 Years, 2 Months ago  
More than one custom directory can be added by separating with the pipe character (|). Ex:

Code:


FlexshareDirCustom=ExternalDisk1:/mnt/media|ExternalDisk2:/mnt/media1|ExternalDisk3:/mnt/media2



B.
Ben Chambers
Developer
Posts: 418
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6778
Re: Flexshares on secondary hard drive 3 Years, 2 Months ago  
That's great - thanks. My only other question is what's the best way to move the home folders? I now know that I can mount external drives into those folders, but how would I move them all to subfolders of a second drive? Or should I just stick with the link method?
Cliff
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#7305
Re:Flexshares on secondary hard drive 3 Years, 2 Months ago  
That's a great tweak but is there a way to make it generic? I.e to create flexshares somewhere other than the default under /var? Or can the default be changed (how)? If not ... feature request!!

Cheers, keep up the good work.
AC
Andy
Junior Boarder
Posts: 22
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21051
Re:Flexshares on secondary hard drive 2 Years, 5 Months ago  
Tim thanks for the hint but a question... If you mount the drive using the commands: mount /dev/sda1 /var/flexshare/shares/mysharename, when the server reboots, the drive is un-mounted. Is there a way to get this to mount automatically?
RenaissanceHero
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21054
Re:Flexshares on secondary hard drive 2 Years, 5 Months ago  
Solved it.... just have add an entry into the fstab file found in /ext/
/dev/sba /var/flexshare/shares/mysharename ext3 defaults,noatime 0 0

then restart....

Seems to work. In case anyone else is fumbling around through the dark like I am.
RenaissanceHero
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#21062
Re:Flexshares on secondary hard drive 2 Years, 5 Months ago  
That's OK as long as you want to dedicate an entire volume to it, but doesn't cover if you'd like to make the flexshare root *part of* a different volume.
Andy
Junior Boarder
Posts: 22
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123
  get the latest posts directly to your desktop