LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2016, 10:24 PM   #1
bomurf
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Rep: Reputation: Disabled
Failed HDD question regarding suppression before replacing


Hi,
I just had an interview at a company with a heavy Linux environment and I was asked this question and wasn't quite sure:

If you have a hard drive in a raid array and it's throwing errors and needs replacing, but you see the drive is still in use: what command do you type to suppress the drive and show it as offline before physically removing the drive?

Thanks in advance!
 
Old 03-27-2016, 04:54 PM   #2
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 16.04 LTS
Posts: 234

Rep: Reputation: 65
Quote:
Originally Posted by bomurf View Post
Hi,
I just had an interview at a company with a heavy Linux environment and I was asked this question and wasn't quite sure:

If you have a hard drive in a raid array and it's throwing errors and needs replacing, but you see the drive is still in use: what command do you type to suppress the drive and show it as offline before physically removing the drive?
So what was your answer?
 
Old 03-27-2016, 07:04 PM   #3
bomurf
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
"umount /dev/sd"[drive letter] ?
 
Old 03-27-2016, 07:53 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,569

Rep: Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130
Not if it's in a raid array, the individual partitions are not mounted separately.

The answer is it depends on if it's a hardware vs software raid, and if hardware, what the manufacturer's tools are.
 
Old 03-27-2016, 07:58 PM   #5
bomurf
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Damn! I blew that one then...so if it's a software raid what would need to be done?
 
Old 03-27-2016, 08:48 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,569

Rep: Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130Reputation: 2130
I don't know off the top of my head, I'd have to look at the man page for mdadm (the Linux software raid manager).
 
Old 03-28-2016, 06:37 AM   #7
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 16.04 LTS
Posts: 234

Rep: Reputation: 65
If they use mdadm, then you do it like this. Replace the device names as required.

Fail the device if not already in a failed state
Code:
mdadm /dev/md0 --fail /dev/sda1
remove it
Code:
mdadm /dev/md0 --remove /dev/sda1
optionally zero out the superblock
Code:
mdadm --zero-superblock /dev/sda1

Last edited by hortageno; 03-28-2016 at 06:38 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Boot error after replacing failed HD mesri23 Linux - General 14 01-31-2011 11:14 AM
Replacing HDD in an LVM without any ports left for new HDD, therefor using a USB dock boast Linux - General 0 01-12-2010 10:03 AM
replacing the HDD implementing /home file system SaintDanBert Linux - Software 1 01-07-2010 09:21 PM
replacing dead hdd in software raid and lvm. engkeboy Linux - Newbie 1 08-31-2008 02:20 PM
replacing dead hdd in software raid and lvm. engkeboy Linux - Server 1 08-30-2008 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration