Storage Question - mdadm - residual metadata for "old" /dev/md0
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Storage Question - mdadm - residual metadata for "old" /dev/md0
I've just finished building an 8-device array using CentOS 5.2, and on trying to create my mdadm.conf have discovered a we oddity.
Prior to building any arrays for real, I installed the OS on a single drive, and built a test array of 4 drives using small slices so that I could force some drive failures and practice rebuilding. The test array was designated /dev/md0.
I have since slid in a new motherboard (needed more SATA ports), and reinstalled the OS on twin drives using RAID1. This is on
See that second /dev/md0? Yes, that seems to be left over from the practice device I built a couple of weeks ago. After doing a complete rebuild on fresh drives, I can only think that this is residual config data left on one of the drives in the array (of 8).
Now if I try to examine "/dev/md0", I get info on the valid device:
[root@bliksem ~]# mdadm -D /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Mon Sep 8 05:27:06 2008
Raid Level : raid1
Array Size : 1020032 (996.29 MiB 1044.51 MB)
Used Dev Size : 1020032 (996.29 MiB 1044.51 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Mon Sep 8 21:29:59 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
I am not sure I can help but here is my contribution:
Can we see /proc/mdstat please?
/etc/mdadm.conf is not needed nowadays, ....I suppose.
Maybe you might solve your "issue" by removing md0 and building it again.
md1 : active raid1 sdb2[1] sda2[0]
222692928 blocks [2/2] [UU]
unused devices: <none>
Hmm, I'm a little reluctant to remove md0, that hosting my /boot partition ... possibly I could do it by breaking the mirror & booting off one disk only, though I haven't tried this before, so am considering alternatives first :-)
Just in case anyone else gets as bugged as I did by this, here is what I did to get rid of the residual metadata on /dev/sdg. Some may be inclined to let a trivial thing like this go by, but I'm about to invest a lot of trust in this array, so I want it to be set up right.
I took a guess that the superblock on /dev/sdg (no longer relevant) is what we want to erase. There is no data on this array as yet, so this will be a. quicker (no need to umount, mark device as faulty, etc.), & b. less risky -- if it all goes horribly wrong I can recreate the device and file system -- takes about 18 hours.
The following command only ever listed the valid mds:
root@bliksem:~> mdadm --assemble -v /dev/md3 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1
mdadm: looking for devices for /dev/md3
mdadm: /dev/sdc1 is identified as a member of /dev/md3, slot 0.
mdadm: /dev/sdd1 is identified as a member of /dev/md3, slot 1.
mdadm: /dev/sde1 is identified as a member of /dev/md3, slot 2.
mdadm: /dev/sdf1 is identified as a member of /dev/md3, slot 3.
mdadm: /dev/sdg1 is identified as a member of /dev/md3, slot 4.
mdadm: /dev/sdh1 is identified as a member of /dev/md3, slot 5.
mdadm: /dev/sdi1 is identified as a member of /dev/md3, slot 6.
mdadm: /dev/sdj1 is identified as a member of /dev/md3, slot 7.
mdadm: added /dev/sdd1 to /dev/md3 as 1
mdadm: added /dev/sde1 to /dev/md3 as 2
mdadm: added /dev/sdf1 to /dev/md3 as 3
mdadm: added /dev/sdg1 to /dev/md3 as 4
mdadm: added /dev/sdh1 to /dev/md3 as 5
mdadm: added /dev/sdi1 to /dev/md3 as 6
mdadm: added /dev/sdj1 to /dev/md3 as 7
mdadm: added /dev/sdc1 to /dev/md3 as 0
mdadm: /dev/md3 has been started with 8 drives.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.