LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-21-2024, 07:45 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Upgrade of L:inux loses reference to RAID array


I've just upgraded a computer to Slackware 15.0. This computer has two RAID arrays (3 including a swap array):
Code:
/dev/md2         swap             swap        defaults         0   0
/dev/md1         /                ext4        defaults         1   1
/dev/md0        /mnt/RAID       auto    defaults,acl    0       0
MD1 is the boot device. MD0 is the NAS and was unmounted and removed from /etc/fstab during the upgrade. After upgrading, the computer booted just fine off MD1.

Then I tried to mount /dev/md0 and got "can't read superblock on /dev/md0". When I did a blkid on this system, /dev/md0 was nowhere listed, but I now have a /dev/md127! When I mounted that (ro) it does have the contents of what used to be /dev/md0. I don't know if this had anything to do with the OS upgrade, but it was definitely /dev/md0 before.

How can I "rename" this array back to /dev/md0?
 
Old 01-21-2024, 08:51 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897
Look at the output of the command:
Quote:
mdadm --detail /dev/md127
At the bottom there will be a line
Quote:
Name : hostname:XX (local to host hostname)
Is XX 0 or 127?

Code:
mdadm --stop /dev/md127
mdadm --assemble /dev/md/0 --name=0 --update=name /dev/sdx /dev/sdy ...
Update your /etc/mdadm.conf file if necessary.

That should work but as always make sure important data is backed up...
 
2 members found this post helpful.
Old 01-21-2024, 09:11 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by michaelk View Post
Look at the output of the command:

At the bottom there will be a line
Code:
Name : hostname:XX (local to host hostname)
Is XX 0 or 127?
Before trying your other suggestions I thought I'd answer this question first:
Code:
Name : OHPRSstorage:0
Furthermore, I followed your suggestion to check mdadm.conf. As it turned out, the Slackware upgrade clobbered that file and saved the original in mdadm.conf.orig. I renamed that back to mdadm.conf, rebooted and all is back to normal!!!

I'm usually very carefully check the .new configs before keeping or overwriting, but I must have missed that one.

Thanks for putting me on the right track!

Last edited by mfoley; 01-21-2024 at 09:13 PM.
 
  


Reply

Tags
raid, superblock



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
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 11:50 AM
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 09:20 AM
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 08:20 AM
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 05:21 AM
software Firewire 800 RAID array loses formatting on reboot monty Linux - Hardware 3 11-29-2004 11:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:55 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
Open Source Consulting | Domain Registration