I cannot use yum command and ssh after mount drive.(CentOS)
I cannot use yum command after I mount like below.
mount /dev/xvdb3 /usr
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 9.9G 1.9G 7.6G 20% /
none 3.7G 0 3.7G 0% /dev/shm
/dev/xvdb1 1012M 34M 927M 4% /tmp
/dev/xvdb2 20G 250M 19G 2% /var
/dev/xvdb3 15G 1.5G 13G 11% /usr
/dev/mapper/instancevg-instancelv 792G 197M 751G 1% /home
[root@ip-10-0-0-10 ~]# yum
-bash: yum: command not found
I can use yum after I umount /dev/xvdb3.
ssh cannot connect remotely after disconnected from the server.
I MUST REBOOT server to connect by ssh.
What should I do?
ssh centos mount yum command-not-found
add a comment |
I cannot use yum command after I mount like below.
mount /dev/xvdb3 /usr
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 9.9G 1.9G 7.6G 20% /
none 3.7G 0 3.7G 0% /dev/shm
/dev/xvdb1 1012M 34M 927M 4% /tmp
/dev/xvdb2 20G 250M 19G 2% /var
/dev/xvdb3 15G 1.5G 13G 11% /usr
/dev/mapper/instancevg-instancelv 792G 197M 751G 1% /home
[root@ip-10-0-0-10 ~]# yum
-bash: yum: command not found
I can use yum after I umount /dev/xvdb3.
ssh cannot connect remotely after disconnected from the server.
I MUST REBOOT server to connect by ssh.
What should I do?
ssh centos mount yum command-not-found
I believe there is additional info that's missing from this Q that's stalling any of us from being able to help you further. For example this system is not an actual physical host with CentOS on it, correct? It's a virtual machine (I'm assuming it's using XEN), can you confirm this? Also a simplels -l /usr/bin/yum
should reveal ifyum
is installed or not, it many not be working because of other reasons but please do confirm this too.
– slm♦
Mar 7 '14 at 15:30
I'm using amazon ec2 instance store AMI
– garydefty
Mar 7 '14 at 23:47
Why are you mounting these partitions w/ that instance? Is this something you'd normally be doing w/ it or are you doing something else with?
– slm♦
Mar 7 '14 at 23:48
For ec2 m1.large instance got 2 hardisk with 420gb…I make 1st hardisk into 4 partition and mount 3 partition into /tmp /usr /var…another partition comboine with 2nd hardisk and mount into /home…this is what I want to do for the pre-installation of DirectAdmin…
– garydefty
Mar 8 '14 at 2:33
add a comment |
I cannot use yum command after I mount like below.
mount /dev/xvdb3 /usr
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 9.9G 1.9G 7.6G 20% /
none 3.7G 0 3.7G 0% /dev/shm
/dev/xvdb1 1012M 34M 927M 4% /tmp
/dev/xvdb2 20G 250M 19G 2% /var
/dev/xvdb3 15G 1.5G 13G 11% /usr
/dev/mapper/instancevg-instancelv 792G 197M 751G 1% /home
[root@ip-10-0-0-10 ~]# yum
-bash: yum: command not found
I can use yum after I umount /dev/xvdb3.
ssh cannot connect remotely after disconnected from the server.
I MUST REBOOT server to connect by ssh.
What should I do?
ssh centos mount yum command-not-found
I cannot use yum command after I mount like below.
mount /dev/xvdb3 /usr
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 9.9G 1.9G 7.6G 20% /
none 3.7G 0 3.7G 0% /dev/shm
/dev/xvdb1 1012M 34M 927M 4% /tmp
/dev/xvdb2 20G 250M 19G 2% /var
/dev/xvdb3 15G 1.5G 13G 11% /usr
/dev/mapper/instancevg-instancelv 792G 197M 751G 1% /home
[root@ip-10-0-0-10 ~]# yum
-bash: yum: command not found
I can use yum after I umount /dev/xvdb3.
ssh cannot connect remotely after disconnected from the server.
I MUST REBOOT server to connect by ssh.
What should I do?
ssh centos mount yum command-not-found
ssh centos mount yum command-not-found
edited Dec 20 '18 at 0:16
Rui F Ribeiro
39k1479130
39k1479130
asked Mar 7 '14 at 7:35
garydefty
11
11
I believe there is additional info that's missing from this Q that's stalling any of us from being able to help you further. For example this system is not an actual physical host with CentOS on it, correct? It's a virtual machine (I'm assuming it's using XEN), can you confirm this? Also a simplels -l /usr/bin/yum
should reveal ifyum
is installed or not, it many not be working because of other reasons but please do confirm this too.
– slm♦
Mar 7 '14 at 15:30
I'm using amazon ec2 instance store AMI
– garydefty
Mar 7 '14 at 23:47
Why are you mounting these partitions w/ that instance? Is this something you'd normally be doing w/ it or are you doing something else with?
– slm♦
Mar 7 '14 at 23:48
For ec2 m1.large instance got 2 hardisk with 420gb…I make 1st hardisk into 4 partition and mount 3 partition into /tmp /usr /var…another partition comboine with 2nd hardisk and mount into /home…this is what I want to do for the pre-installation of DirectAdmin…
– garydefty
Mar 8 '14 at 2:33
add a comment |
I believe there is additional info that's missing from this Q that's stalling any of us from being able to help you further. For example this system is not an actual physical host with CentOS on it, correct? It's a virtual machine (I'm assuming it's using XEN), can you confirm this? Also a simplels -l /usr/bin/yum
should reveal ifyum
is installed or not, it many not be working because of other reasons but please do confirm this too.
– slm♦
Mar 7 '14 at 15:30
I'm using amazon ec2 instance store AMI
– garydefty
Mar 7 '14 at 23:47
Why are you mounting these partitions w/ that instance? Is this something you'd normally be doing w/ it or are you doing something else with?
– slm♦
Mar 7 '14 at 23:48
For ec2 m1.large instance got 2 hardisk with 420gb…I make 1st hardisk into 4 partition and mount 3 partition into /tmp /usr /var…another partition comboine with 2nd hardisk and mount into /home…this is what I want to do for the pre-installation of DirectAdmin…
– garydefty
Mar 8 '14 at 2:33
I believe there is additional info that's missing from this Q that's stalling any of us from being able to help you further. For example this system is not an actual physical host with CentOS on it, correct? It's a virtual machine (I'm assuming it's using XEN), can you confirm this? Also a simple
ls -l /usr/bin/yum
should reveal if yum
is installed or not, it many not be working because of other reasons but please do confirm this too.– slm♦
Mar 7 '14 at 15:30
I believe there is additional info that's missing from this Q that's stalling any of us from being able to help you further. For example this system is not an actual physical host with CentOS on it, correct? It's a virtual machine (I'm assuming it's using XEN), can you confirm this? Also a simple
ls -l /usr/bin/yum
should reveal if yum
is installed or not, it many not be working because of other reasons but please do confirm this too.– slm♦
Mar 7 '14 at 15:30
I'm using amazon ec2 instance store AMI
– garydefty
Mar 7 '14 at 23:47
I'm using amazon ec2 instance store AMI
– garydefty
Mar 7 '14 at 23:47
Why are you mounting these partitions w/ that instance? Is this something you'd normally be doing w/ it or are you doing something else with?
– slm♦
Mar 7 '14 at 23:48
Why are you mounting these partitions w/ that instance? Is this something you'd normally be doing w/ it or are you doing something else with?
– slm♦
Mar 7 '14 at 23:48
For ec2 m1.large instance got 2 hardisk with 420gb…I make 1st hardisk into 4 partition and mount 3 partition into /tmp /usr /var…another partition comboine with 2nd hardisk and mount into /home…this is what I want to do for the pre-installation of DirectAdmin…
– garydefty
Mar 8 '14 at 2:33
For ec2 m1.large instance got 2 hardisk with 420gb…I make 1st hardisk into 4 partition and mount 3 partition into /tmp /usr /var…another partition comboine with 2nd hardisk and mount into /home…this is what I want to do for the pre-installation of DirectAdmin…
– garydefty
Mar 8 '14 at 2:33
add a comment |
1 Answer
1
active
oldest
votes
If you do which yum
, you will probably get /usr/bin/yum
as an answer.
If you mount /dev/xvdb3
on /usr
all the files under "the old" /usr
are hidden. Unless in the root of /dev/xvdb3
there exists a bin
directory which contains the yum
executable, your bash
shell will not find it.
If there are other yum
executables around, you could try hash -r
which make bash
do a search for yum
instead of trying to find it from the old place it now where to get it from.
The above explains why yum
stops working. As you write in your comment you need more space on /
you can do one of the following:
Move all of the data to the partition
/dev/xvdb3
and mount that partition as/usr
Mount
/dev/xvdb3
some where else (/mnt/usr
), move some of the material from/usr
to/mnt/usr
and create a link in the original location.Ask the (commercial) support of DirectAdmin how to install the packages somewhere else (e.g.
/opt/DirectAdmin
) and mount the/dev/xvdb3
there.
The first of those might be hindered by files being accessed under /usr
making it difficult to move them.
Since /
and /tmp
are different partitions, there is no way to mount /usr
somewhere else to get free space on both, for that you would have to unmount /tmp
after moving away the data in /usr
.
I recommend to try option 3 first to get this (or any other commercial) software installed.
not also affect the yum command. I cannot connect to server (refuse by server) after I disconnected from the server.
– garydefty
Mar 7 '14 at 9:40
I am not sure what you mean. What is the output fromwhich yum
at the time you can use it?
– Anthon
Mar 7 '14 at 10:00
<<<<<-bash: /usr/bin/which: No such file or directory>>>>>this is the output of "which yum" and "which ssh"
– garydefty
Mar 7 '14 at 10:05
And this is at the time you can useyum
as requested? Unmount the drive and try again.
– Anthon
Mar 7 '14 at 10:08
work normal after unmount. For ssh, after disconnected from the server, I cannot reconnect to server. I need to reboot my server to connect the server by ssh. This is the problem.
– garydefty
Mar 7 '14 at 10:14
|
show 2 more comments
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f118547%2fi-cannot-use-yum-command-and-ssh-after-mount-drive-centos%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you do which yum
, you will probably get /usr/bin/yum
as an answer.
If you mount /dev/xvdb3
on /usr
all the files under "the old" /usr
are hidden. Unless in the root of /dev/xvdb3
there exists a bin
directory which contains the yum
executable, your bash
shell will not find it.
If there are other yum
executables around, you could try hash -r
which make bash
do a search for yum
instead of trying to find it from the old place it now where to get it from.
The above explains why yum
stops working. As you write in your comment you need more space on /
you can do one of the following:
Move all of the data to the partition
/dev/xvdb3
and mount that partition as/usr
Mount
/dev/xvdb3
some where else (/mnt/usr
), move some of the material from/usr
to/mnt/usr
and create a link in the original location.Ask the (commercial) support of DirectAdmin how to install the packages somewhere else (e.g.
/opt/DirectAdmin
) and mount the/dev/xvdb3
there.
The first of those might be hindered by files being accessed under /usr
making it difficult to move them.
Since /
and /tmp
are different partitions, there is no way to mount /usr
somewhere else to get free space on both, for that you would have to unmount /tmp
after moving away the data in /usr
.
I recommend to try option 3 first to get this (or any other commercial) software installed.
not also affect the yum command. I cannot connect to server (refuse by server) after I disconnected from the server.
– garydefty
Mar 7 '14 at 9:40
I am not sure what you mean. What is the output fromwhich yum
at the time you can use it?
– Anthon
Mar 7 '14 at 10:00
<<<<<-bash: /usr/bin/which: No such file or directory>>>>>this is the output of "which yum" and "which ssh"
– garydefty
Mar 7 '14 at 10:05
And this is at the time you can useyum
as requested? Unmount the drive and try again.
– Anthon
Mar 7 '14 at 10:08
work normal after unmount. For ssh, after disconnected from the server, I cannot reconnect to server. I need to reboot my server to connect the server by ssh. This is the problem.
– garydefty
Mar 7 '14 at 10:14
|
show 2 more comments
If you do which yum
, you will probably get /usr/bin/yum
as an answer.
If you mount /dev/xvdb3
on /usr
all the files under "the old" /usr
are hidden. Unless in the root of /dev/xvdb3
there exists a bin
directory which contains the yum
executable, your bash
shell will not find it.
If there are other yum
executables around, you could try hash -r
which make bash
do a search for yum
instead of trying to find it from the old place it now where to get it from.
The above explains why yum
stops working. As you write in your comment you need more space on /
you can do one of the following:
Move all of the data to the partition
/dev/xvdb3
and mount that partition as/usr
Mount
/dev/xvdb3
some where else (/mnt/usr
), move some of the material from/usr
to/mnt/usr
and create a link in the original location.Ask the (commercial) support of DirectAdmin how to install the packages somewhere else (e.g.
/opt/DirectAdmin
) and mount the/dev/xvdb3
there.
The first of those might be hindered by files being accessed under /usr
making it difficult to move them.
Since /
and /tmp
are different partitions, there is no way to mount /usr
somewhere else to get free space on both, for that you would have to unmount /tmp
after moving away the data in /usr
.
I recommend to try option 3 first to get this (or any other commercial) software installed.
not also affect the yum command. I cannot connect to server (refuse by server) after I disconnected from the server.
– garydefty
Mar 7 '14 at 9:40
I am not sure what you mean. What is the output fromwhich yum
at the time you can use it?
– Anthon
Mar 7 '14 at 10:00
<<<<<-bash: /usr/bin/which: No such file or directory>>>>>this is the output of "which yum" and "which ssh"
– garydefty
Mar 7 '14 at 10:05
And this is at the time you can useyum
as requested? Unmount the drive and try again.
– Anthon
Mar 7 '14 at 10:08
work normal after unmount. For ssh, after disconnected from the server, I cannot reconnect to server. I need to reboot my server to connect the server by ssh. This is the problem.
– garydefty
Mar 7 '14 at 10:14
|
show 2 more comments
If you do which yum
, you will probably get /usr/bin/yum
as an answer.
If you mount /dev/xvdb3
on /usr
all the files under "the old" /usr
are hidden. Unless in the root of /dev/xvdb3
there exists a bin
directory which contains the yum
executable, your bash
shell will not find it.
If there are other yum
executables around, you could try hash -r
which make bash
do a search for yum
instead of trying to find it from the old place it now where to get it from.
The above explains why yum
stops working. As you write in your comment you need more space on /
you can do one of the following:
Move all of the data to the partition
/dev/xvdb3
and mount that partition as/usr
Mount
/dev/xvdb3
some where else (/mnt/usr
), move some of the material from/usr
to/mnt/usr
and create a link in the original location.Ask the (commercial) support of DirectAdmin how to install the packages somewhere else (e.g.
/opt/DirectAdmin
) and mount the/dev/xvdb3
there.
The first of those might be hindered by files being accessed under /usr
making it difficult to move them.
Since /
and /tmp
are different partitions, there is no way to mount /usr
somewhere else to get free space on both, for that you would have to unmount /tmp
after moving away the data in /usr
.
I recommend to try option 3 first to get this (or any other commercial) software installed.
If you do which yum
, you will probably get /usr/bin/yum
as an answer.
If you mount /dev/xvdb3
on /usr
all the files under "the old" /usr
are hidden. Unless in the root of /dev/xvdb3
there exists a bin
directory which contains the yum
executable, your bash
shell will not find it.
If there are other yum
executables around, you could try hash -r
which make bash
do a search for yum
instead of trying to find it from the old place it now where to get it from.
The above explains why yum
stops working. As you write in your comment you need more space on /
you can do one of the following:
Move all of the data to the partition
/dev/xvdb3
and mount that partition as/usr
Mount
/dev/xvdb3
some where else (/mnt/usr
), move some of the material from/usr
to/mnt/usr
and create a link in the original location.Ask the (commercial) support of DirectAdmin how to install the packages somewhere else (e.g.
/opt/DirectAdmin
) and mount the/dev/xvdb3
there.
The first of those might be hindered by files being accessed under /usr
making it difficult to move them.
Since /
and /tmp
are different partitions, there is no way to mount /usr
somewhere else to get free space on both, for that you would have to unmount /tmp
after moving away the data in /usr
.
I recommend to try option 3 first to get this (or any other commercial) software installed.
edited Mar 8 '14 at 5:51
answered Mar 7 '14 at 7:40
Anthon
60.2k17102163
60.2k17102163
not also affect the yum command. I cannot connect to server (refuse by server) after I disconnected from the server.
– garydefty
Mar 7 '14 at 9:40
I am not sure what you mean. What is the output fromwhich yum
at the time you can use it?
– Anthon
Mar 7 '14 at 10:00
<<<<<-bash: /usr/bin/which: No such file or directory>>>>>this is the output of "which yum" and "which ssh"
– garydefty
Mar 7 '14 at 10:05
And this is at the time you can useyum
as requested? Unmount the drive and try again.
– Anthon
Mar 7 '14 at 10:08
work normal after unmount. For ssh, after disconnected from the server, I cannot reconnect to server. I need to reboot my server to connect the server by ssh. This is the problem.
– garydefty
Mar 7 '14 at 10:14
|
show 2 more comments
not also affect the yum command. I cannot connect to server (refuse by server) after I disconnected from the server.
– garydefty
Mar 7 '14 at 9:40
I am not sure what you mean. What is the output fromwhich yum
at the time you can use it?
– Anthon
Mar 7 '14 at 10:00
<<<<<-bash: /usr/bin/which: No such file or directory>>>>>this is the output of "which yum" and "which ssh"
– garydefty
Mar 7 '14 at 10:05
And this is at the time you can useyum
as requested? Unmount the drive and try again.
– Anthon
Mar 7 '14 at 10:08
work normal after unmount. For ssh, after disconnected from the server, I cannot reconnect to server. I need to reboot my server to connect the server by ssh. This is the problem.
– garydefty
Mar 7 '14 at 10:14
not also affect the yum command. I cannot connect to server (refuse by server) after I disconnected from the server.
– garydefty
Mar 7 '14 at 9:40
not also affect the yum command. I cannot connect to server (refuse by server) after I disconnected from the server.
– garydefty
Mar 7 '14 at 9:40
I am not sure what you mean. What is the output from
which yum
at the time you can use it?– Anthon
Mar 7 '14 at 10:00
I am not sure what you mean. What is the output from
which yum
at the time you can use it?– Anthon
Mar 7 '14 at 10:00
<<<<<-bash: /usr/bin/which: No such file or directory>>>>>this is the output of "which yum" and "which ssh"
– garydefty
Mar 7 '14 at 10:05
<<<<<-bash: /usr/bin/which: No such file or directory>>>>>this is the output of "which yum" and "which ssh"
– garydefty
Mar 7 '14 at 10:05
And this is at the time you can use
yum
as requested? Unmount the drive and try again.– Anthon
Mar 7 '14 at 10:08
And this is at the time you can use
yum
as requested? Unmount the drive and try again.– Anthon
Mar 7 '14 at 10:08
work normal after unmount. For ssh, after disconnected from the server, I cannot reconnect to server. I need to reboot my server to connect the server by ssh. This is the problem.
– garydefty
Mar 7 '14 at 10:14
work normal after unmount. For ssh, after disconnected from the server, I cannot reconnect to server. I need to reboot my server to connect the server by ssh. This is the problem.
– garydefty
Mar 7 '14 at 10:14
|
show 2 more comments
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f118547%2fi-cannot-use-yum-command-and-ssh-after-mount-drive-centos%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I believe there is additional info that's missing from this Q that's stalling any of us from being able to help you further. For example this system is not an actual physical host with CentOS on it, correct? It's a virtual machine (I'm assuming it's using XEN), can you confirm this? Also a simple
ls -l /usr/bin/yum
should reveal ifyum
is installed or not, it many not be working because of other reasons but please do confirm this too.– slm♦
Mar 7 '14 at 15:30
I'm using amazon ec2 instance store AMI
– garydefty
Mar 7 '14 at 23:47
Why are you mounting these partitions w/ that instance? Is this something you'd normally be doing w/ it or are you doing something else with?
– slm♦
Mar 7 '14 at 23:48
For ec2 m1.large instance got 2 hardisk with 420gb…I make 1st hardisk into 4 partition and mount 3 partition into /tmp /usr /var…another partition comboine with 2nd hardisk and mount into /home…this is what I want to do for the pre-installation of DirectAdmin…
– garydefty
Mar 8 '14 at 2:33