Showing posts with label mdadm. Show all posts
Showing posts with label mdadm. Show all posts

Thursday, 12 February 2015

mdadm changes the name of my new array to md127... topic






Hello everyone,

This has been bugging me for some time now. Every time I create a new array using mdadm the name is changed from what I originally specified.

Here's what I'm doing.

Created the array from two new disks:


Code:


mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1

Made the filesystem:


Code:


mkfs.ext3 /dev/md0

Updated mdadm.conf:


Code:


mdadm --detail --scan >> /etc/mdadm/mdadm.conf

Added the array to /etc/fstab:


Code:


/dev/md0 /mnt/mymountpoint ext3 defaults 0 1

Everything looks great... until I reboot the machine.

Upon reboot I receive the message that the filesystem on /dev/md0 is either missing or busy. I skip this... and then discover that my new array is no longer called /dev/md0.

Now, it is /dev/md127.

What am I doing wrong? This happens every time I create an array and on multiple different systems. I'm assuming that I'm just being an idiot here but your help is greatly appreciated as I would prefer for my arrays to retain the name I specify when creating them.

Thank you!






Monday, 9 February 2015

[ubuntu] 14.04 mdadm + bcache with an SSD? topic






Hi everyone,
i have a Lenovo P300 Workstation configured with Ubuntu 14.04 LTS 64 bit and working with the following configuration:
-/dev/sda 2tb hdd, /dev/sda1 /boot, /dev/sda2 /swap, /dev/sda3 / - part of raid
-/dev/sdb 2tb hdd, /dev/sda1 unused, /dev/sda2 /swap, /dev/sda3 / - part of raid


I've also bought a 256GB SSD, /dev/sdc.
I'm trying to find if it's possible to configure this SSD as cache of the root "/" partition /dev/md0, that is a raid 1 software with mdadm! Any ideas or link for me? Google isn't helping... : (


Thanks in advance






Sunday, 8 February 2015

mdadm disk replacement keeps failing topic






Hi,

I have a Raid 5 setup thats been running for years. About 3 time I had a disk fail, and replaced it with a new one. I'm no Linux expert so I have been working mainly through webmin doing all this.

2 months ago I had another disk fail, and I replaced it with a used disk I had laying around (according to sticker its almost 6 years old). At the same time I decided to reinstall the OS. I'm now running Ubuntu Linux 14.10.

A week ago I noticed degraded performance so I checked s.m.a.r.t status, and the the last added disk had 394 errors. I decided to buy a new one and swapped it in yesterday. This process went differently than usual. After boot madam didn't recover the raid. I got it back up by:

Code:


sudo mdadm --stop /dev/md127

and

Code:


mdadm --assemble --force /dev/md127 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2

The raid came up and started to rebuild itself. Speed was ok but after some hours someting happened.

Code:


henrik@ocean:~$ sudo mdadm --detail /dev/md127[sudo] password for henrik:
/dev/md127:
        Version : 0.90
  Creation Time : Sun Jan 16 16:54:05 2011
    Raid Level : raid5
    Array Size : 5766792000 (5499.64 GiB 5905.20 GB)
  Used Dev Size : 1922264000 (1833.21 GiB 1968.40 GB)
  Raid Devices : 4
  Total Devices : 4
Preferred Minor : 127
    Persistence : Superblock is persistent


    Update Time : Sun Feb  8 07:58:01 2015
          State : clean, FAILED
Active Devices : 2
Working Devices : 3
Failed Devices : 1
  Spare Devices : 1


        Layout : left-symmetric
    Chunk Size : 64K


          UUID : 6b4d814c:5c337c42:e68158d3:bcc31e01
        Events : 0.371442


    Number  Major  Minor  RaidDevice State
      0      0        0        0      removed
      2      0        0        2      removed
      2      8      34        2      active sync  /dev/sdc2
      3      8      50        3      active sync  /dev/sdd2


      4      8        2        -      faulty  /dev/sda2
      5      8      18        -      spare  /dev/sdb2
henrik@ocean:~$ sudo mdadm --detail /dev/md127


I rebooted and the raid didn't come up. I assembled it again and the same thing happened after some hours.

The disk I replaced is /dev/sdb. Why is it set as spare? Is it working as part of the raid?

Should I replace /dev/sda now? It seems to have a fine s.m.a.r.t report.

The raid is up and I can access the data. But this situation is not stable. Any advice is appreciated.

/Henrik