Disk space allocation

ArisVer

Golden Member
Mar 6, 2011
1,345
32
91
Hi, I have made a new installation with a lot of partitions and already my usr and var have gone full. I have noticed that root is using less than 1G and I am planning to resize with GParted live and take the disk space from root.
$ df -h (sda)
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 939M 28M 864M 4% /boot
/dev/sda3 51G 338M 48G 1% /
/dev/sda4 9.2G 5.1G 3.7G 58% /var
/dev/sda5 9.2G 8.8G 0 100% /usr
/dev/sda6 4.6G 138M 4.3G 4% /var/mail
/dev/sda7 46G 6.2G 38G 15% /home
and there is a swap partition sda2 of 29G.

Is making var 20G and usr 30G enough? Will there be a problem with the root partition or will it be using minimal space because of the existence of the other partitions?

Thanks
 

Jodell88

Diamond Member
Jan 29, 2007
8,762
30
91
I'd say that you have too many partitions.

While you can have "/usr" on a separate partition, it really isn't recommended. Think of "/usr" as the "Program Files" directory of windows, the majority of programs you install will go in there.

"/var" is mainly used for logging but it can have other uses also (e.g Pacman for Archlinux uses it as a cache for installed programs).

Why is your swap partition so large? I think at most if should be equal to the amount of RAM you have on your system. If you have large amounts of RAM you can get away with an even smaller swap partition.
 

ArisVer

Golden Member
Mar 6, 2011
1,345
32
91
Thanks for your answer,

I prefer to have separate partitions. I am not sure yet what the directories are used for (I need some more reading), and what you said about the usr partition is usefull. I got a new (used) computer and switching from a 30G to a 160G so I decided this scheme. The swap is in case I install the full capacity of RAM (32G) with STR cabability, even though I think anything over 16G of RAM is an overkill for me, with 8G RAM more than enough.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
ArisVer said:
I prefer to have separate partitions. I am not sure yet what the directories are used for (I need some more reading),

So you like doing it this way but have no idea why? Not trying to be a dick, but it sounds like you don't have a good enough understanding of how Linux works to make the decision. And your swap is way overkill. If you actually get to the point where you're using 20G+ of swap the machine will be unusable anyway because of all of the paging I/O.

If you're going to separate /usr and /var, then you did it backwards. As you found out, / gets very little usage outside of /usr since 99% of your application binaries and data go there.

Quite frankly, you're over-complicating things for yourself for no reason. The only mount point you should look at creating is /home, the rest should just be left on one big / filesystem because doing otherwise doesn't really change much. Unless you're going over the top by mounting /usr read-only, noexec or other things then what's the point? What are you actually trying to accomplish by separating all of your filesystems out like that?
 

lxskllr

No Lifer
Nov 30, 2004
60,209
10,666
126
Quite frankly, you're over-complicating things for yourself for no reason. The only mount point you should look at creating is /home, the rest should just be left on one big / filesystem because doing otherwise doesn't really change much. Unless you're going over the top by mounting /usr read-only, noexec or other things then what's the point? What are you actually trying to accomplish by separating all of your filesystems out like that?

What do you think of a separate boot partition? I had a disaster of my own making this weekend, and I'm now in possession of a shiny new Debian testing install. I haven't upgraded to sid, as I'm a little gun shy atm. My confidence is blown. Anyway, I debated awhile on the separate boot partition, but went with my old standby of 10gb /, 1gb swap, and the rest to /home.
 

Jodell88

Diamond Member
Jan 29, 2007
8,762
30
91
Nothing is wrong with a separate /boot partition AFAIK. Just make sure you have enough space for a few extra kernels if you're adding patches that isn't there by default.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
What do you think of a separate boot partition? I had a disaster of my own making this weekend, and I'm now in possession of a shiny new Debian testing install. I haven't upgraded to sid, as I'm a little gun shy atm. My confidence is blown. Anyway, I debated awhile on the separate boot partition, but went with my old standby of 10gb /, 1gb swap, and the rest to /home.

IIRC the big reason for it before was because some BIOSes couldn't read past the 2G mark on a hard disk to boot from it, so if you got unlucky and your vmlinuz file got put past that, you couldn't boot. But that's a hardware/firmeware limitation that should be gone for pretty much everyone these days. Another reason is if you're using software RAID, LVM, BTRFS, etc or something else that can't easily be booted by GRUB. Then you need /boot so that the initramfs can be loaded to start your arrays, logical volumes, etc. If none of that is true for you, then you don't specifically need it.

I actually just noticed that I don't have a /boot here but / is on LVM so I'm not 100% sure how that works, maybe GRUB2 can do basic LVM now.
 

lxskllr

No Lifer
Nov 30, 2004
60,209
10,666
126
Sounds like I'm not missing much. I'll guess I'll keep doing what I'm doing. Well... Except for that crap I pulled Sunday :^D
 

lxskllr

No Lifer
Nov 30, 2004
60,209
10,666
126
If you upgrade to sid, just make sure you have apt-listbugs installed.

Yea, I already installed that. I'm still debating on what to do. I kept a sid install running for months without issue, but after this weekend I don't trust myself.

What's your take on the testing vs unstable issue?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Yea, I already installed that. I'm still debating on what to do. I kept a sid install running for months without issue, but after this weekend I don't trust myself.

What's your take on the testing vs unstable issue?

I've been running sid for years and as long as you're careful, it's fine. I also usually use aptitude which lets me pick a solution instead of just taking what apt-get thinks is best.
 

ArisVer

Golden Member
Mar 6, 2011
1,345
32
91
Hi, a bit late after a 'crash',
The GParted live did not manage to adjust my partitions, so I ended up reinstalling. As it was a fresh install I did not mind much. I could have reduced swap if I saw your post but as said I came in late. Why separate partitions? Unless I want to resize anything, I feel safer of keeping the data in the disk like that. If something goes wrong with the system it usually is in / right? That means I can reinstall the basic system and everything should be close to normal. What I am not sure about in case of reinstalling the base system, is whether I have to reinstall the applications (I use dpkg after installing X) for the system to know what was in there.
Similar to this, I have a question whether my applications configuration files remain intact, because as I found out I cannot do a different /etc partition. I have tried and the installer said that it must be a part of /(root).
I use stable, with the occasional package from wheezy and sid (even lenny), only if I cannot find the packages in stable. I may dist-upgrade later or slowly start upgrading applications one by one.