LinuxQuestions.org
Review your favorite Linux distribution.
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 11-16-2007, 10:40 PM   #1
Kryptos
Member
 
Registered: Nov 2007
Posts: 47

Rep: Reputation: 15
Linux Partitions


Hi everyone.

What happens if a linux partition is filled up?
What kind of partitions can we resize after the installation without loss of data? How can we do it?

Thanks in Advance.
 
Old 11-16-2007, 11:18 PM   #2
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
You may want to look at the Gparted Live-CD.
Although I have considered resizing Linux partitions I have not done so. I avoid resizing if I can. I have resized both FAT32 and NTFS partitions with commercial software.
 
Old 11-17-2007, 01:03 AM   #3
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 863

Rep: Reputation: 45
Depending on the distro your automatic partitioning may end up making the /home partition very large. This is where you will keep your data and the one most likely to fill up.

Assuming you are reasonably comfortable with manual partitioning I would suggest this:

Have a look at what the installer is recommending.
Tinker with the partition sizes so that the total comes to about 40MB.
Leave the rest of the disc unpartitioned for now.

After installation create another partition and mount it as /data or whatever you like. Give yourself full permissions to it.

Now, use the /home/yourname directory to save stuff you want to backup regularly. Linux will store all the configuration info here.

Use the /data directory to store things like MP3s, Photos etc which don't change and you either don't backup or only need to backup occasionally.

As a guide, this is what has worked very well for me for a long time:

Code:
Disk /dev/sda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0005fe80

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2432    19535008+  83  Linux
/dev/sda2            2433       19929   140544652+   5  Extended
/dev/sda5            2433       10213    62500851   83  Linux
/dev/sda6           10214       12645    19535008+  83  Linux
/dev/sda7           12646       19332    53713296   83  Linux
/dev/sda8           19333       19624     2345458+  83  Linux
/dev/sda9           19625       19929     2449881   82  Linux swap / Solaris
the 2 large partitions are sda5 (/home) and sda7 (/var).
On this disc I made /var large instead of creating a /data partition. This disc is "dedicated" to Debian Linux Unstable.

Code:
Disk /dev/sdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3e25f4ef

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2550    20482843+   7  HPFS/NTFS
/dev/sdb2            2551        8190    45303300    5  Extended
/dev/sdb3            8191       12269    32764567+  83  Linux
/dev/sdb4           12270       19929    61528950   83  Linux
/dev/sdb5   *        2551        2584      273073+  83  Linux
/dev/sdb6            2585        3192     4883728+  83  Linux
/dev/sdb7            3193        3557     2931831   83  Linux
/dev/sdb8            3558        3982     3413781   82  Linux swap / Solaris
/dev/sdb9            3983        4031      393561   83  Linux
/dev/sdb10           4032        8190    33407136   83  Linux
This disc is set up more like I am suggesting to you:
sdb1 is a 20GB Windows 2000 partition (rarely used).
sdb3 is a "/data" partition
sdb4 is another large partition where I keep Virtual Machine files
sdb 5 is where a Debian Testing OS lives. I have this as an emergency use OS in case sda1 won't boot.

Essentially the message is: "There are no RULES, only recommendations". The neat thing is that, as there is no drive letter nonsense, you can mount other partitions in a way that they appear as normal directories and don't get in your way while working.
 
Old 11-17-2007, 06:36 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,943
Blog Entries: 46

Rep: Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182
Hi,

Quote:
Originally Posted by Kryptos View Post
What happens if a linux partition is filled up?
This depends on the partition(s) use. If it is the '/tmp' and you are attempting to install something then you will certainly have problems with the installation if the space is not sufficient. The '/tmp' is also used to store files when you use most cdrom/dvd software, either to copy/burn or even run a application statically.

The '/var' directory is another potential problem area. If your system logs aren't rotated then you could fill space rapidly. If you use the system with one partition for '/' then you could eventually have problems if the system has a lot of activity. This would depend on the amount of space allocated to the '/'. That is why most servers are setup with separate partitions for many of the system directories.

Sure, with the large disk storage available today the problems do not show up for the average user. But it can happen if you don't plan properly.

Quote:
Originally Posted by Kryptos View Post
What kind of partitions can we resize after the installation without loss of data? How can we do it?
I would suggest that you look at the 'Linux File System' section of the 'Slackware-Links' formerly 'Slackware LQ Suggestions Links!'. You will find other good online reference for Linux File Systems and of course other Linux links.

As for the actual partition resizing question, this would depend on how you originally setup the system. If you didn't allocate enough space for a particular system use directory then you have several alternatives. You could backup the system first then re-allocate the space to allow the expansion by using qparted (faq) or even Parted Magic to resize.

If you setup the system with a scheme to allow expansion then the re-allocation would be to backup the system first then just delete the partition(s) using fdisk or cfdisk. You would then create the new partitions with the same fdisk or cfdisk. Of course you would have to make the file systems again with this method. The restore to the partitions would be straight forward with the new space.

Another way would to just add another hard disk to the system, that is if you have the channels available. If you do it this way then you would scheme the partitions to your needs then either symlink or mount the partitions to the directory structure. You would restore the data to the new partition(s) directory tree.
 
  


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
windows killed my partitions! no linux partitions found on this computer. The MJ Linux - Software 10 01-05-2007 08:31 AM
Question on creating more partitions than default ones, i.e. /home,/root partitions casmac SUSE / openSUSE 1 12-20-2006 05:02 PM
how do I add partitions to drives that have Logical Volume (LVM) partitions? The MJ Linux - Software 5 08-17-2006 06:15 PM
Linux installed, linux partitions lost, computer scragged, need serious help. B4UTRUST Linux - Newbie 4 01-23-2004 10:21 AM
Win XP Install Overwrites MBR and Linux Rescue Fails to Recognize Linux Partitions carrlane Linux - Software 8 01-14-2004 07:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:09 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
Open Source Consulting | Domain Registration