LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-12-2021, 02:17 PM   #1
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Rep: Reputation: Disabled
What exactly does dmraid -x do?


The post name speaks for itself, but there are some points to clarify.

I have two hard drives in my computer at the moment, and I want to install MX 19 on the second drive (/dev/sdb). I'm using a live USB version of MX, in case anyone's wondering. Now, the target drive /dev/sdb appears to be a RAID device. This is the output of lsblk -f:

Code:
fd0                                                                                              
loop0       squashfs                                                                    0   100% /live/linux
sda                                                                                              
├─sda1      ext4            rootMX18.1       0f8d47b8-4568-4f8d-a9d3-d74868bf2541                
├─sda2      swap                             74240a4d-fa24-405a-b0cc-04628b8b6100                [SWAP]
├─sda3      ext4            root-MX19        6c7469a4-2bfa-4fc9-8912-483e939657b7                
└─sda4      ext4            boss2-data       adaf34e1-23b0-4ece-9c19-86da3bddb1c2                
sdb         ddf_raid_member                  Dell    \x10                                        
├─sdb1      ext4            root-bunsenlabs3 d2788382-4a93-4a8e-a711-3795a9372144                
├─sdb2      swap                             280968b4-4ad9-4904-8167-a708bb9a4edf                
├─sdb3      ddf_raid_member                  Dell    \x10                                        
└─md126                                                                                          
  ├─md126p1 ext4            root-bunsenlabs3 d2788382-4a93-4a8e-a711-3795a9372144                
  ├─md126p2 swap                             280968b4-4ad9-4904-8167-a708bb9a4edf                [SWAP]
  └─md126p3                                                                                      
sdc                                                                                              
├─sdc1      ext4            Live-usb         eae69e13-7630-4ab1-9cbd-4d40ee9a2d40   10.7G    25% /live/boot-dev
└─sdc2      vfat            LIVE-UEFI        EA11-8EFA
As you can see, I already have another distro and a swap partition on that drive, and there's plenty of space for a new partition. However, since I'm dealing with a RAID device, I can't make a new partition. When I try, gparted throws this error:

Code:
/dev/sdb is apparently in use by the system; will not make a filesystem here!
While the new sdb3 partition does appear, it is unusable due to the prior error. gparted registers it as a filesystem of "unknown" type. After doing some research, I've found that my problem is most likely due to this being a RAID drive. I did not set this up as a RAID drive, nor am I interested in keeping it as such. All I want to do is finish this install.

Here's where I'm stuck, though: I have zero knowledge of how RAID works and how to work with it. Is RAID just a wrapper for the existing partitions? That's the sense I get. If that's the case, can I just delete the RAID wrapper without potential damage to the partitions? I didn't want to try dmraid -x or anything like that without making sure, since I don't want to lose the partitions on this drive.

By the way, and in case anyone's wondering, in my research I also discovered some suggestions to use mdadm instead of dmraid. Yes, I tried it. This was the result:

Code:
$ sudo mdadm --stop /dev/md126
mdadm: Cannot get exclusive access to /dev/md126:Perhaps a running process, mounted filesystem or active volume group?
When I tried sudo dmraid -r, I found that it saw the problem drive:

Code:
/dev/sdb: ddf1, ".ddf1_disks", GROUP, ok, 975699968 sectors, data@ 0
So I know that works.

Thus, the question: What exactly do I need to get rid of the RAID status and format the drive normally? dmraid -x, or something else? And RAID isn't just a wrapper, what would be the best course of action?

Any assistance would be greatly appreciated.
 
Old 11-12-2021, 08:52 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,386
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
I looked at the dmraid man page and could find no reference to a "-x" argument, but it's a long man page and I well might have missed something.

But I did find this article from Intel: How Do I Delete a RAID Array?
 
Old 11-13-2021, 05:51 PM   #3
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
I looked at the dmraid man page and could find no reference to a "-x" argument, but it's a long man page and I well might have missed something.
-x is actually an option, not an argument. From the man page:

Code:
{-x|--remove} [RAID-set]
Delete one or all existing software RAID devices from the metadata.
Quote:
Originally Posted by frankbell View Post
But I did find this article from Intel: How Do I Delete a RAID Array?
Do you know if this will harm the contents of the drive? I don't really care how the array gets deleted; I just want to make sure that nothing is damaged.
 
1 members found this post helpful.
Old 11-13-2021, 08:07 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,386
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
Thanks for straightening out!
 
Old 11-13-2021, 08:59 PM   #5
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Deleting any raid device has the risk of destroying the data. If it has data you want preserved then a backup is advised before doing any config changes.

With the intended use and what has already been done I don't know if it has data or not.

The raid appears to be from a setting in bios and that should be turned off before you do anything else. Then you may no longer see it as raid. Intel raid from bios is not what we normally consider as raid and is AFAIK actually designed to function with windows only.
 
Old 11-14-2021, 02:14 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
So the second disk came from another machine ?.
Quote:
All I want to do is finish this install.
Was the install run on that other machine or did you install it on the current machine ?.
What makes you think there is plenty of space ?.

ddf is indeed a container, but is not "just a wrapper". Read my sigline.
I'd be guessing the ddf RAID has been recognised ok - what does /proc/mdstat show ?.
 
Old 11-16-2021, 11:00 AM   #7
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
So the second disk came from another machine ?. Was the install run on that other machine or did you install it on the current machine ?.
No, the second disk was a blank hard drive which I added to my computer and on which I installed BunsenLabs 3 (see the lsblk output in my original post). To the best of my knowledge, this disk has never been used before.

Quote:
Originally Posted by syg00 View Post
What makes you think there is plenty of space ?.
The second disk is a 500 GB hard drive, of which 52 GB is allocated for BunsenLabs and its swap partition (per GParted).

Quote:
Originally Posted by syg00 View Post
I'd be guessing the ddf RAID has been recognised ok - what does /proc/mdstat show ?.
Code:
Personalities : [raid1]
md126 : active (auto-read-only) raid1 sdb[0]
  487849984 blocks super external:/md127/0 [2/1] [U_]

md127 : inactive sdb[0](S)
  536600 blocks super external:ddf

unused devices: <none>
Quote:
Originally Posted by computersavvy View Post
The raid appears to be from a setting in bios and that should be turned off before you do anything else. Then you may no longer see it as raid.
What BIOS setting is that?
 
Old 11-17-2021, 02:40 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Who knows - it's your machine. But I agree it looks like there is a setting for RAID1 somewhere and when you attached the new disk it fell into address range for that definition.
Quote:
I didn't want to try dmraid -x or anything like that without making sure, since I don't want to lose the partitions on this drive.
Why ?. If it's a new install, what is the loss ?.
Disable the RAID, if it all shows up ok well and good. Else do the install again. Simple.
 
  


Reply

Tags
dmraid, raid



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
Dmraid does not activate partitions Wurstbrot Linux - Software 2 11-14-2009 09:40 AM
wht exactly does tar do , im tryin to figure out what that does adamf4i Linux - Newbie 19 08-07-2006 07:36 PM
Promise Fasttrack RAID on Mandrake 10.1 | dmraid, driver, headaches, Debian? rokkon Linux - Hardware 7 12-18-2005 07:15 AM
Installing 2.6 using dmraid on Promise FastTrak Erhnam Linux - Hardware 1 04-11-2005 10:47 AM
Does FC3 include dmraid msryke Linux - Hardware 3 01-21-2005 05:55 AM

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

All times are GMT -5. The time now is 10:16 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