When installing linux not many people chose to partition their disks on a smart way but jump over that step fast and chose simple partitioning scheme that is actually bad. And I'm gonna tell you why.
When users install new linux they sometime get into problem that I call "fsck mess".
That is the situation in which users get a data reliability problem , some data is not available, and they run fsck or its run by linux itself during booting, and they get corruption of the / fs what is not uncommon situation. And then need to reinstall linux completely. They usually got a problem with filesystem that corrupt their primary / partition that cannot be fsck without boot cd.
I will assume that a reader of this article will do installation using the ext filesystems ext2, ext3 or ext4
How to prevent this:
This partitioning scheme was used earlier for the server setups and its helpful if you have small HDD not an SSD or NAND flash, NAND based disk do not rotate so there aren't advantage of speed in outer layers.
Today with a lvm2 you can do more this is for a setups that aren't gonna change partition sizes on the disk.
Choosing for your / partition to be nothing more than / and that mean separate /home /var /tmp /usr partitions is smart because problems with data on other partition will not mess up your basic / partition.
I assume in this partitioning scheme that you have at least 250 or 300 GB disk what is fairly regular for today desktops.
The best partitioning scheme that is not too complicated but fast enough is:
Reasons why you should put them in this order? I'll explain it now:
The higher partition is in the partitioning scheme access to data on it will be faster.
/ is your primary linux partition and it goes first.It need to be as fast as it can that is why is first except if you use separate /boot partition.
Swap partition is next because of the access speed to disk, outer circles on HDD that mean first partitions, are faster and access to them is faster because the needle need less searching and less number of spin circles is made to get to the same amount of data. Swap is there to emulate the memory when you run out of RAM and need to be as fast as it can. You may ask why a big swap now when memory is cheap? Well if you have ever had some crazy runaway process, like a fork bomb on your system, or bugged program that have memory leaks, you know why I insist on having swap partition, fork bomb and memory leaks can take over your memory and then leave you in almost halted system.
/home partition need speed too if you running desktop. All your applications write data on your /home partition and it need to be fast as it can be.
That is partitioning scheme that has given the best results to me and to many other linux users.
Also usage of partimage or fsarchiver is recommended to periodically backup your partitions. You can backup them from partimage cd what I find the best way to do backups or you can backup data with other backup tools.
When users install new linux they sometime get into problem that I call "fsck mess".
That is the situation in which users get a data reliability problem , some data is not available, and they run fsck or its run by linux itself during booting, and they get corruption of the / fs what is not uncommon situation. And then need to reinstall linux completely. They usually got a problem with filesystem that corrupt their primary / partition that cannot be fsck without boot cd.
I will assume that a reader of this article will do installation using the ext filesystems ext2, ext3 or ext4
How to prevent this:
- firstly choose better partitioning scheme
- secondly umount all partitions before you run fsck
- thirdly check for bad blocks if you still have a problem with disk I/O
- fourthly use a partimage or fsarchiver to make backups of your partitions
This partitioning scheme was used earlier for the server setups and its helpful if you have small HDD not an SSD or NAND flash, NAND based disk do not rotate so there aren't advantage of speed in outer layers.
Today with a lvm2 you can do more this is for a setups that aren't gonna change partition sizes on the disk.
Choosing for your / partition to be nothing more than / and that mean separate /home /var /tmp /usr partitions is smart because problems with data on other partition will not mess up your basic / partition.
I assume in this partitioning scheme that you have at least 250 or 300 GB disk what is fairly regular for today desktops.
The best partitioning scheme that is not too complicated but fast enough is:
- / - no bigger than 4 GB only primary partition
- swap - 2 * RAM
- /var - not smaller than 8 GB because of apt-cache ,mail and www folder
- /tmp - no bigger than few GB lets say 2GB
- /usr - depend how much you gonna install software but I'm using from 20 GB to 30
- /home - you can choose how much you want here dependable on the usecase of your linux based server. If you want to have a public accessible ssh and VNC server it might help you to have a big home partition but basically you want for web or email server the most of partition space in /var.
Reasons why you should put them in this order? I'll explain it now:The higher partition is in the partitioning scheme access to data on it will be faster.
/ is your primary linux partition and it goes first.It need to be as fast as it can that is why is first except if you use separate /boot partition.
Swap partition is next because of the access speed to disk, outer circles on HDD that mean first partitions, are faster and access to them is faster because the needle need less searching and less number of spin circles is made to get to the same amount of data. Swap is there to emulate the memory when you run out of RAM and need to be as fast as it can. You may ask why a big swap now when memory is cheap? Well if you have ever had some crazy runaway process, like a fork bomb on your system, or bugged program that have memory leaks, you know why I insist on having swap partition, fork bomb and memory leaks can take over your memory and then leave you in almost halted system.
/home partition need speed too if you running desktop. All your applications write data on your /home partition and it need to be fast as it can be.
That is partitioning scheme that has given the best results to me and to many other linux users.
Also usage of partimage or fsarchiver is recommended to periodically backup your partitions. You can backup them from partimage cd what I find the best way to do backups or you can backup data with other backup tools.
No comments:
Post a Comment