Are there some kind of "best disk partitioning scheme" for a linux-based Java EE developer machine, in terms of performance, organization or others? Thanks in advance.
2 Answers
Use LVM2. That way you can dynamically create, remove, grow and shrink filesystems. Don't assign more space than you actually require and extend the filesystem when needed. It is easy to add a new install to the same disk, making the machine multiple boot (provided it supports LVM2 too). It is perfect for testing new OS releases before you wipe out the old one, either through separate LV's or through snapshots.
I use:
- / 2GB - more than enough, 1GB should do just as well.
- /var 10GB - you want some extra space here to accomodate updates/installation filess
- /var/log 5GB - you don't want applications to crash because of logfiles growing harder than you expected.
- /usr 10GB - this is where all your applications install
- /home 8GB - I have this on a different disk *and* I have extra filesystems for special directories eg. mail, music, iso-files, ...
- /tmp 50GB - I regulary do some fiddling with large temporary data files...
There is not really a good or a bad, it all depends on what you do and how much money you can spend.
=> Keep in mind that extending a file system is easy, whereas shrinking it is difficult.
-
I'd keep another FS at
/home/[username]/Web development
and use EXT4. It supports small, constantly-changing files well. This may cause logon issues, though... May 1, 2012 at 18:00 -
-
I have researched this a bit firther and retract my statement that it may cause logon issues. I am sorry for any misleading info. I would still set up partitions that way, though. May 1, 2012 at 20:12
-
1
I personally use one large partition. Back in the day, as a UNIX admin, we would painstakingly assign custom partition sizes for /home /usr/ /var /tmp , etc., but with the size of disks today, I don't think it's necessary at all. (And we used striping and disk redundancy through RAID, but I've seen enough problems with it that I now typically just run my own backups on data I care about.)
To me, LVM is unnecessary overhead, and I don't want to use it with volume encryption.
Here's a good serverfault question om the topic: LVM Dangers and Caveats
If you've got more than one disk, you can certainly start to look at optimizing reads and writes there.
(If any of these are no longer valid, I'd love for anyone to chime in.)
Also see:
Advanced Partitioning Question (asked Mar 29 at 14:00)
Advice on partitioning ( asked Jul 1 '11 at 18:17 )
What's your recommendation on drive partitioning schemes for a desktop and home server? (asked Jul 29 '10 at 2:01)
A partitioning scheme for ubuntu server (asked Sep 22 '10 at 17:32)