Can the hive mind help me optimize my Linux harddrive mount?
September 6, 2006 11:24 AM   Subscribe

I want to make sure I am doing it in a way to most efficiently use the space I have. I have 2 harddrives. 8gig and 40gig. The 8gig is my primary and 40gig the slave. What is the best way to set up my directory tree so that the majority of the software is installed to the 40gig and all of the necessary system files are on the 8gig? I use Kubuntu 6.06 and am willing to edit the config files or even reinstall if it seems worth it.x harddrive mount?
posted by slavlin to Computers & Internet (12 answers total)
Given those drive sizes, which are extremely small, I'd probably do a single partition for /, and put it on the 8 gb drive, and then do /home on the 40. That'll give you the most flexibility.

You could, of course, just throw more space at the problem. 250 gig drives are $80. Even if you're on a laptop, 120 gig drives are $95.

Assuming you have a desktop, your existing space is worth $15. Barring some unusual circumstance, it's not worth spending any time on. Just buy a new drive.
posted by Malor at 11:39 AM on September 6, 2006

when i have a data drive like that, I typically mount it as /data and then configure services (webserver, ftp space, whatever) to use some part of /data. You might choose to make /home a symlink to /data/home as well so home dirs are on the big drive. /var holds a lot of data in it as well (/tmp, mysql and/or postgres databases, etc.), so that's another candidate for a symlink from /var to /data/var.
posted by mcstayinskool at 11:42 AM on September 6, 2006

I also agree with the first poster to throw more space at the problem. HDs are too cheap to bother with this, typically.
posted by mcstayinskool at 11:43 AM on September 6, 2006

I thought the canonical UNIX way to do this is to have / on the root drive and /usr on the larger secondary drive. But I'm not up on the latest Linux filesystem standards.

But I would third getting more space. An 80 GB drive is next to free. Someone threw away a working 40GB hardrive in a dumpster in front of my house a few weeks ago. Ask around your friends/coworkers and maybe you can get one for free.
posted by GuyZero at 12:50 PM on September 6, 2006

You can partition your drives during installation anyway you like, by selecting the manual partition option, somewhat as described by this HOWTO. If you put your root and tmp partitions on your 8 gig drive, I'd make partitions for swap, home, var, usr and whatever user partitions you might want (/games, /data, and so forth) on your 40 gig drive.

How space will be used on the drives by program installations will depend somewhat on how you install programs. If you mainly use the automated package tools like Synaptic, most of the file system space used by program files will then be on your 40 gig drive. And the directories which grow over time (var, home, usr) will also be there. Most programs are going to install to /usr/bin or /usr/local by default, but that's largely a convention, not a hard rule. And you might find that if you don't use hundreds of programs, you'd have plenty of space for all your standard desktop programs on your 8 gig drive, and get a bit better performance putting them there, if your swap partition is on the 40 gig drive.

Performance is also going to be limited if you are running standard IDE drives as master/slave on the same IDE channel. You'd be better off making both your hard drives masters on their own IDE channels, and making your CD-ROM drives slaves.
posted by paulsc at 12:56 PM on September 6, 2006

Put / (root) and /tmp on the 8 gig drive and use LVM on the bigger one and put all the other partitions there. When that becomes cramped, stop being so cheap and shell out some cash for a hard drive (it's ridiculous how cheap space is now a days) and add it using LVM for instant growing room for your partitions.
posted by crypticgeek at 1:10 PM on September 6, 2006

I second crypticgeek. My fileserver at home looks like this:

Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.4G 7.7G 290M 97% /
/dev/md/0 146G 135G 3.5G 98% /home

and I regret it. Having 8 gigs to play with for all of usr much less var/logs and var/tmp (its a gentoo box) is painful. In fact, my /usr on this Ubuntu box is 3.2 gigs alone. LVM Everything. Put /usr /var and /home on LVMs on your 80 gigger.

Better yet, nuke the 8gig, get a ~300 gig hdd for ~$100 and put this problem off until later. Or get an expandable NAS and never think about it again.

Also, that 8 gig if it has been used even somewhat regularly since it was new, is in prime bathtub-curve territory. Just chuck it and start over, it'll be easier in the long run. Data loss is no fun.
posted by Skorgu at 3:30 PM on September 6, 2006

Buy two 300GB drives for $200 (total) and RAID1 them, at least. There's not really an excuse to protect your data for another $100, if you care about it at all.
posted by kcm at 3:52 PM on September 6, 2006

I'd be worried about the health of the 8 gig drive... The only way you could have one of these that isn't 6 or 7 years old is if you got it out of an xbox... get rid of it...
posted by hatsix at 4:55 PM on September 6, 2006

Skorgu: Its fugly, and not really kosher, but generally not a problem to symlink /var/__ to /home/__. Keep in mind that the big issue with this is disk failure - you don't want a disk failure on /home to make your system unbootable or severely broken.
posted by devilsbrigade at 5:09 PM on September 6, 2006

I second the suggestion to set up your partitions so that / is the 8GB drive and /home is the 40GB drive. That's a good balance between being easy to do and providing you with what you want. I have my system set up (roughly) the same way, and a full Ubuntu install with lots of extra software for programming and stuff only adds up to 2.4GB.

I imagine the easiest way to do that is to backup and reinstall, and set up the partitions during the install procedure. There are probably ways to avoid that if you really want to, but they'll probably take more real effort on your part.
posted by brett at 7:23 PM on September 6, 2006

devilsbrigade yeah, I already have some stuff symlinked out, but given how cheap disks are today there's no reason to do that to a newly installed system. Its definitely a kludge and its only to bide time until I can get a third 150GB drive and get a proper EVMS setup running.

I retain my opinion that that a new install on that (any) 8 gigger is just begging for trouble.
posted by Skorgu at 7:27 AM on September 7, 2006

« Older It's just a page with links on it...why is it so...   |   Big downloads on firewire external disks? Newer »
This thread is closed to new comments.