LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-20-2009, 05:45 PM   #1
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Rep: Reputation: Disabled
/home files repeated in root partition?


Hello all,
On my machine i have separate partitions for /boot,/home,/,and swap.
All formatted with ext3.
I have noticed my root partition is becoming larger than i expected.
df -h shows:

Code:
Pc1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              37G   20G   16G  57% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
udev                   10M  100K   10M   1% /dev
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/sda2              99M   21M   73M  23% /boot
/dev/sda5             161G   17G  137G  11% /home
Code:
Pc1:~# fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3acf3ace

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              14        5017    40194630    7  HPFS/NTFS
/dev/sda2   *           1          13      104391   83  Linux
/dev/sda3            5018        9880    39062047+  83  Linux
/dev/sda4            9881       31278   171879435    5  Extended
/dev/sda5            9881       31156   170899438+  83  Linux
/dev/sda6           31157       31278      979933+  82  Linux swap / Solaris

Partition table entries are not in disk order


Further investigation shows that the data in my /home partition is also repeated in the root partition?
Is this normal or do i have real problems with this system?
Your thoughts will be appreciated.

Regards.
The trooper.

Edit:I also find the same with /boot,repeated in the root partition.......

Last edited by the trooper; 03-20-2009 at 07:30 PM.
 
Old 03-21-2009, 05:06 AM   #2
asymptote
Member
 
Registered: Mar 2008
Posts: 236

Rep: Reputation: 37
Did you reinstall your / partition and if so did you edit your fstab to use the /home and /boot partitions that are separate from the / partition?
 
Old 03-21-2009, 07:22 AM   #3
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Original Poster
Rep: Reputation: Disabled
No i haven't reinstalled the / partition.
I partitioned the drive as shown above at install.
Here's the contents of fstab:

Code:
ade@Pc1:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda3       /               ext3    errors=remount-ro 0       1
/dev/sda2       /boot           ext3    defaults        0       2
/dev/sda5       /home           ext3    defaults        0       2
/dev/sda6       none            swap    sw              0       0
/dev/hda        /media/cdrom0   udf,iso9660 user,noauto     0       0
Any further ideas?

Regards.
The trooper.
 
Old 03-21-2009, 07:42 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Quote:
Originally Posted by the trooper View Post
On my machine i have separate partitions for /boot,/home,/,and swap. (..) Further investigation shows that the data in my /home partition is also repeated in the root partition? (..) Edit:I also find the same with /boot,repeated in the root partition.......
I don't know if, from what you have posted, I understand the question right, but separate partitions containing common mountpoints like /tmp and /home are always mounted on "/". So AFAIK the only way to find out if /home was duplicated to "/" would be to
0) find /home also in a subdir of "/" that is not a mountpoint (say something silly like "/root/home") or
1) run 'stat -c "%i %N" /*|sort -gk1' and check /home inode = 2 (meaning it's a dir on "/" and not a mountpoint) or to
2) umount /home and still find /home populated with files.
 
Old 03-21-2009, 07:50 AM   #5
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Original Poster
Rep: Reputation: Disabled
Unspawn,
Looks like you hit the nail on the head with option 0.
I am guessing that is why the / partition is at 20gb used or 57%.
 
Old 03-21-2009, 07:54 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Hmm. Interesting. Now to find out what happened when, I guess. Tried comparing timestamps?
 
Old 03-21-2009, 07:55 AM   #7
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Original Poster
Rep: Reputation: Disabled
Here's the out put of stat -c "%i %N" /*|sort -gk1:

