[Spacewalk-list] Disk usage by Spacewalk repo's is growing and never shrinking

pradelles nicolas npradelles at eutelsat.fr
Wed Mar 6 10:45:25 UTC 2013


Hi,
in spacewalk when you delete a channel, the associated packages are not 
deleted, they just become orphan.

To see orphan packages, in GUI go to "channels -> Manage Software 
Channels -> Manage Software Packages", then select option "Packages on 
no channels". You will see below orphan packages and an option to delete 
them.
After that, my script will be able to delete these packages. You can 
also execute following command:

spacewalk-data-fsck -r -S -C -O



Regards,
nicolas




Le 05/03/2013 11:51, Nielsen, Dennis Appelon a écrit :
> Hi Nicolas
> I just tried to step though you script using ipython, and it looks like it only sees the channels I see from the web interface to
>
> In [9]: client.channel.listAllChannels(key)
> Out[9]:
> [{'arch_name': 'x86_64',
>    'id': 115,
>    'label': 'fedora18-x86_64',
>    'name': 'Fedora 18 (x86_64)',
>    'packages': 33868,
>    'provider_name': 'Spacewalk Default Organization',
>    'systems': 1},
>   {'arch_name': 'x86_64',
>    'id': 102,
>    'label': 'ol6_latest-x86_64',
>    'name': 'Oracle Enterprise Linux 6.2 - Updates x86_64',
>    'packages': 16413,
>    'provider_name': 'Spacewalk Default Organization',
>    'systems': 0},
>   {'arch_name': 'x86_64',
>    'id': 109,
>    'label': 'fedora17-x86_64-updates',
>    'name': 'Fedora 17 (x86_64) - Updates',
>    'packages': 22898,
>    'provider_name': 'Spacewalk Default Organization',
>    'systems': 0},
>   {'arch_name': 'x86_64',
>    'id': 101,
>    'label': 'ol6_u2_base-x86_64',
>    'name': 'Oracle Enterprise Linux 6.2',
>    'packages': 6281,
>    'provider_name': 'Spacewalk Default Organization',
>    'systems': 1},
>   {'arch_name': 'x86_64',
>    'id': 116,
>    'label': 'fedora18-x86_64-updates',
>    'name': 'Fedora 18 (x86_64) - Updates',
>    'packages': 18454,
>    'provider_name': 'Spacewalk Default Organization',
>    'systems': 1},
>   {'arch_name': 'x86_64',
>    'id': 110,
>    'label': 'fedora17-x86_64-debug',
>    'name': 'Fedora 17 Debug (x86_64)',
>    'packages': 5919,
>    'provider_name': 'Spacewalk Default Organization',
>    'systems': 0},
>   {'arch_name': 'x86_64',
>    'id': 108,
>    'label': 'fedora17-x86_64',
>    'name': 'Fedora 17 (x86_64)',
>    'packages': 27033,
>    'provider_name': 'Spacewalk Default Organization',
>    'systems': 5}]
>
>
> Is there a way to look in to repo's maybe and see if there still is some old repos that I don't use anymore ?
> E.g. Fedora 16 and "Oracle Linux 5" etc. ?
>
> And then based on that clean them out in db and then in filesystem ?
>
> Best regards
>
> Dennis Appelon Nielsen | GNU/Linux Consultant | CGI Denmark
> Margrethepladsen 4, 8000 Aarhus C | Danmark
> M: +45 29 48 11 18
> d.nielsen at cgi.com | www.cgi.com | www.cgi.dk
> RHCSA, RHCT – 605009853527704
>
> CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.
>
> ________________________________________
> From: spacewalk-list-bounces at redhat.com [spacewalk-list-bounces at redhat.com] on behalf of pradelles nicolas [npradelles at eutelsat.fr]
> Sent: Tuesday, March 05, 2013 11:09
> To: spacewalk-list at redhat.com
> Subject: Re: [Spacewalk-list] Disk usage by Spacewalk repo's is growing and never shrinking
>
> Hello,
> I have created and post here a script last summer to clean channels for
> old non-installed packages. You can find it attached, but as I didn't
> use it since, be careful ;)
>
> You have to modify lines 33 to 36 to comply with your spacewalk
> configuration.
>
> regards.
>
> Nicolas PRADELLES
> Ingénieur Systèmes & Réseaux
> Direction des Systèmes d'Information
> T: +33 1 53 98 30 83
> F: +33 1 53 98 48 98
> email: npradelles at eutelsat.fr
>
> Le 05/03/2013 08:58, Nielsen, Dennis Appelon a écrit :
>> Hi Thomas
>> I ran the spacewalk-data-fsck -v -r all night, but nothing got delete, I'm still able to find old Fedora 16 packets when I look for them, and the total disk-space there is free is not changed after the run...
>>
>> Any suggestions to clean-out old repo's would be appreciated...
>>
>> Regards
>>
>> Dennis Appelon Nielsen | GNU/Linux Consultant | CGI Denmark
>> Margrethepladsen 4, 8000 Aarhus C | Danmark
>> M: +45 29 48 11 18
>> d.nielsen at cgi.com | www.cgi.com | www.cgi.dk
>> RHCSA, RHCT – 605009853527704
>>
>> CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.
>>
>> ________________________________________
>> From: spacewalk-list-bounces at redhat.com [spacewalk-list-bounces at redhat.com] on behalf of Nielsen, Dennis Appelon [d.nielsen at cgi.com]
>> Sent: Monday, March 04, 2013 13:52
>> To: spacewalk-list at redhat.com
>> Subject: Re: [Spacewalk-list] Disk usage by Spacewalk repo's is growing and never shrinking
>>
>> Hi Michael
>> Thanks for you reply... I'm running the spacewalk-data-fsck -v -r in a screen as I type.
>>
>> I also have a problem with " java.lang.OutOfMemoryError: Java heap space"
>>
>> Where can I increase the memory ?
>>
>> Snip from log
>>
>> INFO   | jvm 3    | 2013/03/04 12:47:46 | 2013-03-04 12:47:46,058 [Thread-67] INFO  com.redhat.rhn.taskomatic.task.repomd.RepositoryWriter - Generating new repository metadata for channel 'fedora18-x86_64-updates'(sha256) 18334 packages, 139 errata
>> INFO   | jvm 3    | 2013/03/04 12:54:16 | Exception in thread "Thread-67" java.lang.OutOfMemoryError: Java heap space
>>
>> -----//
>>
>>
>> Best regards
>> Dennis Appelon Nielsen | GNU/Linux Consultant | CGI Denmark
>> Margrethepladsen 4, 8000 Aarhus C | Danmark
>> M: +45 29 48 11 18
>> d.nielsen at cgi.com | www.cgi.com | www.cgi.dk
>> RHCSA, RHCT – 605009853527704
>>
>> CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.
>>
>> ________________________________________
>> From: spacewalk-list-bounces at redhat.com [spacewalk-list-bounces at redhat.com] on behalf of Michael Mraka [michael.mraka at redhat.com]
>> Sent: Monday, March 04, 2013 13:39
>> To: spacewalk-list at redhat.com
>> Subject: Re: [Spacewalk-list] Disk usage by Spacewalk repo's is growing and never shrinking
>>
>> Nielsen, Dennis Appelon wrote:
>> % Hi All
>> % I need some help, I run a spacewalk server, and have had a lot of problems trying to monitor and update Oracle Linux 5.
>> %
>> % I have made many channels and repo's and delete a ton of them to, but deleting the repo from web, don't give any freespace in the /var filesystem.
>> %
>> % If I look around I can see that there are data from long gone repo's and channels, how can I regain my diskspace ?
>>
>> spacewalk-data-fsck
>>
>> It might help you to find and delete rpm packages on disk which
>> are no longer referenced from database.
>>
>> Regards,
>>
>> --
>> Michael Mráka
>> Satellite Engineering, Red Hat
>>
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>
>
> This message may contain confidential or privileged information and is
> intended only for the personal and confidential use of the designated
> recipient(s) named above. If you are not one of the intended recipients
> of this message you are hereby notified that any review, dissemination,
> distribution or copying is strictly prohibited.
> This communication is for information purposes only and should not be
> regarded as an official statement of Eutelsat S.A. or any of its
> subsidiaries. E-mail transmission cannot be guaranteed to be secure or
> error-free. Therefore, Eutelsat S.A. does not claim that this information
> is complete or accurate and it should not be treated as such.
>
>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list



This message may contain confidential or privileged information and is 
intended only for the personal and confidential use of the designated
recipient(s) named above. If you are not one of the intended recipients 
of this message you are hereby notified that any review, dissemination, 
distribution or copying is strictly prohibited. 
This communication is for information purposes only and should not be 
regarded as an official statement of Eutelsat S.A. or any of its 
subsidiaries. E-mail transmission cannot be guaranteed to be secure or 
error-free. Therefore, Eutelsat S.A. does not claim that this information
is complete or accurate and it should not be treated as such. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: npradelles.vcf
Type: text/x-vcard
Size: 303 bytes
Desc: npradelles.vcf
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20130306/fb21ecb4/attachment.vcf>


More information about the Spacewalk-list mailing list