On 14.12.2010 23:27, Les Mikesell wrote:
On 12/14/2010 4:16 PM, Markus Falb wrote:
On 14.12.2010 22:49, Jason T. Slack-Moehrle wrote:
Hi,
If you dont know in advance how your storage is allocated the best way, use lvm. The space you dont need today is in the pool and be it /var/www/html or swap or whatever assign it as needed in the future.
Note that its maybe better to not put /boot into lvm.
I would suggest
/dev/md0 -> /boot /dev/md1 -> lvm with all other partitions including swap
OK, I have done this, I need to create mount points and I am not sure how to initially size.
My idea was to assign minimum at now. It could go like this:
lvm volume group -> 1000GB
for the system: lvm logical volume for / -> 1GB lvm logical volume for /var -> 1GB lvm logical volume for /usr -> 1GB
lvm logical volume for /var/www/html -> 50GB
Now you have assigned 53GB out of the 1000 and the other 947GB remains dynamically assignable from the lvm volume group.
If you need more space in one of the partitions, just grow it, out of the pool of 947GB. Logical Volumes can be resized online and many filesystems can be grown online (mounted) too. If the initial 1GB for some partition proves to be to low, e.g. it has to be increased on every server you have than adjust it to initial 2GB or whatever size is adequat for you. I am not after numbers at all. My point is: If you dont know how to partition, assign at minimum, allowing for future flexibility.
But this only helps if you don't know where you will need to grow. If you know it is going to be under /var, just give it all the space you have in the first place and avoid the overhead of lvm.
To quote Jason, the OP: "what should my SWAP space be" ? How should I know ? lvm to the rescue.
lvm also helps if you want to have additional partitions. Maybe one day you recognise that a separate partition for /var/log/httpd would be a good thing.
You are talking about the performance overhead ? Not sure about that. I think the flexibility you gain makes it at least worth thinking about it. Said that, I would be interested in hearing about disadvantages of lvm.