|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Seemless Space reclamation
I have a photogallery system and will soon be totally out of space. Everything is on /home which has 100M left. /home2 has 5.9G available. (I have root access btw)
This is the directory structure: ~photodomainname/www/photos/userid/picname.jpg where there are multiple userids and picnames of course. An awful lot!! Permissions wise, "photos" is 777. "userid" is owned by "nobody" and "drwxr--r--" All of the "picname"s are owned by "nobody" and are "-rwxr-xr-x" So...first I keep forgetting the command to get the total amount of space taken up recursively by ALL files underneath the "photos" directory. Then, is there a way to make the "photos" directory to be on the other partition w/o moving it? And then doing a symbolic link? Or do I need to make a copy, then delete the original and do a symbolic link? Any suggestion on the best way to do this? And if it isn't too much trouble, to put the commands step by step? I know this board likes people to look up things and "think" but I'm asking for baby steps on this one because it is a production system with probably a hundred thousand live images and I don't want to make a mistake affecting tens of thousands of people (and my *** heh heh). I once looked up how to do a symbolic link, created the link over the original file (or something), deleted it and wound up deleting the original. I'm terrified of getting this wrong and it's way too much data to properly back it up to another directory...and to make it worse, my host does not have proper backups (until next month)!!! Thanks so much! Last edited by dwh : June 14th, 2002 at 12:10 PM. |
|
#2
|
|||
|
|||
|
the way (no guarantee you donīt fīup the system!!!) is:
cd /home2 cp -dpR /home/* . // this could overwrite files that are already in /home2 !!! // for not losing any data you should keep the old ones and delete them once you know everything works as expected: mv /home /old_home // and the "magic" symlink: ln -s /home2 /home if you donīt have a backup, you should really wait till next month. i take no responsibility for any of your actions nor do i guarantee this does not destroy all your data!!!
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Seemless Space reclamation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|