I tried to lvreduce, and umount, then could not mount it again. So, the first question I would like to ask is:
What is the command to resize the file system, after I did lvreduce?
Edited by: 943714 on Jul 30, 2012 8:12 AM
It is very important to remember to reduce the size of the file system or whatever is residing in the volume before shrinking the volume itself, otherwise you risk losing data. The steps are, for instance:
resize2fs /dev/mapper/VolGroup01-LogVol00 20G
lvreduce --size 20 G /dev/mapper/VolGroup01-LogVol00
I did lvreduce first, and then umount.
In any event, is there anything I need under /opt? I just built up the server, I did take look /opt when it was fine, I did not see any "real" files or directories. I don't have back it up yet. So, I am wondering can I just recreate the entire /opt file system?
Edited by: 943714 on Jul 30, 2012 8:56 AM
I meant, if i create a new /opt, all stuff under /opt is no longer exist, is the server should be still alright, since this is a new built server, no applications have been installed yet.
Edited by: 943714 on Jul 30, 2012 9:03 AM
A default installation of Oracle Linux, or Enterprise Linux as such does not use /opt or install anything in it. I think it is more common on Solaris and other commercial Unix systems.
I would actually not bother to put /opt on it's own partition or install anything major into it. I would generally not get crazy about creating partitions. You may want to create partitions to prevent anything in /tmp or /home to fill up / (root) and block your server on a serious production system, but given the cheap price, size and speed of today's disks and what a modern system can utilize, I would no longer consider it a must have.
Thank you for your input.
As long as Linux did not put anything under /opt, it should be fine to create a brand new one, or as you suggested, just create a directory somewhere.
I was not so sure if the server would be still alright if I destroy the /opt file system, since it seems hard or not possbile to correct it.