Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Here's the partitioning scheme I set up on a machine with 2 80GB drives:

SDA

1) root = 15G

2) swap = 4G

3) home = 60G

Ok? Or is there a better scenario?

Then the partitioner shows the second drive:

SDB which is 80G and I'm not sure which mount point I should set for the second drive, so I just labeled it as an unused partition for now. Should it be set to /home in order to use the space? Also, I'll replace this one with a bigger drive eventually. With that in mind, what is the best way to deal with the second drive?

Thanks.

share|improve this question
    
4GB for swap?? really? I use at most, 1gb... if you have 2 or more gb.... the chances are that you barely use swap.. believe me.linux has a good memory management –  Axel Sep 15 '10 at 19:47
    
@Axel - I read somewhere that 2x RAM is a good rule of thumb. Is that obsolete info? –  wdypdx22 Sep 15 '10 at 21:32
    
yeah, it's from the "windows and the 128mb of ram" era. –  Axel Sep 16 '10 at 2:22
    
tldp.org/LDP/tlk/mm/memory.html: a very good (but technical) article tath explain how it works. the windows version is not bad, it's just "distinct"... i have 2gb ram and 1gb of swap... ubuntu barely use a couple a mb... ~400mb at most... –  Axel Sep 16 '10 at 2:39
    
Ok. I got my original recommendation from a 2008 linux.com article. But, after taking a look at the ubuntu community 'swap faq' dated this month, I saw this, "...ancient Unix/Linux myths like this "recommendation" tend to survive well past their "use by" dates". So thanks for the tip. –  wdypdx22 Sep 16 '10 at 3:39
add comment

5 Answers 5

up vote 1 down vote accepted

For a home machine, your chosen set of partitions is great - having /home separate means that you can move it around and upgrade your OS with ease. Since you have the second disk now, you could put /home on it for now and move it to the new drive when it arrives. Then the upgrade steps would be:

  • install the new drive in the machine beside the existing ones (3 drives at once temporarily)
  • format the new drive with a big partition and mount it anywhere
  • copy all of your data from your current /home to the new partition
  • remove the old drive and plug the new one in where it was

If your new drive is plugged into the same spot as the old one was (and has the same number of partitions), it should be detected with the same drive/partition id (eg sdb1), and you shouldn't even need to edit /etc/fstab.

[edit: clarified that you would need the same partition scheme on the replacement drive to get the same drive/partition id]

share|improve this answer
    
After the answers from Source Lab and Javier, and a little more research, this is what I decided to do. Since, you provided the details of what the eventual drive transition would be, I chose your answer. - Thanks. –  wdypdx22 Sep 15 '10 at 15:58
add comment

I'd probably put /home/ on the second drive not in a partition of the first. Specially if you are going to replace it. Just for the extra space.

share|improve this answer
    
Thanks. This is what I did. –  wdypdx22 Sep 15 '10 at 16:13
add comment

Personally I would wait, putting it in just to take it back out doesn't make sense. If you have no special needs and just want a lot of space you could do like this: (i will imagine that the new disk is a 320GB just for kicks ;)

sda1  /       75GB
sda2  "swap"  5GB
sdb1  /home   320GB

But there are a lot of different ways to set up disks these days! You could also use LVM or Software RAID (try asking google or make another question here) but it's properly not for first time Linux users since this is quite critical :o A software raid0 solution could look like:

sda1 /       20GB
sda2 "swap"  5GB
rd0  /home   385GB (sda3 65GB + sdb1 320GB)

Personally i would just do the first example, but the choice is yours...

share|improve this answer
    
Thanks for the answer. What I'm doing is kludging together a system from 2 others and don't know when I'll get around to replacing one of the drives. So for now I'm going with /home on the second drive. –  wdypdx22 Sep 15 '10 at 16:12
add comment

I like a partitioning scheme like this:

  • / around 50GB
  • swap 2xram space
  • /media/big space for movies, mp3s, games, ...
  • I had a partition for /home/user/.wine because Windows games take a lot of space, but lately I had trouble because wine couldn't use the files of the old installation

Advantage of putting the space under /media and not /home: if you want a clean install it's much easier like this. And I don't know if you can use the same /home partition for different Linux OS. Furthermore you could make your space partition NTFS to share it with a Windows installation.

share|improve this answer
    
I'm not sure I understand why to create the space under /media. I read that /media is a mount point for removable media. So, why not just have movies, etc in a public directory in /home/me? Or just copy them off to another drive or computer when needed? –  wdypdx22 Sep 14 '10 at 21:46
    
You're right about /media, but I never got any conflicts yet. The correct way would probably be to mount it on /mnt/data. And yes, you can copy them to another drive when needed, but when you already booted Windows, it can be convenient to have your data on a ntfs-partition. –  sBlatt Sep 15 '10 at 7:52
add comment

If you're going to keep having two drives, I recommend that you put them to good use: replicate all your important files on the two drives. It's called software RAID1; Linux supports this reliably and efficiently. That means your disk partitions would look like this:

first disk            second disk
sda1  md0             sdb1  md0
sda2  swap            sdb2  swap
sda3  /LARGE          sdb3  /MORE

md0 is a RAID1 volume; sda1 and sdb1 automatically contain identical data. That way, if one of your disks fails, you don't lose any important files, and you can continue working with your computer until you get the failed disk replaced.

md0 would contain two partitions: / (for the operating system) and /home (for your important data — stuff that you created, as opposed to stuff that you downloaded or ripped or compiled from somewhere). I like to have 20GB for the OS (I install a lot more programs than the average user). It's hard to say how large /home should be: it depends what data you (plan to) have that you consider important.

The Ubuntu installer can create RAID1 volumes, but you need the “alternate” or “server” installer, not the default “desktop” installer.

share|improve this answer
    
If this was an essential computer I would probably go with a RAID1 plan. As it is I have other backup options that will suffice for now. Thanks though. –  wdypdx22 Sep 15 '10 at 16:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.