Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Accidentaly moved /lib to /run/lib
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Accidentaly moved /lib to /run/lib

sandrosandro Member
edited January 2013 in General

I made a mess :)

I was logged as root via SFTP and with a move of the mouse I moved /lib inside /run so the new path is now /run/lib
This is the output of the operation

Response: New directory is: "/"
Command: ls
Status: Listing directory /
Status: Directory listing successful
Status: Renaming '/lib' to '/run/lib'
Command: mv "lib" "/run/lib"
Status: /lib -> /run/lib
Status: Retrieving directory listing...

Is this what really happened? Just to confirm.
So do you think that I could ask the host (unmanaged VPS!!) to move the file back to its original location? Do you think they'll do and do you think they can even do it?
I can't basically log into anything anymore after I logged out last, when I still was logged via SSH I noticed that all the commands like "cp" "mv" etc weren't working anymore. Serial Console doesn't work either!

Is this solvable with a simple move back and reboot?

Thank you

Permission to mock me granted.

Comments

  • jhjh Member

    The host should be able to move it back easily.

  • SFTP
    root

    oh dearie me

  • they can just move the file back to the correct directory, with the container in a shutdown state.

  • BogdacutuuBogdacutuu Member
    edited January 2013

    They certainly can do it. It's an unmanaged VPS so they might not want to do it, but what's the worst that can happen if you ask them? :)

    Be more careful next time!

  • Isn't /run a tmpfs? If it is, make sure your provider doesn't shut the container down, or the whole thing will be deleted.

  • who needs libs anyway

  • How do I know if it's a tmpfs?

    @BogdacutuuBogdacutuu what do you mean? commands don't work anymore!

  • jhjh Member

    Are you on OpenVZ or something else?

  • @sandro said: commands don't work anymore!

    okay, maybe you do need SOME libs, but definitely not all of them :P

  • @jhadley said: Are you on OpenVZ or something else?

    It's OpenVZ Ubuntu 12.04

  • jhjh Member

    @sandro said: It's OpenVZ Ubuntu 12.04

    Just speak to your host. They can navigate through your file system quickly and easily without shutting anything down etc.

  • IntcsIntcs Member
    edited January 2013

    A side question, does this suggest that OVZ is more flexible in similar situations? As I suppose it's a longer process if the host help was needed for something similar, but in an XEN/KVM container?

  • jhjh Member

    @Intcs said: A side question, does this suggest that OVZ is more flexible in similar situations? As I suppose it's a longer process if the host help was needed for something similar, but in an XEN/KVM container?

    In Xen/KVM it would be a case of shutting down and mounting the disk on the host node.

  • IntcsIntcs Member
    edited January 2013

    @jhadley said: In Xen/KVM it would be a case of shutting down and mounting the disk on the host node.

    The whole container right? So it might take the host up to some hours for just doing the transfer, if I have like >50 gb, is that correct?! Or he can mount it from where it's?

  • jhjh Member

    @Intcs said: The whole container right? So it might take the host up to some hours for just doing the transfer, if I have like >50 gb, is that correct?! Or he can mount it from where it's?

    No reason it has to be moved.

  • @jhadley said: No reason it has to be moved.

    Ok. I've thought it will need to in other platforms than OVZ :) So, OVZ has no advantage in that matter too :)

  • prometeusprometeus Member, Host Rep

    if you still have access to the console you can use
    LD_PRELOAD=/root/lib xxxx

    to execute a command (i.e. the mv)

  • sandrosandro Member
    edited January 2013

    @prometeus said: if you still have access to the console you can use

    LD_PRELOAD=/root/lib xxxx
    to execute a command (i.e. the mv)

    unfortunately when I enter it I get

    Starting PowerConsole v1.3 <> (c)2012 soluslabs ltd.

    please wait...
    successfully logged in.
    entered into CT 12257
    Enter failed: unable to exec sh: No such file or directory
    exited from CT 12257

    I'll contact the host now.

  • Host moved the folder back to its original location and everything is back to normal :) No need to reboot.

Sign In or Register to comment.