LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FS Distribution Question on Automatic Install (https://www.linuxquestions.org/questions/linux-newbie-8/fs-distribution-question-on-automatic-install-857809/)

pneeko 01-21-2011 10:18 AM

FS Distribution Question on Automatic Install
 
Hi,

Is there an advantage in the way a lot of standard Linux installation utilities split the root file-system and the home file-system on two separate but relatively equal-sized partitions?

For example, when I put fedora on an 80GB disk, it automatically gave the root file-system 32GB and home 30GB and the swap 8GB of space.

However, since my home file-system has a directory with 28GB of files in it, why is my root file-system reading 100% usage?

Is the home FS overlaid on top of the root FS?

Is there an advantage to doing this?

Traditionally, over the years I just made a boot partition (50mb or so), a root partition (90% of the disk space) and a swap (4%-5% disk space). I don't know whether my speculation makes you nauseous, but I think it may have to do with the way fragmentation accumulates over time or the number of redundant disk accesses are made... not sure...

AlucardZero 01-21-2011 10:56 AM

(a) Because if you reinstall, you don't have to wipe out /home, only /.
(b) The 28GB in /home is unrelated to the space used in /
(c) Assuming they're separate mount points like you say, no, /home is not overlaid on /

Please post output of the following commands (use code tags):
Code:

df -h
df -i
mount
du -skx /*


wpeckham 01-21-2011 11:47 AM

Partitions
 
The upgrade / backup considerations are key, but there are other good reasons.
By making the home folders their own partition you avoid having to use quotas to prevent a user from crashing the system by filling up disk space required for service operation, logging, etc.

My personal preference on servers is to have partitions for boot, root / , tmp, home, and var. If there is a primary data, application, or virtualization area then a partition for that. For a desktop this scheme is overkill, and the specific details depend upon what I am using the server for, what the risk factors are, and what my OS and hardware restrictions are.

The installation standards are there because they are a reasonable compromise for the average user who does not want to mess with custom partitioning and server tuning. The major developers for each distribution must make some reasonable guesses based upon their target market and the properties of the basic application load: I think that they generally do a pretty good job.

As you learn more and have more need to tune, you use the defaults less. If you do not NEED to tune your space, you use the defaults.

pneeko 01-21-2011 12:30 PM

Here's my output:

df -h
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      35G  6.9G  26G  21% /
tmpfs                3.0G  272K  3.0G  1% /dev/shm
/dev/sda1            485M  30M  430M  7% /boot
/dev/mapper/VolGroup-lv_home
                      30G  27G  611M  98% /home

df -h
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      35G  6.9G  26G  21% /
tmpfs                3.0G  272K  3.0G  1% /dev/shm
/dev/sda1            485M  30M  430M  7% /boot
/dev/mapper/VolGroup-lv_home
                      30G  27G  611M  98% /home

df -i
Code:

Filesystem            Inodes  IUsed  IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
                    2293760  235368 2058392  11% /
tmpfs                765404      6  765398    1% /dev/shm
/dev/sda1            128016      36  127980    1% /boot
/dev/mapper/VolGroup-lv_home
                    1933312    7607 1925705    1% /home

mount
Code:

/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/VolGroup-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
gvfs-fuse-daemon on /home/pneeko/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=pneeko)

du -skx /*

Code:

8684        /bin
19589        /boot
4        /cgroup
316        /dev
37344        /etc
du: cannot access `/home/pneeko/.gvfs': Permission denied
28100076        /home
160980        /lib
34228        /lib64
16        /lost+found
4        /media
4        /mnt
0        /null
4        /opt
du: cannot access `/proc/5744/task/5744/fd/4': No such file or directory
du: cannot access `/proc/5744/task/5744/fdinfo/4': No such file or directory
du: cannot access `/proc/5744/fd/4': No such file or directory
du: cannot access `/proc/5744/fdinfo/4': No such file or directory
0        /proc
4        /PSIchat
348        /root
14336        /sbin
0        /selinux
4        /srv
0        /sys
192        /tmp
6336364        /usr
414196        /var

If say for example I do a re-installation, and most of my files are in /home, and /home is already on its own partition, will disk druid know to install around it without having to back everything up?

Thanks for your replies, puts it into much better perspective for me.

AlucardZero 01-21-2011 02:04 PM

Ok.. your root filesystem is not reading 100% usage. I don't see why you said that in your first post.

If you reinstall, the installer will probably detect the existing partitions, but it's up to you to confirm that you don't overwrite /home.

pneeko 01-22-2011 09:35 AM

1 Attachment(s)
All right, I was just going by this utility's report:

Attachment 5918

This is from a dedicated Linux installation (Not a VM). Earlier, I ran into a problem where I increased the size of the /home partition, and copied a big file into it, and I got an error saying that the root file-system was full.

I booted off a Gparted ISO to make the changes.

I was doing all the file operations in gnome using nautilus. Is that my problem? Should I go back and try it from the virtual console?
Both were fedora distros (versions 13 & 14).


All times are GMT -5. The time now is 07:45 PM.