The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The last attempt to update cPanel & WHM was blocked - Workaround

Discussion in 'General Discussion' started by cPanelChrisD, Dec 9, 2014.

  1. cPanelChrisD

    cPanelChrisD Technical Analyst
    Staff Member

    Joined:
    Jan 8, 2013
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    Please keep in mind that this should be considered a last resort to get things going. The long-term goal should be to provision a new server with an appropriate disk partitioning scheme and migrate.

    Here's the steps that I provided, slightly modified for further clarification:

    Moving /usr/local/cpanel to another location

    1) Ensure that there are no "immutable" files under /usr/local/cpanel that will cause the directory move to fail. The cPanel software does not require or use immutable file attributes:

    Code:
    chattr -f -R -i -a /usr/local/cpanel
    2) Ensure that you don't have any SSH or console terminals open that have a current working directory under /usr/local/cpanel. If there are, simply change the shell to use another working directory, such as "cd /root".

    3) Shut down all WHM/cPanel services and the cron service. We do not want any services to automatically start that may open a file under /usr/local/cpanel:

    Code:
    service cpanel stop
    service crond stop
    service exim stop
    service httpd stop
    killall leechprotect
    4) At this point, if your server isn't running any unusual services, no processes should have a file open under the /usr/local/cpanel path, which can be verified by running "lsof | grep /usr/local/cpanel" and it should return no output:

    Code:
    lsof | grep /usr/local/cpanel
    If it does print anything then you'll want to stop the service or kill the process listed. Some third-party software may also keep files open under this path and those services would need to be stopped.

    5) Create the new base path where you're going to move the cpanel directory:

    Code:
    mkdir -p /home/usr/local
    6) Run lsof one more time to make sure it doesn't print anything and then move the directory:

    Code:
    lsof | grep /usr/local/cpanel
    
    mv /usr/local/cpanel /home/usr/local/cpanel
    7) Ensure that the move completed without errors and that the "/usr/local/cpanel" directory no longer exists.

    8) Create an empty /usr/local/cpanel directory with correct permissions:

    Code:
    mkdir /usr/local/cpanel
    
    chmod 711 /usr/local/cpanel
    9) Make a backup of /etc/fstab, and then add a bind-mount entry to mount /home/usr/local/cpanel on /usr/local/cpanel:

    Code:
    cp /etc/fstab /etc/fstab.bak
    
    echo "/home/usr/local/cpanel  /usr/local/cpanel       none    rw,bind         0 0" >> /etc/fstab
    10) Check /etc/fstab and compare it to the backup, you should see the original /etc/fstab contents with the following line added at the bottom:

    Code:
    /home/usr/local/cpanel  /usr/local/cpanel       none    rw,bind         0 0
    11) Mount the directory, then perform a directory listing to make sure you see the usual contents of /usr/local/cpanel there:

    Code:
    mount /usr/local/cpanel
    
    ls /usr/local/cpanel
    12) Reboot the server. This will ensure that any stale CageFS or VirtFS filesystem mounts are cleared, restarts any services that were stopped, and most importantly will test the /etc/fstab entry during the boot process to make sure it will work, so that there will not be any surprises in the future. Be prepared to perform maintenance via the server console if a problem with /etc/fstab causes the boot process to fail.


    That's it. Continue to reference "/usr/local/cpanel" in any custom code you may write (pretend "/home/usr/local/cpanel" doesn't exist). The use of a bind-mount rather than a symlink should ensure that everything works as if the files were located under the original path.
     
    #1 cPanelChrisD, Dec 9, 2014
    Last edited by a moderator: Apr 7, 2015
  2. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    Thanks for pasting this here. However can you please address the valid issues that were raised in the other thread that you have elected to close? When can we get a permanent fix to this that does not cost us money?
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth

    While I appreciate the reply, it is a tad disingenuous to post flippant replies such as 'just get a new sever, you need one anyway' but you fail to make a constructive reply. That is not being rude, arrogant, or complaining. It is simply pointing out that many of your replies in the other thread were tantamount to poking the bear rather than offering real solutions. When can we expect 'a developer' to at least come in here and offer some feedback since you have stated that you will not be able to help any further?
     
    #4 PCZero, Dec 26, 2014
    Last edited by a moderator: Apr 7, 2015
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello PCZero, you know whats disingenuous? Paraphrasing my comments, multiple times now. Have a closer read of the whole thread.

    Please stop.
     
  6. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    Thank you sir...
    YOU HAVE CONTINUALLY PROVEN MY POINT WITH YOUR CRASS NON-ANSWERS JUST LIKE THE LAST POST!

    a.jpg
     
    #6 PCZero, Dec 26, 2014
    Last edited: Dec 27, 2014
  7. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    Never Mind
     
    #7 PCZero, Dec 28, 2014
    Last edited: Dec 28, 2014
  8. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    Blocker found: Cannot upgrade due to insufficient disk space.

    Blocker found: Cannot upgrade due to insufficient disk space. Detected 2.92GB. You will need at least 3GB to install/update to a new version of cPanel.

    WHM 11.48.0 (build 11)
    CentOS5

    Code:
    	Device 	Size 	Used 	Available 	Percent Used 	Mount Point
    	/dev/sda1 	99M 	75M 	20M 	80% 	/boot
    	/dev/sda2 	60G 	22G 	35G 	39% 	/var
    	/dev/sda3 	12G 	8.3G 	3.0G 	74% 	/usr
    	/dev/sda5 	9.9G 	2.1G 	7.4G 	22% 	/
    	/dev/sda7 	1008M 	48M 	910M 	5% 	/tmp
    	/dev/sda8 	374G 	78G 	278G 	22% 	/home
    	/dev/sdb1 	148G 	188M 	140G 	1% 	/backup
    	/dev/sdb2 	311G 	16G 	280G 	6% 	/home2
    Now what?
     
  9. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    will try this work around on our next server maint period....
     
  10. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    After a few weeks of it working, its back again..(never got around to trying the undesired workaround)

    Code:
    fatal,Cannot upgrade due to insufficient disk space. Detected 2.69GB. You will need at least 3GB to install/update to a new version of cPanel.
    
    sigh
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you let us know if the workaround is helpful? Or, do you plan to change the partition setup?

    Thank you.
     
  12. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    376
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    There's currently no specific time frame available on when the changes stemming from internal case number 167901 (staging directories for upcp) will become available. It looks like the work is complete, however updates this week were for the targeted security release. When the new feature is implemented, you can see the new staging options when you browse to "WHM Home »Server Configuration » Update Preferences".

    Thank you.
     
  14. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    While it is useful for those desiring an immediate fix, I am also more interested in finding out when the internal case number 167901 (staging directories for upcp) fix will become available.

    We do not plan to change the partition setup, currently at 12GB (above cP recommended size at time of server order at Softlayer)
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    As mentioned in my previous response, we don't have an exact time frame available on the publication of these changes. I'd expect it in the coming weeks, but we don't put out specific time frames because several factors contribute to when updates are pushed out.

    Thank you.
     
  16. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    Understood.. We'll just wait for the release then, thanks.
     
  17. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    In my email I see "The system automatically selected "/home" as a staging directory. All update data will be stored here..." Looking in WHM Update Preferences I now see Staging Directory and Enter a directory name or choose a partition from the table below. It allows me to set /home as the staging directory.Now to see tomorrow if it works.
     
  18. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Internal case number 167909 was included with cPanel version 11.46.3.3. You can see the new staging options when you browse to "WHM Home »Server Configuration » Update Preferences" after updating to this version (assuming you are using cPanel 11.46).

    Thank you.
     
  19. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm see this email and message in WHM as well however there is no Staging Directory settings WHM Update Preferences and all the updates still fail.

    Wait.. you said its on 11.46.3.3?
    We're up at 11.48.1.2 so should we downgrade (never a good idea..) or what?

    How? (You cannot select tiers that are older than the installed version.)
     
  20. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    This was the first email I had stating not enough space. Interestingly I am on version
    11.48.2.3 General Availability - Recommended.
     
    #20 asmithjr, Mar 26, 2015
    Last edited by a moderator: Apr 7, 2015
Loading...

Share This Page