Code:
ade@Pc1:~$ stat -c "%i %N" /*|sort -gk1
1 `/proc'
1 `/sys'
2 `/boot'
2 `/home'
11 `/lost+found'
12 `/cdrom' -> `media/cdrom'
13 `/lib64' -> `/lib'
14 `/initrd.img.old' -> `boot/initrd.img-2.6.26-1-amd64'
15 `/vmlinuz.old' -> `boot/vmlinuz-2.6.26-1-amd64'
16 `/lib32' -> `/emul/ia32-linux/lib'
17 `/initrd.img' -> `boot/initrd.img-2.6.28-amd64custom'
18 `/vmlinuz' -> `boot/vmlinuz-2.6.28-amd64custom'
247 `/dev'
310689 `/var'
637729 `/sbin'
1087409 `/usr'
1152817 `/bin'
1160993 `/selinux'
1259105 `/root'
1299985 `/media'
1692433 `/opt'
1741489 `/mnt'
1896833 `/srv'
1994945 `/tmp'
2158465 `/emul'
2191169 `/etc'
2346513 `/lib'
Sorry i should have put this in the last post.
 
Old 03-21-2009, 08:08 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Uh. No. Sorry. inode = 2 means it's a mountpoint. Running this should make it easier: 'stat -c "%i %n" /*|while read INO ENT; do [ $INO -gt 2 ] && echo "Dir $ENT" || echo "Mountpoint $ENT"; done'.
 
Old 03-21-2009, 08:17 AM   #9
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Original Poster
Rep: Reputation: Disabled
Thanks Unspawn,the last command gives me:

Code:
ade@Pc1:~$ stat -c "%i %n" /*|while read INO ENT; do [ $INO -gt 2 ] && echo "Dir $ENT" || echo "Mountpoint $ENT"; done
Dir /bin
Mountpoint /boot
Dir /cdrom
Dir /dev
Dir /emul
Dir /etc
Mountpoint /home
Dir /initrd.img
Dir /initrd.img.old
Dir /lib
Dir /lib32
Dir /lib64
Dir /lost+found
Dir /media
Dir /mnt
Dir /opt
Mountpoint /proc
Dir /root
Dir /sbin
Dir /selinux
Dir /srv
Mountpoint /sys
Dir /tmp
Dir /usr
Dir /var
Dir /vmlinuz
Dir /vmlinuz.old
Can you explain what this means?
 
Old 03-21-2009, 08:44 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Quote:
Originally Posted by the trooper View Post
Mountpoint /home

Can you explain what this means?
/home is not a directory in "/" but is mounted on "/". Since you opted for mounting /home that is a Good Thing. If you persist in option #0 w/o being able to post "evidence" then I guess it's time to get conceptual...
 
Old 03-21-2009, 09:04 AM   #11
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
/home is not a directory in "/" but is mounted on "/". Since you opted for mounting /home that is a Good Thing. If you persist in option #0 w/o being able to post "evidence" then I guess it's time to get conceptual...
If i can post anything else that may be useful or relevant let me know.
Thanks.

The trooper.
 
Old 03-21-2009, 11:57 AM   #12
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
How about unmounting /home as root and doing "du -a / |sort -n |tail" to see where the stuff is going?
 
Old 03-21-2009, 12:13 PM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Quote:
Originally Posted by the trooper View Post
If i can post anything else that may be useful or relevant let me know.
Well, basically I offered some options of which you chose
Quote:
Originally Posted by the trooper View Post
Looks like you hit the nail on the head with option 0.
but checking it shows
Quote:
Originally Posted by the trooper View Post
Mountpoint /home
ergo that
Quote:
Originally Posted by the trooper View Post
I have noticed my root partition is becoming larger than i expected.
and
Quote:
Originally Posted by the trooper View Post
the data in my /home partition is also repeated in the root partition
is not due to "/home being repeated as a part of "/"". And that's why I dropped the concepts hint. And like I already suggested (and makuyl repeated) umounting /home should show it is not. Notice your "/" contains both /usr (which grows fat with applications and related files if one installs much and without design) and /var (same but with respect to caching data and logs) and /tmp (crud, if no tmpwatch or equivalent is used).
 
Old 03-21-2009, 03:53 PM   #14
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Stretch Amd64
Posts: 1,477

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
/home is not a directory in "/" but is mounted on "/". Since you opted for mounting /home that is a Good Thing. If you persist in option #0 w/o being able to post "evidence" then I guess it's time to get conceptual...
Just a little too cryptic for me.....
I shall look into the suggestions made.

Thanks for your help.
Regards.
The trooper.

Last edited by the trooper; 03-21-2009 at 03:59 PM.
 
Old 03-21-2009, 03:58 PM   #15
asymptote
Member
 
Registered: Mar 2008
Posts: 236

Rep: Reputation: 37
Yeah I'm learning a lot from this thread as well. Good thread. Looks like good stuff to know for system administration.
 
  


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
I am creating a website Server what is the best partition for /var /root /home etc. RMLinux Linux - Newbie 3 12-01-2008 08:46 AM
Can I move /home partition under root partition arijit_2404 Linux - General 3 07-05-2007 01:01 AM
moving /home /root & /var to new partition CrashedAgain Linux - General 8 11-24-2005 11:44 AM
Had to rebuild /root partition. now /home link broken snakecreepsdown Linux - Newbie 1 05-16-2005 11:56 AM
Does anyone here have a separate /root and /home partition? Kramer Linux - General 12 03-17-2004 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:30 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration