LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   using an empty ex4 partition (https://www.linuxquestions.org/questions/linux-newbie-8/using-an-empty-ex4-partition-874600/)

vikrang 04-12-2011 12:44 PM

using an empty ex4 partition
 
I have Ubuntu in one partition . The partition is about to be full..I have a spare partition which I thought could merge with the existing..But I guess it is not possible.

I am slightly confused with the way linux stores the files. There is a root directory and within that there are boot ,Var,tmp and home..

Suppose I install an application from a package manager , I really do not understand where the path is ...Supose I want to store certain new applications in the spare partition , how do I tell the system? Also while installing it doesnt give a choice regarding the path ...All I see is a couple of files exracted and when it completes , it sits on the menu neatly.

From a storage perspective how do you gain control? Say in Win , normally any package will ask for the path which you can customize..How do you plan the storage of files in Linux?

stress_junkie 04-12-2011 12:53 PM

You don't want to start installing applications all over the place. It is better to use the default locations. Even in Windows it is better to use the defaults than to put applications in unusual places because it makes it easier to diagnose problems.

Linux and UNIX mount data partitions on a directory that already exists in the root directory tree. When a partition is mounted on a directory then that directory is called the mount point. You can create a directory for each partition that you want to mount or you can use a directory that already exists.

Many people would mount a data partition on the /home directory.

You could create a directory under your home directory and mount a data partition there or you could create a directory under /mnt and mount a data partition there.

andrewthomas 04-12-2011 12:57 PM

Here is a link to move your home to a separate partition.

https://help.ubuntu.com/community/Pa...ng/Home/Moving

MTK358 04-12-2011 02:05 PM

Unix doesn't store all of an application's files in one place, parts of programs are basically scattered all over your hard drive.

But it does have the concept of a "prefix": if the prefix is /usr, then executables will be in /usr/bin, data files in /usr/share/<application name>, etc.

vikrang 04-13-2011 01:06 AM

Thanks to all of you..I think that's the beauty of linux , the way it stores block devices as directories. Th concept of Mount , Chroot etc is simply out of the world!

One small doubt though , assuming sda1 is the base linux partition and /dev/sda2 the empty linux partition..There is a default home directory in /dev/sda1 which is abt to get full ..Linux by default downloads all applications in /home/user/(Music or Documents or downloads)...Can I mount /dev/sda2 in /home itself? ..Will this be an extension of the already existing /home or will it mount the new partition on top of the default /home (meaning the existing files disappear!)?

MTK358 04-13-2011 08:36 AM

Quote:

Originally Posted by vikrang (Post 4322947)
One small doubt though , assuming sda1 is the base linux partition and /dev/sda2 the empty linux partition..There is a default home directory in /dev/sda1 which is abt to get full ..Linux by default downloads all applications in /home/user/(Music or Documents or downloads)...Can I mount /dev/sda2 in /home itself? ..Will this be an extension of the already existing /home or will it mount the new partition on top of the default /home (meaning the existing files disappear!)?

I didn't get that at all.

And BTW it's not Linux that chooses where stuff is downloaded.

tredegar 04-13-2011 11:49 AM

Quote:

Can I mount /dev/sda2 in /home itself?
Yes you can. If you mount it at /home all the files that are currently in /home will become disappear until you unmount it.

As stress_junkie said, you could mount it at /home/extraspace (or anywhere else for that matter) and then just use the extra space.

But if /dev/sda1 and /dev/sda2 are adjacent to each other on your disk layout, you could boot from a live CD and then use gparted to "grow" sda1 into the space allocated to sda2. This way you get to keep your files, but end up with more space to play with. Note this must be done from a live CD when the partitions sda1 and sda2 are unmounted.

As usual, there are many possible solutions to your problem. None if them is necessarily "right".

vikrang 04-13-2011 11:40 PM

Sorry MTK, think I confused you all!

TreadGear hit the bell...That answered my question perfectly...In a nutshell thats what I wanted to know...


All times are GMT -5. The time now is 04:14 AM.