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




















  • 5





    2. wiki.archlinux.org/index.php/Persistent_block_device_naming

    – jasonwryan
    Jan 5 at 21:51











  • 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
    Jan 6 at 8:47


















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




















  • 5





    2. wiki.archlinux.org/index.php/Persistent_block_device_naming

    – jasonwryan
    Jan 5 at 21:51











  • 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
    Jan 6 at 8:47
















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
















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















share|improve this question













share|improve this question




share|improve this question








edited Jan 6 at 12:20









Rui F Ribeiro

39.5k1479132




39.5k1479132










asked Jan 5 at 21:50









wmacwmac

1093




1093








  • 5





    2. wiki.archlinux.org/index.php/Persistent_block_device_naming

    – jasonwryan
    Jan 5 at 21:51











  • 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
    Jan 6 at 8:47
















  • 5





    2. wiki.archlinux.org/index.php/Persistent_block_device_naming

    – jasonwryan
    Jan 5 at 21:51











  • 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
    Jan 6 at 8:47










5




5





2. wiki.archlinux.org/index.php/Persistent_block_device_naming

– jasonwryan
Jan 5 at 21:51





2. wiki.archlinux.org/index.php/Persistent_block_device_naming

– jasonwryan
Jan 5 at 21:51













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
Jan 6 at 8:47







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
Jan 6 at 8:47












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
    Jan 6 at 16:29











  • 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
    Jan 6 at 23:06











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


}
});














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
    Jan 6 at 16:29











  • 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
    Jan 6 at 23:06
















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
    Jan 6 at 16:29











  • 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
    Jan 6 at 23:06














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 Jan 6 at 0:26









FabbyFabby

3,82811229




3,82811229













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

    – wmac
    Jan 6 at 16:29











  • 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
    Jan 6 at 23:06



















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

    – wmac
    Jan 6 at 16:29











  • 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
    Jan 6 at 23:06

















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

– wmac
Jan 6 at 16:29





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

– wmac
Jan 6 at 16:29













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
Jan 6 at 23:06





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
Jan 6 at 23:06


















draft saved

draft discarded




















































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.




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

Morgemoulin

Scott Moir

Souastre