LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-24-2012, 04:05 PM   #1
slimsz
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Rep: Reputation: 0
Question strange problem, Duplicate /Home dir


Hello

i have server running CentOS with cpanel
and recently i installed a backup script to backup account
and the script back's up the account in /home dir
but i noticed that there are no backups created because there are 2 home dir

Code:
root@server [/]# ls -al
total 493K
drwx--x--x  12 root root 4.0K Feb 24 22:56 home
drwx--x--x   3 root root 4.0K Feb  7 20:59 home
and i dont know how to fix this , its not different name so i delete it .

and when i do #cd to the home dir this is what i get

Code:
root@server [/home]# ls -al
total 344K
drwx--x--x 12 root   root   4.0K Feb 24 22:56 .
drwxr-xr-x 24 root   root   4.0K Feb 24 15:26 ..
-rwxr--r--  1 root   root   8.0K Feb 24 16:46 aquota.user
drwxr-xr-x  5 root   root   4.0K Sep 24 13:27 .cpan
drwxr-xr-x  3 root   root   4.0K Feb 24 00:40 .cpanm
drwx------  4 root   root   4.0K Feb 24 00:40 .cpcpan
drwx------  4 root   root   4.0K Feb  8 02:37 cpeasyapache
drwx------  2 root   root    16K Feb  5 23:04 lost+found
lrwxrwxrwx  1 root   root     15 Feb  7 21:00 onmymood -> /home /onmymood
note that onmymood is an account on server (the only one) and in the home dir its showing as symlink , not actual dir !!!


do you guys know what this might be and how can i solve it

additional info: server uses Software RAID, if that helps .

thank you

Last edited by slimsz; 02-24-2012 at 04:07 PM.
 
Old 02-24-2012, 04:14 PM   #2
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,746

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
Looks like one of your home directories has a space appended to the name, ie "home" vs "home ". In "home" there's a simlink called onmymood which points to "home /onmymood" (the "home " with the space). I'm not sure why the system is set up like this, who did the install? It should be easy enough to merge the two folders and just keep the regular one (without the space).
 
Old 02-24-2012, 04:54 PM   #3
slimsz
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Original Poster
Rep: Reputation: 0
we got the server from datacenter partitioned
and then we installed cpanel and other required softwares

we dont know who caused this

but can you tell me how to merge them

thx
 
Old 02-24-2012, 05:00 PM   #4
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,746

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
First I would call up the people who set up the system and make sure that there's not some special reason they did it that way.

For example, I noticed a "lost+found" directory in /home/. This is typically found in the highest level of a separate filesystem, implying that "/home/" actually lives on a separate disc on your system than everything else (including "/home /"). What is the output of "df -h"?

Last edited by suicidaleggroll; 02-24-2012 at 05:01 PM.
 
Old 02-24-2012, 05:29 PM   #5
slimsz
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Original Poster
Rep: Reputation: 0
here is the output of df command

Code:
root@server [~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3            1016G  623G  342G  65% /
/dev/sda2             508M   47M  437M  10% /boot
/dev/sda5             1.7T  1.5G  1.6T   1% /home
/usr/tmpDSK           485M  200M  260M  44% /tmp
root@server [~]#
and the strange thing it shows that home is using only 1.5G

but look at the output of this command

Code:
root@server [/home/onmymood]# du -ch | grep total
615G    total

Last edited by slimsz; 02-24-2012 at 05:35 PM.
 
Old 02-24-2012, 06:03 PM   #6
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,746

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
Yes, because the onmymood in "/home/" is just a symlink pointing to "/home /onmymood" (the "/home /" with the space). So that 615G actually lives on "/home /", not "/home/", so it shows up under the usage for "/".

You now need to decide whether you want the 615GB being used by onmymood's home directory to be located on the 1TB /dev/sda3 partition (where it sits now), or the 1.7TB /dev/sda5 partition (with the rest of /home/). Same goes for anything else you have in /home/, do you want it on the 1TB /dev/sda3, or the 1.7TB /dev/sda5? Whether or not you merge your two "home" directories and where you put the result will depend on how you want your system to be configured when it's all said and done.

Last edited by suicidaleggroll; 02-24-2012 at 06:07 PM.
 
Old 02-24-2012, 06:09 PM   #7
slimsz
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Original Poster
Rep: Reputation: 0
so the "/home /" is a folder inside "/"
and "/home/" is the original home partition ?


so can we do something like
Code:
mv -R /home\/onmymood /home/onmymood
or this will mess up the things ?
 
Old 02-24-2012, 06:14 PM   #8
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,746

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
You're mostly right

"/home /" is a folder inside "/", which lives on /dev/sda3
"/home/" is the normal home folder, and it lives on its very own partition at /dev/sda5 (which is a separate 1.7TB partition on the same 3TB disc as /)

Code:
rm /home/onmymood
mv /home\ /onmymood /home/onmymood
Will move the 615GB onmymood folder from /dev/sda3 onto /dev/sda5 along with everything else that's in /home/. This might not be what you actually want though, that will leave you with a mostly empty 1TB "/", and a 35% full 1.7TB "/home/". Anything that points to the original location of onmymood at "/home /onmymood" will also break when you do this. You should also run an "ls -a /home\ /" to see if that's the only folder located in that directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find .ssh dir in home dir bobby953 Linux - Newbie 5 03-09-2009 04:00 AM
Removing a Specific Dir From All /home Dir carlosinfl Linux - General 4 06-09-2008 01:08 PM
duplicate/bad blocks well scanning on home dir... only1gameguru Linux - General 3 08-28-2004 03:28 AM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 07:54 PM
samba:home dir cache problem wiredX Linux - Networking 1 01-26-2004 10:02 AM


All times are GMT -5. The time now is 03:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration