Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey all, I had a Linux server (white box) that had two 1TB hard drives in a RAID1 array. The motherboard went out (blown caps) so I scrounged the parts and set them on a shelf. I needed additional disk space in my OpenSUSE workstation so I took one of the drives and installed it. When I ran fdisk -l I saw the drive under /dev/sdc and /dev/sdc1 but I also saw it under /dev/md127 (the old array). I used fdisk to remove partitions and made a new partition of type 83 and using the entire disk but no joy; /dev/md127 is still there. I Googled this problem and as a fix I ran:
Code:
dd if=/dev/urandom of=/dev/sdc bs=1M
I rebooted my computer, ran fdisk -l again and all I saw was /dev/sdc. Yes! Well, no. I created a new partition on /dev/sdc and while I now have /dev/sdc1 I also have /dev/md127 again. I tried to mount /dev/sdc1 and I get this error:
Code:
linux-b8kj:/home/jobee # mount /dev/sdc1 /mnt/temp
mount: unknown filesystem type 'linux_raid_member'
linux-b8kj:/home/jobee #
I even tried mounting /dev/md127; at least it's a different error:
Code:
linux-b8kj:/home/jobee # mount /dev/md127 /mnt/temp
mount: /dev/md127 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/md127,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
linux-b8kj:/home/jobee #
Any ideas on what I can do to return this hard drive to a mountable state?
What is it exactly now you are trying to do? First you dd'd the disk and after that you are trying to activate the mdadm partition?
Does cat /proc/mdstat stil list the partition on the disk? What does mdadm.conf say? Does it list the hard disk as a software raid device? If so you will need to remove it first with -f and -r option.
Sorry for the slow responses; it's been pretty busy here. On a lighter note, my 2015 budget was approved in entirety.
dalai lama,
Quote:
What is it exactly now you are trying to do?
All I'm trying to do is get this 1TB hard drive in a condition where it can be used in my workstation (OpenSUSE 13.1)
Quote:
First you dd'd the disk and after that you are trying to activate the mdadm partition?
I did the dd thinking that would erase whatever is left on it that's preventing me from using the drive. The part about creating a one-drive array was something I read that was supposed to fix the problem
Quote:
Does cat /proc/mdstat stil list the partition on the disk?
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Really, it is very hard to nuke a mdadm array beyond repair. I tried it as well for testing a backup procedure and it is really hard.
I am wondering something. You issued the dd command from /dev/random with a BS of 1M. This drive is 1 TB. That should have taken hours if not days to complete. First it is 1,000,000 blocks, secondly you asked for 10e9 random numbers. I didn't you hear complaining about it. So I really doubt if the writing was completed correctly.
My favorite way of nuking mdadm arrays:
Code:
dd if=/dev/zero of=/dev/sdc BS=100M
At the end you should see that about 1,000,000,000,000 bytes have been written. A bit more because of the 1024x1024x1024... yada yada.
Once you have seen that it is unlikely that the array survived that.
linux-b8kj:/mnt/stuff/Test # ls -l
total 4
-rw-r--r-- 1 root root 29 Nov 24 15:13 hello.txt
linux-b8kj:/mnt/stuff/Test # cat hello.txt
This is only a test. Honest. linux-b8kj:/mnt/stuff/Test #
linux-b8kj:/mnt/stuff/Test #
Looks like I can mount the drive, create folders and files and edit them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.