Reduce /var filesystem Size - Impact?
hi guys
I need to create a temporary Filesystem and the only way to do it is to reduce /var and create a new filesystem 3GB size Code:
df -h I also have the option to reduce /root but I think is more complicated. so what are the precautions in order to reduce /var/? thanks a lot |
Why is "reducing /var" the only way? As a quick and dirty
hack you could just as well get rid of the physical /tmp and symlink it to something under /var (if this is a temporary measure, that is). But yes, if you go to single user mode you should be able to unmount /var and resize it. If it won't let you use a rescue-/live-CD. Cheers, Tink |
There are probably a couple ways to deal with this situation that do not involve shrinking the /var filesystem. What is the exact problem you are trying to solve? How "temporary" is this new 3GB filesystem going to be? Do you have physical access to the server?
|
thanks guys
well basically this system has Code:
[root@vvvvvv ~]# df -h but as you see I only have / and /var filesystem and no space for more filesystems Code:
[root@vvvvvv ~]# pvs |
Do they really need a new filesystem for their installation? You have 53GB free on /. Can't you just instruct them to install under, e.g., /foo?
Another option for avoiding interrupting your system is connecting a cheapo USB drive, and creating the new filesystem on it. The performance will be dismal, but this is temporary. If you really need this space to come from your current volume group, then I'd plan a system downtime and use a live cd (which supports LVM) to 1) shrink the / filesystem; and 2) reduce the / LV. Take backups first. (Next time, try to keep some free space in your VG so that you can have the flexibility to deal with issues like this.) |
Quote:
yeah I really need to know if a filesystem is really required...so if it's really require I will need to take the system down to shrink /var right? I think shrinking /root is more complicated and risky |
Well, that's your choice. I suggested the / filesystem because it has plenty of free space.
Shrinking a filesystem is normally OK, but it is definitely not risk free. And it's going to require downtime in your case. Back up first. |
All times are GMT -5. The time now is 11:38 PM. |