Go Back   FlashFXP Forums > > > >

ioFTPD General New releases, comments, questions regarding the latest version of ioFTPD.

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-30-2013, 10:48 AM   #1
thedepartedone
Member
 
Join Date: Apr 2009
Posts: 30
Default Merge drives

i havent been able to find a thread that posted a solution to the question i have so not sure if this is the right section to post. one of my 500gb drives is almost full and i only use it to store tv eps. i know ioftpd has the ability to merge separate drives under the same path, ex :

drive 1 (500gb) ->>> folders would be F:/TV-Shows/ ---> under ioftpd would be /TV-Shows/
drive 2 (750gb) ->>> folders would be G:/TV-Shows/ ---> under ioftpd would be /TV-Shows/

although both separate drives, they both appear as a single folder/directory under iOFTPD... my question is, since the 500gb was the first drive i used and filled up completely, once i try to load anything to the tvshow folder will ioftpd be able dump any new material to the 750gb drive? in other words, is ioftpd smart enough to detect a full drive and then move all new content to the unused 750 that shares the same directory on the server? also, how will this be affected if i have a networked drive? will it still follow the same procedure?
thedepartedone is offline   Reply With Quote
Old 06-03-2013, 06:19 AM   #2
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default

Assuming you are running a recent version (7.5.3+) the BEST matching directory will be used for new files/folders or if they are all the same the FIRST one found. From an example in the Changelog:

Code:
      "C:\Games"   /Games
      "D:\Games2"  /Games

   And these real directories:
      C:\Games\Favorites
      C:\Games\New
      D:\Games2\New
      D:\Games2\New\Test
      D:\Games2\Old

   New files or directories will be created thus:
      /Games/New/A       -> C:\Games\New\A
      /Games/New/Test/B  -> D:\Games2\New\Test\B
      /Games/Favorites/C -> C:\Games\Favorites\C
      /Games/Old/D       -> D:\Games2\Old\D
The idea is to allow you to split dirs across the 2 drives and yet keep related things together. Thus you can keep all the seasons of a particular tv-show together on one drive including newly uploaded episodes, and do the same thing for another show on a different drive. If dropping everything into one big dir then just placing the new drive first will put everything new onto it. You might want to move a couple of shows to the new drive to make room for new episodes on the older drive if shows have their own subdir though...

I've got several posts, and lots of local notes, on how to handle this type of problem even better in the future though. For example, OnNewDir events in the future will have a way to specify where the directory should actually be created if more than one path is possible so scripts can customize it however you want. If the script doesn't want to handle it, I had a solution using a chattr setting that could determine where the new dir should go on a directory-by-directory basis. However I ran into issues when people use multiple .vfs files that mount things differently so I never released that feature...

Finally there is one other issue I should mention. There currently isn't a graceful way to force a directory to be moved across filesystems inside a merged directory. Say you just added a new disk, updated the .vfs to place it first, and then want to move half the shows to it. How would you do that inside the ftp (especially since it would preserve directory timestamps when done through the server)? My original idea was to enable appending :1, :2, etc onto names to force that vfs entry to be used to resolve the path. Users with the +V flag could even enable modes where extra listing information would help with this by automatically creating multiple entries for each subdir split across drives! I never finished the extra entry stuff though so I disabled the features, but you can use "list -alV" to get the group field to display which VFS entries were used to resolve each file/dir which is kind of handy if you have the .vfs file to reference.

HOWEVER, there are two easy way you can move dirs across filesystems when setting things up but it requires seeing extra paths. The first way is to create an admin.vfs file that's the same as default.vfs but ALSO mounts the directories separately. I.e. c:\Games onto /Games-C and d:\Games onto /Games-D as well as both dirs onto plain /Games. Now you can move dirs across disks easily by using the -Drive mountpoints. If you or other admins might use them for uploading make sure you add/modify the [SECTIONS] entry in the .ini file if you have a /Games section to match the new paths and update your bot configuration to do the same else you'll confuse people...

The other solution is probably better since I dislike using more than one .vfs file, because sooner or later you'll forget to mirror a change to admin.vfs. Instead of creating an admin.vfs file, just add the new entries directly to default.vfs and then turn the new dirs into private hidden dirs via site chattr +h <dir> "VM" . Now only VM flagged users (plus anyone else you specify) can see the /Games-C style dirs...

Hope that helps.
Yil is offline   Reply With Quote
Old 06-03-2013, 06:42 AM   #3
Yil
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
 
Join Date: May 2005
Posts: 1,194
Default

Oh, and if anybody has any better ideas on how to handle this thing feel free to comment. I'm not aware of any other server with a better solution either. They probably handle splitting things across disks when one gets full cleaner, but there is no way to force things to stay together on disks at all. I really like that because I can browse my local drives through explorer or via network shares instead of having to go through the FTP.

P.S. That brings up the one really obvious feature ioFTPD is missing and that has been on my TODO list for a long time... ioFTPD doesn't handle disks getting full very well and in the case of merged disks doesn't force new dirs to failover to a disk with lots of free space. I didn't want the server doing this itself because I think a script is better to handle the edge cases, hence the aforementioned OnNewDir placement idea... This becomes increasing useful when you consider that I assumed scripts (alas, poor ioYil hasn't been touched in forever) wouldn't actually wipe things(!) but instead just mark them for deletion or move them to a recycle bin for deletion when space was actually needed. I even freed up the "x" (execute) bits on files/dirs for just this purpose. This means that simply checking for disk space on a drive wouldn't yield the expected result if one disk had room but nothing ready to delete and the other was full but had lots of stuff ready to delete. The most obvious example would be two disks where after filling one up, then the other, you'd start deleting and filling the first one while deleting the oldest content...
Yil is offline   Reply With Quote
Old 03-28-2014, 06:11 PM   #4
aamazing
Junior Member
 
Join Date: Mar 2014
Posts: 2
Default

Is it possible to merge them in the !df command ?

!df
TOP1 > 100GB 50% free > 100GB 50% used > 200GB total
TOP2 > 0GB 0% free > 200GB 100% used > 200GB total

Wanna display
!df
TOP > 100GB 25% free > 300GB 75% used > 400GB total

In dZSbot.conf
###########################################
# FREE SETTINGS
##########################################
# Definition of hd devices, for free space. Format: "disk sections"
# The 'sections' are purely for cosmetic use.
# Note that you can use smb paths like //computername/share
set device(0) "D: TOP1"
set device(1) "E: TOP2"



Thank you for reading me
aamazing is offline   Reply With Quote
Reply

Tags
500gb, drive, drives, ioftpd, merge

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:26 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)