Reboot with faulty drive, devices names change, server does not boot












1














I have had this problem on 2 servers and I want to know how should I handle the problem. My server has an SSD (/dev/sda) and two SATA drives (/dev/sdb and /dev/sdc).



The second drive (/dev/sdb) has problem and sometimes the drive is there but filesystem has problem and sometimes the device totally disappears.



Case 1- When the drive is there (ls /dev shows it) but filesystem has problem and I reboot the server (because device is busy and cannot be fsck-ed.), the server will not boot because some services have dependencies on that drive and those services somehow halt boot process.



Drives are mounted in /etc/fstab onto /sdb1 and /sdc1 directories.



Case 2- When the drive (/dev/sdb) disappears,the third drive (previously /dev/sdc) is renamed to /dev/sdb and you can guess it causes problems because that is not the drive my programs expect to see. Again the server will not boot because programs do not see their data on the new sdb.





Question 1: How may I configure the server, so that it boots even if some services cannot see their dependencies on failed drives?



Question 2: How can I avoid drives from appearing with different /dev/name if other drives disappear (failed hardware etc.)?










share|improve this question









New contributor




wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 5




    2. wiki.archlinux.org/index.php/Persistent_block_device_naming
    – jasonwryan
    2 days ago










  • Could you include the output to smartctl --all /dev/sdb in your question to be 100% sure what you're facing is imminent drive failure? (now only 99% certain).
    – Fabby
    yesterday


















1














I have had this problem on 2 servers and I want to know how should I handle the problem. My server has an SSD (/dev/sda) and two SATA drives (/dev/sdb and /dev/sdc).



The second drive (/dev/sdb) has problem and sometimes the drive is there but filesystem has problem and sometimes the device totally disappears.



Case 1- When the drive is there (ls /dev shows it) but filesystem has problem and I reboot the server (because device is busy and cannot be fsck-ed.), the server will not boot because some services have dependencies on that drive and those services somehow halt boot process.



Drives are mounted in /etc/fstab onto /sdb1 and /sdc1 directories.



Case 2- When the drive (/dev/sdb) disappears,the third drive (previously /dev/sdc) is renamed to /dev/sdb and you can guess it causes problems because that is not the drive my programs expect to see. Again the server will not boot because programs do not see their data on the new sdb.





Question 1: How may I configure the server, so that it boots even if some services cannot see their dependencies on failed drives?



Question 2: How can I avoid drives from appearing with different /dev/name if other drives disappear (failed hardware etc.)?










share|improve this question









New contributor




wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 5




    2. wiki.archlinux.org/index.php/Persistent_block_device_naming
    – jasonwryan
    2 days ago










  • Could you include the output to smartctl --all /dev/sdb in your question to be 100% sure what you're facing is imminent drive failure? (now only 99% certain).
    – Fabby
    yesterday
















1












1








1







I have had this problem on 2 servers and I want to know how should I handle the problem. My server has an SSD (/dev/sda) and two SATA drives (/dev/sdb and /dev/sdc).



The second drive (/dev/sdb) has problem and sometimes the drive is there but filesystem has problem and sometimes the device totally disappears.



Case 1- When the drive is there (ls /dev shows it) but filesystem has problem and I reboot the server (because device is busy and cannot be fsck-ed.), the server will not boot because some services have dependencies on that drive and those services somehow halt boot process.



Drives are mounted in /etc/fstab onto /sdb1 and /sdc1 directories.



Case 2- When the drive (/dev/sdb) disappears,the third drive (previously /dev/sdc) is renamed to /dev/sdb and you can guess it causes problems because that is not the drive my programs expect to see. Again the server will not boot because programs do not see their data on the new sdb.





Question 1: How may I configure the server, so that it boots even if some services cannot see their dependencies on failed drives?



Question 2: How can I avoid drives from appearing with different /dev/name if other drives disappear (failed hardware etc.)?










share|improve this question









New contributor




wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have had this problem on 2 servers and I want to know how should I handle the problem. My server has an SSD (/dev/sda) and two SATA drives (/dev/sdb and /dev/sdc).



The second drive (/dev/sdb) has problem and sometimes the drive is there but filesystem has problem and sometimes the device totally disappears.



Case 1- When the drive is there (ls /dev shows it) but filesystem has problem and I reboot the server (because device is busy and cannot be fsck-ed.), the server will not boot because some services have dependencies on that drive and those services somehow halt boot process.



Drives are mounted in /etc/fstab onto /sdb1 and /sdc1 directories.



Case 2- When the drive (/dev/sdb) disappears,the third drive (previously /dev/sdc) is renamed to /dev/sdb and you can guess it causes problems because that is not the drive my programs expect to see. Again the server will not boot because programs do not see their data on the new sdb.





Question 1: How may I configure the server, so that it boots even if some services cannot see their dependencies on failed drives?



Question 2: How can I avoid drives from appearing with different /dev/name if other drives disappear (failed hardware etc.)?







linux mount hard-disk fstab fsck






share|improve this question









New contributor




wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Rui F Ribeiro

39.3k1479131




39.3k1479131






New contributor




wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









wmacwmac

1093




1093




New contributor




wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






