LinuxQuestions.org
Visit Jeremy's Blog.
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 04-12-2011, 01:44 PM   #1
vikrang
Member
 
Registered: Jan 2011
Location: India
Distribution: Slackware 13.1, Squeeze
Posts: 119

Rep: Reputation: 7
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?
 
Old 04-12-2011, 01:53 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.
 
Old 04-12-2011, 01:57 PM   #3
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Here is a link to move your home to a separate partition.

https://help.ubuntu.com/community/Pa...ng/Home/Moving
 
Old 04-12-2011, 03:05 PM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
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.
 
Old 04-13-2011, 02:06 AM   #5
vikrang
Member
 
Registered: Jan 2011
Location: India
Distribution: Slackware 13.1, Squeeze
Posts: 119

Original Poster
Rep: Reputation: 7
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!)?

Last edited by vikrang; 04-13-2011 at 02:07 AM.
 
Old 04-13-2011, 09:36 AM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by vikrang View Post
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.
 
Old 04-13-2011, 12:49 PM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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".
 
Old 04-14-2011, 12:40 AM   #8
vikrang
Member
 
Registered: Jan 2011
Location: India
Distribution: Slackware 13.1, Squeeze
Posts: 119

Original Poster
Rep: Reputation: 7
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...
 
  


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
external hard drive seems extremely slow after formatting to ex4 denmich1997 Linux - Hardware 4 11-25-2009 03:19 PM
How do I convert an empty ext3 partition to a jfs partition? lothario Linux - Software 3 02-28-2006 11:40 AM
How can I tell if a partition is empty? PenguinMolester Linux - Newbie 5 10-27-2004 08:46 AM
Empty Partition Systerektomy Linux - Newbie 1 04-28-2004 11:01 AM
strange partition table - boot partition empty etanter Linux - General 0 12-23-2003 10:46 AM


All times are GMT -5. The time now is 02:57 PM.

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