What is the best way to split a terabyte disk on a Linux development machine?

I have a new 1 TB engine that will appear tomorrow. What is the best way to share this space for a development workstation?

The biggest problem that I think I will have is that some partitions (probably / usr) will become small after a little use. The other sections are probably huge. For example, a swap drive takes up 2 GB (2x 1 GB RAM), but is almost never used (only once, which I know about).

+4
source share
10 answers

My standard strategy for regular “service” mailboxes is to provide them with a swap partition twice the size of their RAM, 1 GB / boot partition, and leave the rest as one large partition. Although I understand why some people want a separate / var, a separate / home, etc. If I only have trusted users and some production service doesn’t work for me, I don’t think the reasons I heard to date, applicable. Instead, I'm doing my best to avoid resizing, or any section gets too small, which is best achieved with one huge section.

As for the size of swap and / boot - if your computer has 4 GB of memory, you might not want to have a double swap exchange. It is, however, wise to at least have some. Even if you, however, doubled, you are using a total of 9 GB, which is 0.9% of your new drive. / boot can be less than 1 GB, this is just my standard "will not be complete, ever."

+5
source

If you split your drive using LVM , you don’t have to worry that in the future any particular partition will be exhausted. Just move the space around as needed.

+6
source

If you want a classic setup, I would go to the 50GB "/" section, for your entire application, and split the rest into all users, or the full 950GB for one user. Endless disk space!

+2
source

@wvdschel:

Do not create separate sections for each user. Unused space on each partition is lost.

Instead, create one partition for all users. Use quota , if necessary, to limit each user space. This is much more flexible than partitioning or LVM.

OTOH, one huge partition is usually a bit slower, depending on the file system.

+2
source

I always install LVM on Linux and use the following layout to get started:

/ = 10 GB swap = 4 GB / boot = 100 MB / var = 5 GB / home = 10 GB or the rest of the disk.

And then, later, if I need more space, I could just increase / home, / var or / as needed. Since I work a lot with XEN Virtual Machines, I try to keep the remaining space open so that I can quickly create LVM volumes for XEN virtual machines.

+2
source

Did you know that 1 TB can take up to half an hour to fsck ? Workstations usually crash and reboot more often than servers, so this can be annoying. Do you really need all this space?

+1
source

I would go with 1 GB for / boot, 100 GB for /, and the rest for / home. 1 GB is probably too high for / boot, but that's not how you skip it. 100 GB might seem like a lot to everything outside of your home until you start messing with databases and realize that MySQL stores databases in / var. Better to leave some room for growth in this area. The reason I recommend using a segmented partition for / home is because if you want to switch the distributions completely, or if the upgrade option on your distribution doesn’t work for some reason, or if you just want to start by scratching and performing a clean install system, you can simply format / and / boot and leave at home with all user data unchanged.

+1
source

I would have two sections. A small (~ 20 GB) installed on / will save all your programs, and then will be large on /home . Many people mentioned the partition for /boot , but it really is not necessary. If you are concerned about resizing, use LVM.

+1
source

I give 40 gb in / how many times I can give the same thing as swap and then the rest in / home

+1
source

Please tell me what you are doing in / boot, what do you need more than 64 MB? If you never intend to clean it, it’s a waste of space anyway. The kernel image + initrd + System.map will not take more than 10 MB (maybe less - low weight 5 MB), and you really do not need to store more than two spare parts.

And with current RAM prices - if you need a swap, you will be much better off buying more memory. Reserve 1 GB for swap and have something to control its use (no swap is a bad idea at all, because the machine may lock up when free memory runs out).

0
source

Source: https://habr.com/ru/post/1276375/


All Articles