wmac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 5




    2. wiki.archlinux.org/index.php/Persistent_block_device_naming
    – jasonwryan
    2 days ago










  • Could you include the output to smartctl --all /dev/sdb in your question to be 100% sure what you're facing is imminent drive failure? (now only 99% certain).
    – Fabby
    yesterday
















  • 5




    2. wiki.archlinux.org/index.php/Persistent_block_device_naming
    – jasonwryan
    2 days ago










  • Could you include the output to smartctl --all /dev/sdb in your question to be 100% sure what you're facing is imminent drive failure? (now only 99% certain).
    – Fabby
    yesterday










5




5




2. wiki.archlinux.org/index.php/Persistent_block_device_naming
– jasonwryan
2 days ago




2. wiki.archlinux.org/index.php/Persistent_block_device_naming
– jasonwryan
2 days ago












Could you include the output to smartctl --all /dev/sdb in your question to be 100% sure what you're facing is imminent drive failure? (now only 99% certain).
– Fabby
yesterday






Could you include the output to smartctl --all /dev/sdb in your question to be 100% sure what you're facing is imminent drive failure? (now only 99% certain).
– Fabby
yesterday












1 Answer
1






active

oldest

votes


















3














Backup /dev/sdb immediately!



Whereas SSDs die suddenly like a heart attack, HDDs die slowly like cancer.



What you are trying to do is to have a software workaround for a hardware problem. You should replace the drive as a disappearing drive means that it's running on its last legs and will die any minute/hour/day now.



Use ddrescue to image that drive onto one of equal or larger size.



This is not an answer to your questions, but this is what you need...






share|improve this answer





















  • Thanks for the advise. If I can convince the service provider that their HD has problem, I'll change it asap.
    – wmac
    yesterday










  • Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)
    – Fabby
    yesterday











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
});


}
});






wmac is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492711%2freboot-with-faulty-drive-devices-names-change-server-does-not-boot%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









3














Backup /dev/sdb immediately!



Whereas SSDs die suddenly like a heart attack, HDDs die slowly like cancer.



What you are trying to do is to have a software workaround for a hardware problem. You should replace the drive as a disappearing drive means that it's running on its last legs and will die any minute/hour/day now.



Use ddrescue to image that drive onto one of equal or larger size.



This is not an answer to your questions, but this is what you need...






share|improve this answer





















  • Thanks for the advise. If I can convince the service provider that their HD has problem, I'll change it asap.
    – wmac
    yesterday










  • Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)
    – Fabby
    yesterday
















3














Backup /dev/sdb immediately!



Whereas SSDs die suddenly like a heart attack, HDDs die slowly like cancer.



What you are trying to do is to have a software workaround for a hardware problem. You should replace the drive as a disappearing drive means that it's running on its last legs and will die any minute/hour/day now.



Use ddrescue to image that drive onto one of equal or larger size.



This is not an answer to your questions, but this is what you need...






share|improve this answer





















  • Thanks for the advise. If I can convince the service provider that their HD has problem, I'll change it asap.
    – wmac
    yesterday










  • Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)
    – Fabby
    yesterday














3












3








3






Backup /dev/sdb immediately!



Whereas SSDs die suddenly like a heart attack, HDDs die slowly like cancer.



What you are trying to do is to have a software workaround for a hardware problem. You should replace the drive as a disappearing drive means that it's running on its last legs and will die any minute/hour/day now.



Use ddrescue to image that drive onto one of equal or larger size.



This is not an answer to your questions, but this is what you need...






share|improve this answer












Backup /dev/sdb immediately!



Whereas SSDs die suddenly like a heart attack, HDDs die slowly like cancer.



What you are trying to do is to have a software workaround for a hardware problem. You should replace the drive as a disappearing drive means that it's running on its last legs and will die any minute/hour/day now.



Use ddrescue to image that drive onto one of equal or larger size.



This is not an answer to your questions, but this is what you need...







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









FabbyFabby

3,74011228




3,74011228












  • Thanks for the advise. If I can convince the service provider that their HD has problem, I'll change it asap.
    – wmac
    yesterday










  • Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)
    – Fabby
    yesterday


















  • Thanks for the advise. If I can convince the service provider that their HD has problem, I'll change it asap.
    – wmac
    yesterday










  • Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)
    – Fabby
    yesterday
















Thanks for the advise. If I can convince the service provider that their HD has problem, I'll change it asap.
– wmac
yesterday




Thanks for the advise. If I can convince the service provider that their HD has problem, I'll change it asap.
– wmac
yesterday












Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)
– Fabby
yesterday




Please don't thank me! ;-) If this answer did help, just click the little grey at the left of this text right now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey ☑ and the little up-arrow... If you have any further questions, just ask another one! ;-)
– Fabby
yesterday










wmac is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















wmac is a new contributor. Be nice, and check out our Code of Conduct.













wmac is a new contributor. Be nice, and check out our Code of Conduct.












wmac is a new contributor. Be nice, and check out our Code of Conduct.
















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492711%2freboot-with-faulty-drive-devices-names-change-server-does-not-boot%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How to make a Squid Proxy server?

第一次世界大戦

Touch on Surface Book