1

I just rebuild ossec using the mock tool on Centos 6.4 and my /var space rack up almost by 900m is this normal ?

peterh
  • 4,953
  • 13
  • 30
  • 44
biz14
  • 381
  • 1
  • 3
  • 10

2 Answers2

5

You said you used mock. This tool builds packages in a clean chroot environment, but it also keeps a cache of the minimal environment for use in building the next package.

If you don't intend to build any other packages ever again, then you can clean out all of the data that mock keeps around:

mock -r epel-6-x86_64 --scrub=all
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • yes I plan to build when there is a next update of ossec. Is it ok to keep the files there ? What is your experience with mock is reliable and issues with dependency ? – biz14 Sep 01 '13 at 16:55
  • Yes, you can leave the cache in place. It will be updated or rebuilt as necessary automatically. – Michael Hampton Sep 01 '13 at 16:56
  • Is it safe to use mock ? I am first time using the reason being ossec is not available in .rpm format and only atomic repo have it but then it requires me to upgrade mysql which centos comes with the stability preference. – biz14 Sep 01 '13 at 17:04
  • Yes, mock is [perfectly safe to use](http://serverfault.com/a/463136/126632). That's the whole point. – Michael Hampton Sep 01 '13 at 17:06
  • Yes thank you because I am worried of my steps. The issue is because this is gonna be live system and worried that ossec may give me issue with regards to dependency and now at least I am rest assured the stability with not have any effect. The only problem is space which I think is fine one 1Gb. So incase next time I want to rebuild a newer version of ossec will it eat another 1GB ? – biz14 Sep 01 '13 at 17:44
  • 1
    No, the old version will be cleaned out of the mock chroot when you build a new one. – Michael Hampton Sep 01 '13 at 17:46
  • You mean to say that it will build a new ossec but then I have to yum install again with the newly build .rpm files right? – biz14 Sep 01 '13 at 17:50
  • Of course. `mock` _builds_ packages. – Michael Hampton Sep 01 '13 at 18:12
  • Once the new one is build how to install over the existing version ? Just yum install ? – biz14 Sep 01 '13 at 18:18
  • 2
    You update it like every other package. This is now far off the topic of your question; if you have more questions about basic system administration you should ask your senior admin, or consult the documentation. – Michael Hampton Sep 01 '13 at 18:21
  • thank your knowledge and time. One last thing when its build as a new rpm. If I just run yum update will it update my existing installation/? – biz14 Sep 01 '13 at 18:25
2

I believe you have installed ossec to default location ie /var/ossec. That's the problem.Its better to install it in other partitions since /var is small.

Harikrishnan
  • 1,159
  • 2
  • 14
  • 32
  • I rebuild it using mock so it automatically goes into /var I cant control the rebuild ? – biz14 Aug 31 '13 at 07:03