« How (little) women think? | Main | Italian Math »
November 07, 2005
Creating Disk Layouts
We already had some tech tips about disk layouts, but they assume that you already have a layout to copy or work with. What if you have a new disk and you want some suggestions?
Well, once upon a time, a long time ago, you used to build separate partitions for / (root), /var, /usr, /opt, /export/home, etc. These days the considerations are somewhat simplified by the sheer size of the average boot disk. The base considerations are: how much swap do you need (older Solaris versions have specific requirements that relate to memory size), how much stuff are you going to load in terms of Solaris optional features and do you feel like playing Russian Roulette? This last point refers to the /var filesystem - the place where all the logs are kept as well as the critical directory /var/sadm.
If you feel lucky, put /var in the root filesystem. If you fail to do corrective surgery on your logs, they will grow and grow. One day, you will get a full filesystem. If this is the root filesystem, your installation is hosed and I hope you have a good backup and recovery procedure.
If you don't feel lucky today, put /var in a filesystem by itself :-)
So we need three filesystems: swap, / (root) and /var. The rest of the space is yours to arrange.
What I usually do (and this is only a rule of thumb) is to think in 6ths or 7ths of a disk. Imagine that you disk has 14087 cylinders. This is roughly 2000 x 7. So we divide the disk into chunks of around 2000 cylinders as follows (most left over cylinders go into swap):
- Slice 0 = /, starts at 2080, 2000 cylinders long
- Slice 1 = swap, starts at 0, 2080 cylinders long
- Slice 2 = reserved - don't change this
- Slice 3 = /var, starts at 4080, 2000 cylinders long
- Slice 4 = unused
- Slice 5 = unused
- Slice 6 = /export/home, starts at 6080, 8000 cylinders long
- Slice 7 = unused for now
Slice 7 is actually intended for use later by SVM and there just happens to be 7 cylinders left over :-) Note that / and /var will be almost 10Gb and swap will be slightly larger. /export/home will be almost 40Gb.
Posted by Ozguru at November 7, 2005 06:00 AM