Hot answers tagged

36

Using mdadm 3.3 Since mdadm 3.3 (released 2013, Sep 3), if you have a 3.2+ kernel, you can proceed as follows: # mdadm /dev/md0 --add /dev/sdc1 # mdadm /dev/md0 --replace /dev/sdd1 --with /dev/sdc1 sdd1 is the device you want to replace, sdc1 is the preferred device to do so and must be declared as a spare on your array. The --with option is optional, ...


6

You have two 3TB disks storing 6TB data. You want to install one new 3TB disk. This will allow you to convert the three 3TB disks into a RAID5 array storing 6TB data. However, the process is rather fiddly and the opportunities for losing data somewhere along the route are fairly large. Steps to achieve the requirement Let's declare the disks as sda (...


6

OK, it looks like we have now access to the raid. At least the first checked files looked good. So here is what we have done: The raid recovery article on the kernel.org wiki suggests two possible solutions for our problem: using --assemble --force (also mentioned by derobert) The article says: [...] If the event count differs by less than 50, then the ...


5

Yes, you can (provided you have a 3.2+ kernel). First, add a new drive as a spare: mdadm /dev/md0 --add /dev/sdc1 (replace md0 and sdc1 with your RAID and disk device, respectively). Then, initiate a copy-replace operation like this: echo want_replacement > /sys/block/md0/md/dev-sdd1/state Where md0 is, again, your RAID device, and sdd1 is the ...


5

You have a fake hardware raid controller. In reality it is a pure software raid, that happens to have bios support. If you do not need to dual boot with Windows, then you are better off not using it, and instead using pure Linux software raid, which has far better support. To rebuild the system that way, first delete the raid array in the bios utility, ...


5

In case of a software raid setup on Windows this is probably a fake-raid. You should install the package dmraid which will handle access to such raid-5 systems. Do make a backup of your data before you start. You can try out dmraid by booting from CD and installing it, without any need to change the Windows setup. dmraid probably only works on the hardware ...


5

Look at the reshape status: Update Time : Wed May 22 17:58:37 2019 State : clean, reshaping ... Reshape Status : 5% complete Delta Devices : 1, (2->3) You won't get any extra storage until it's completed, and the report you've provided shows that it's currently at only 5% complete. DO NOT interrupt the process or try to change the shape ...


3

I assume you did a fresh install and added the drives to the new computer. First do a: mdadm --assemble --scan and look in /proc/mdstat if the array has been activated. Then run: mdadm --examine --scan >> /etc/mdadm/mdadm.conf to get the config information in your new mdadm.conf again.


3

In RAID-5, unless your write was large enough to cover all data chunks for a given parity chunk, it has to read the missing data chunks in order to be able to recalculate and update parity. Thus a relatively small write on a RAID-5 can turn into a large read operation. RAID-1 does not need such additional reads, as there is no parity, it just writes to all ...


3

All the operations you did were to change the RAID partition structure, but none of those actually resize the filesystem written on it. This means that the filesystem is not aware of the changes you did and if you ask it about its size, it will give you the size it was created. To correct that, you can run resize2fs /dev/md3.


3

I can't really speak for BTRFS, but for Linux mdadm software RAID, it supports RAID5 on two drives. However that is only meant as a transitional stage to allow for growing RAID1 to RAID5. In other words, RAID5 on two drives has the same physical layout as RAID1, just declared differently (even if a two drive RAID5 were considered to have parity, the parity ...


3

This may be possible meeting the requirements online don't stress any disk except for the one which is to be replaced But even if the following may work you will probably not find any recommendation of that kind "in the books"... Idea: Take disk OLD out of the array (for a short moment): mdadm --manage /dev/raid5 --fail /dev/OLD Create a new md device (...


3

If you don't mind running RAID-6 (2 parity disks rather than 1), and if you're running mdadmin 3.1.x or higher, you could convert your RAID-5 array to RAID-6 to add an additional parity disk. This will will place the array under stress during the rebuild, however. And it has some performance implications since there are more parity disks to update during ...


3

If you actually have a RAID configured through hardware (i.e., the operating system sees fewer physical disks than you actually have) there's no hardware to software conversion method. You have to back up the data to an alternate location, convert the RAID manually, and restore.


3

So you're inside a rescue system now? You need mount all these LVs somewhere, for example to /mnt/target: lv_root -> /mnt/target/ lv_boot -> /mnt/target/boot lv_home -> /mnt/target/home ... Then you need to bind-mount the kernel filesystems: for i in proc sys run dev; do mount --bind /$i /mnt/target/$i; done Now you can change into this "dead" system ...


3

