Foreman Pulp 2 to Pulp 3 Migration - Disk space


I was running Foreman version 2.1 with Katello version 3.16 and I have upgraded to Foreman version 3.01 with Katello version 4.2. I did the upgrades sequentially, however when I came to upgrade the katello version 3.18 I did the migration from pulp 2 to pulp 3. Everything went fine. However the disk space on partition /var/lib/pulp increased drastically. I was using around 140GB in space and after the migration it increased to 228GB.

I deleted the orphan content by using this command “foreman-rake katello:delete_orphaned_content RAILS_ENV=production”. It did free up some space, however is this normal that after the migration without increasing or syncing up new content use this much of space?


Hi, As per the doc, Have you run :

foreman-maintain content remove-pulp2

To delete the old pulp2 content ?
Remember to take a snapshot before running the command, just to stay safe


Hi Loitho,

I tried foreman-maintain content remove-pulp2 and it gave me this error below. However still it freed up space.

Failed executing rm -rf /var/lib/mongodb/, exit status 1:
rm: cannot remove ‘/var/lib/mongodb/’: Device or resource busy

I think its still fine though.

I asked @Justin_Sherrill the other day and he confirmed that the directory may double in size for some time. I did not get all the details tho, awaiting his analysis of this:

In other words: you are not alone.

If you have mounted the dir manually you may need to unmount it too.

1 Like

Thanks, actually the /var/lib/mongodb directory is 1% in size (actually there is nothing in it), after executing the command “foreman-maintain content remove-pulp2” as suggested by @loitho, still freed up space in /var/lib/pulp directory which now is only 40% in use (from 87%). That was my concern, however I thank you again for your time. :slight_smile:

1 Like