LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-21-2011, 06:25 AM   #1
dime111
LQ Newbie
 
Registered: Jan 2011
Posts: 29

Rep: Reputation: 0
disable raid ?


Hello
On our server we have two 750 gig hard drive which are in software raid mod
the server is up and running with OS and everything on first hard sda0
I need to disable raid on hard drives so i can use both hard drive sepreatly
as sda0 and sdb0
I dont want to touch anything on first hard drive just get second hard out of raid and repartion and reformat it for my backup usage
How can i do this ?
Regards
 
Old 04-21-2011, 08:11 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
First some terminology:
sda - hard drive
sda0 - first partition on sda
md0 - raid made up of partitions

You can break the raid up if it is raid 1 (Not raid 0!!!)
Check that by
Code:
 cat /proc/mdstat
So if sda0 and sdb0 are two partitions making a raid1 named md0, what you do is fail one of the partitions:

Code:
mdadm --manage /dev/md0 --fail /dev/sdb0
mdadm --manage /dev/md0 --remove /dev/sdb0
Once there are no unfailed partitions on sdb you can safely reuse it. You can't change sda to non-raid without saving the data and reformatting the partition, but that's ok. It won't hurt anything to leave it as a degraded raid 1.

Last edited by smallpond; 04-21-2011 at 08:14 AM. Reason: Forgot a line
 
Old 04-21-2011, 08:22 AM   #3
dime111
LQ Newbie
 
Registered: Jan 2011
Posts: 29

Original Poster
Rep: Reputation: 0
Thank you
Yes my mistake i meant sda and sdb

this is result of cat /proc/mdstat

Quote:
md0 : active raid1 sdb1[1] sda1[0]
4198976 blocks [2/2] [UU]

md1 : active raid1 sdb2[1] sda2[0]
2104448 blocks [2/2] [UU]

md2 : active raid1 sdb3[1] sda3[0]
726266432 blocks [2/2] [UU]
So i just need to follow the rest of your guide ? and then fdisk sdb and repartiton right ?
It wont cause any damage to first hard drive and OS on it ?
Regards
 
Old 04-21-2011, 12:14 PM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Always have backups. There's always a chance of something going wrong. Power could go out in the middle of the update.

You should be able to follow the above steps for each of the 3 mds, carefully(!) substituting in the right values.
 
Old 04-25-2011, 05:50 AM   #5
dime111
LQ Newbie
 
Registered: Jan 2011
Posts: 29

Original Poster
Rep: Reputation: 0
Thanks
I have done as you said also removed mdadm.conf in /etc
then re foramtted second hard and re partitioned it.
The only thing is little strange is
when i type fdisk -l i see following

Quote:
Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 262 2102562 fd Linux raid autodetect
/dev/sda2 263 295 265072+ fd Linux raid autodetect
/dev/sda3 296 36481 290664045 fd Linux raid autodetect

Disk /dev/sdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 24320 195350368+ 83 Linux
/dev/sdb2 24321 36481 97683232+ 83 Linux

Disk /dev/md2: 297.6 GB, 297639870464 bytes
2 heads, 4 sectors/track, 72665984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 271 MB, 271319040 bytes
2 heads, 4 sectors/track, 66240 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md0: 2152 MB, 2152923136 bytes
2 heads, 4 sectors/track, 525616 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table
and when type cat /proc/mdstat i see following
Quote:
md0 : active raid1 sda1[0]
2102464 blocks [2/1] [U_]

md1 : active raid1 sda2[0]
264960 blocks [2/1] [U_]

md2 : active raid1 sda3[0]
290663936 blocks [2/1] [U_]
It seems second hard drive is no longer in raid mode but first one is somehow still raid
So am i ok or need to do something more ?
Regards
 
  


Reply



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
how to disable Text-to-speechmanager on startup, and disable fsck after 20 boots Kristian2 Slackware 2 02-25-2009 10:55 AM
LXer: Tutorial: Linux RAID Smackdown: Crush RAID 5 with RAID 10 LXer Syndicated Linux News 0 08-14-2008 11:20 PM
LXer: Linux RAID Smackdown: Crush RAID 5 with RAID 10 LXer Syndicated Linux News 0 02-26-2008 09:40 PM
dbx command for corrosponding commands disable or disable on gdb bshankha AIX 0 09-26-2006 09:38 AM
what are the services i can disable, also disable ads, banners in konqueror? greythorne SUSE / openSUSE 3 03-16-2005 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:40 PM.

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
Open Source Consulting | Domain Registration