How did you partition the disks the first time? If you used fdisk, you may have limited yourself to just the first 2 TB of each disk, as that's the maximum partition size you can create with fdisk. As such, your raid device probably looks more like a RAID5 of 3 * 2TB disks. Use parted to create your larger than 2TB partition. Example: [root@evil home]...


3

First of all, mount it read-only and make a backup of your data. Then run e2fsck on /dev/md0, which should be able to fix the filesystem, but the most recent changes to it are probably lost.


3

It kind of should work like this: # mdadm --manage /dev/md42 --readonly --add-journal /dev/loop3 mdadm: Journal added successfully, making /dev/md42 read-write mdadm: added /dev/loop3 However, currently (using kernel 4.18, mdadm 4.1-rc) that only seems to be possible for arrays that were created with journal in the first place. The above output was ...


3

So... /dev/sdb1 hasn't been active in this array since 2015 (Update Time). The data on it should be outdated to the point of uselessness. Essentially you've been running a RAID-0 ever since. That leaves you the three other devices /dev/sd{c,d,e}1. Out of these, /dev/sdd1 failed recently. Since you already lost redundancy years ago, this failure effectively ...


2

Your only option here, since you turned your drives spare and lost their metadata, is to re-create the RAID. This is very dangerous, a mistake will wipe your data. When re-creating a RAID there are several things to consider. You must use --assume-clean so it won't sync. You should leave one drive out (preferably the one that is in the worst state) by ...


2

mdadm --force should fix this. Note that you may suffer minor data corruption, as its going to pretend its in sync. Use it like this: mdadm --stop /dev/md127 (you need to stop what's currently running first) mdadm -v --assemble --run --force /dev/md127 /dev/sd[a-hl-z]. The key thing is leaving out /dev/sdi here, as we know that disk is the least recent. ...


2

That does seem like a disk performance issue. You should get something in between 20 MB/s to 80 MB/s depending on block size I think. I found this old 10k disk comparison where you can see how different drives are performing http://techreport.com/review/5236/10k-rpm-hard-drive-comparison/7 . I also found a thread from dell forum where someone is facing ...


2

First off, the fact that you're backing up the drives using dd is a good thing—a very sensible first action. You can see from the events counter and the last update timestamp that sda dropped out of the array, but not much changed between when it dropped out and the last access. You can also see the device states on sda say 0–3 are active, 4 missing (mdadm ...


2

You're missing one of the three drives of the /dev/md0 RAID5 array. Therefore, mdadm will assemble the array but not run it. -R, --run Attempt to start the array even if fewer drives were given than were present last time the array was active. Normally if not all the expected drives are found and --scan is not used, then the array will be ...


2

In RAID recovery, you should never, never, ever --create unless you really really REALLY know EXACTLY what you're doing. However your output looks like you've already done the --create. The RAID on your /dev/sde is a RAID5, created Sun Apr 29 22:14:28 2012, consisting of 8 disks as you stated in your question. This RAID was last updated on Fri Dec 27 15:32:...


2

I have had the most success by executing the following strategy: # mdadm --stop /dev/md0 # mdadm --create /dev/md0 --metadata=1.2 --level=5 --raid-devices=4 --chunk=128 --layout=left-symmetric /dev/sda1 /dev/sdb1 /dev/sdc1 missing That creates the device with the same parameters as originally used. The missing causes the device to be created in degraded ...


2

RAID 5 Excerpt from Wikipedia article: It requires that all drives but one be present to operate. Upon failure of a single drive, subsequent reads can be calculated from the distributed parity such that no data is lost. Therefore my conclusion is, if those two drives are real dead, it is now impossible to assemble the array, sorry.


2

You can't reassemble without data loss a RAID-5 array with more than one drive dead. In theory, you could read data from the rest of the drives, but you'd have chunks missing in between. The structure of a 5-disk RAID-5 is something like this: D is data chunks, P parity chunks. 12345 DDDDP DDDPD DDPDD DPDDD PDDDD With any two drives dead, you have 8 data ...


2

Your command is incorrect, it should be this: $ mdadm -C /dev/md0 -l 5 -n 4 /dev/sd[b-e]1 If you want to use the = signs you use these switches instead like this: $ mdadm -C /dev/md0 --level=5 --raid-devices=4 /dev/sd[b-e]1 Per man page: -l, --level= Set RAID level. When used with --create, options are: linear, raid0, 0, stripe, ...


2

Near impossible to really answer as no one knows for sure what truly went on there between your before/after. Please do take my deductions below with a grain of salt - it's impossible to say for sure that things happened this way but this is what it looks like from the data you provided. Your (BEFORE) shows 1 drive missing completely, and another ...


Only top voted, non community-wiki answers of a minimum length are eligible