Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to partition terabyte drive in a linux development machine? [closed]

I have a new 1 TB drive coming in tomorrow. What is the best way to divide this space for a development workstation?

The biggest problem I think I'm going to have is that some partitions (probably /usr) will become to small after a bit of use. Other partitions are probably to huge. The swap drive for example is currently 2GB (2x 1GB RAM), but it is almost never used (only once that I know of).

like image 742
Peter Stuifzand Avatar asked Nov 30 '22 20:11

Peter Stuifzand


2 Answers

If you partition your drive using LVM you won't have to worry about any individual partition running out of space in the future. Just move space around as necessary.

like image 183
Joseph Sturtevant Avatar answered Dec 06 '22 10:12

Joseph Sturtevant


My standard strategy for normal "utility" boxes is to give them a swap partition twice the size of their RAM, a 1GB /boot partition and leave the rest as one vast partition. Whilst I see why some people want a separate /var, separate /home, etc., if I only have trusted users and I'm not running some production service, I don't think the reasons I've heard to date apply. Instead, I do my best to avoid any resizing, or any partition becoming too small - which is best achieved with one huge partition.

As for the size of swap and /boot - if your machine has 4GB memory, you may not want to have double that in swap. It's nonetheless wise to at least have some. Even if you nonetheless have double, you're using a total of 9GB, for 0.9% of your new drive. /boot can be smaller than 1GB, this is just my standard "will not become full, ever" size.

like image 27
Jon Bright Avatar answered Dec 06 '22 09:12

Jon Bright