LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-07-2014, 02:38 PM   #1
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Rep: Reputation: 17
How can I change super-minor number of a software raid array meta 1.2?


I had a double failure while I was away on the holidays of my array. As I was saving the data, I created a new array on a new drive has /dev/md1.

The original data was on an array listed created as /dev/md0, which I prefer.

How can I change my minor number of the raid back to /dev/md0? When it boots, it is recognized as /dev/md1.

I have read forums and tried various thing like updating assembling the array in this fashion to try to rewrite the superblock to no avail:

Code:
mdadm --assemble /dev/md0 --super-minor=0 --uuid=c35876ca:13e90c31:dc40c61c:eccfa279
Current array info:

Code:
dell-desktop ~ # mdadm -Es
ARRAY /dev/md/1 metadata=1.2 UUID=c35876ca:13e90c31:dc40c61c:eccfa279 name=dell-desktop:1
Code:
dell-desktop ~ # mdadm -E /dev/sdb6
/dev/sdb6:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : c35876ca:13e90c31:dc40c61c:eccfa279
           Name : dell-desktop:1  (local to host dell-desktop)
  Creation Time : Mon Jan  6 19:44:05 2014
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 1898729472 (905.38 GiB 972.15 GB)
     Array Size : 949364544 (905.38 GiB 972.15 GB)
  Used Dev Size : 1898729088 (905.38 GiB 972.15 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 521142b5:2385b1b6:08f36e23:be4ae276

    Update Time : Tue Jan  7 13:57:21 2014
       Checksum : 19503e2a - correct
         Events : 575


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing)
Code:
dell-desktop ~ # cat /proc/mdstat 
Personalities : [raid1] 
md1 : active raid1 sda6[0] sdb6[2]
      949364544 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>
Any help is kindly appreciated

Last edited by narnie; 01-07-2014 at 03:44 PM.
 
Old 01-07-2014, 06:06 PM   #2
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Don't know if this is the proper technique to do it or not, but I modified my /etc/mdadm/mdadm.conf file to look like this:

Code:
dell-desktop ~ $ cat /etc/mdadm/mdadm.conf 
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR nathan.wood805@gmail.com

# definitions of existing MD arrays

# This file was auto-generated on Mon, 18 Feb 2013 16:52:46 -0600
# by mkconf 3.2.5-3
ARRAY /dev/md/1 metadata=1.2 UUID=c35876ca:13e90c31:dc40c61c:eccfa279 name=dell-desktop:1
Changing to this:

Code:
dell-desktop ~ $ cat /etc/mdadm/mdadm.conf 
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR nathan.wood805@gmail.com

# definitions of existing MD arrays

# This file was auto-generated on Mon, 18 Feb 2013 16:52:46 -0600
# by mkconf 3.2.5-3
ARRAY /dev/md0 metadata=1.2 UUID=c35876ca:13e90c31:dc40c61c:eccfa279 name=dell-desktop:1
When I rebooted, it was automatically assembled as /dev/md0. If there is a way to modify the superblock to make the minor number 0, I would prefer that, so if anyone has that solution, please post to this thread. I put the above technique in this thread so someone can get it to work at least this way.
 
  


Reply

Tags
mdadm, minor, 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
Unable to change UUID - Bad magic number in super-block cowmoo32 Linux - Hardware 5 08-02-2013 11:09 AM
Identify and explain the major number, minor number, and revision number in Linux... turbomen Linux - Newbie 1 11-16-2010 02:48 AM
Adding an old software-RAID array to a software-RAID installation.. Boot problems GarethM Linux - Hardware 2 05-05-2008 03:16 PM
What are the hyper super and meta keys? Quantum Jim Linux - Newbie 7 08-07-2004 05:23 PM
why there is a need for minor number and major number for monitor/keyboard in pc? tripathi Solaris / OpenSolaris 1 11-07-2003 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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