XFileSharing Pro - Help me move file

Message
Author
filehost
Posts: 33
Joined: Apr 27, 2012 10:37 am

Help me move file

#1 Postby filehost » Apr 27, 2012 10:43 am

Hello !

I had 1 dedicate server with 2 partition. But when upload FTP always full on one partition (primary)

Sample:
/dev/sda1 <--- 1Tb
/dev/sda2 <---- 1Tb

/dev/sda1 always full (100%) while /dev/sda2 free space 99%

Now. i want move file manual.

I saw /www/cgi-bin/uploads/00000/ (on primary partition)
I want move folder 00000 to /www/cgi-bin/ser2/uploads/00000

So, How i can execute SQL command for move file.

What is 00000 folder ? It's important ?

00000 folder in phpmyadmin what is colum in table ?

I very happy if anyone help me.

Thanks.

ankurs
Posts: 1054
Joined: Mar 10, 2009 2:34 am

Re: Help me move file

#2 Postby ankurs » Apr 27, 2012 11:03 am

i am guessing here

check xfs config for files per folder setting (default is i think 5000)

00000 should have files with fileid less than that , so run a query where fileid is less than 5000 and serverid is x

---
edit, seems i read your question wrong

are you moving all files from that fileserver or just that folder ?

if its all files then you just need to copy it over and change path in congfig file

folders are not stored in db

filehost
Posts: 33
Joined: Apr 27, 2012 10:37 am

#3 Postby filehost » Apr 27, 2012 11:34 am

All file or just 00000, 00001

00000 folder mean store 5000 file. Right ? files_per_folder => 5000

Case, before 00000 folder full 5000 file, after. User delete more file then file_id is change ?

And if override folder 0000 from disk1 to 00000 of disk2 then system process id OK ? (> 5000 file)

Can you give me SQL command for execute it?

Thanks

ankurs
Posts: 1054
Joined: Mar 10, 2009 2:34 am

#4 Postby ankurs » Apr 27, 2012 11:51 am

disk2 is used as a different fs ?

why do u need to move files just from 00000 folder


take backup before trying below query

UPDATE `databasename`.`Files` SET `srv_id` = '2' WHERE `Files`.`file_id` <5000 AND `Files`.`srv_id` =1

2 is new serverid
1 is old serverid

filehost
Posts: 33
Joined: Apr 27, 2012 10:37 am

#5 Postby filehost » Apr 27, 2012 12:03 pm

Thanks your help

I count files in folder 00000, 000001, 00002 on disk1 then saw only ~3000 files

So this SQL is OK for only 00000 folder moved. (case only move 00000 folder to disk2)

ankurs
Posts: 1054
Joined: Mar 10, 2009 2:34 am

#6 Postby ankurs » Apr 27, 2012 3:47 pm

filehost wrote:So this SQL is OK for only 00000 folder moved. (case only move 00000 folder to disk2)
i think so, but it would be better if staff can confirm it

filehost
Posts: 33
Joined: Apr 27, 2012 10:37 am

#7 Postby filehost » Apr 27, 2012 6:25 pm

I think:
Folder 00000 file ID 1 - 5000
Folder 00001 file ID 5001 - 10.000
............

Is right ? Please anyone have exp help me.

ankurs
Posts: 1054
Joined: Mar 10, 2009 2:34 am

#8 Postby ankurs » Apr 28, 2012 6:07 am

filehost wrote:I think:
Folder 00000 file ID 1 - 5000
Folder 00001 file ID 5001 - 10.000
............

Is right ? Please anyone have exp help me.
yes, thats what i think

you can search a file from 00001 folder and see the fileid of it; should be between 5001 - 10.000