SlackwareThis Forum is for the discussion of Slackware 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.
I am installing Slackware 14.2 on mdadm RAID10 with 4 1TB drives. The installer is at the point where it is formatting ext4 on the raid drive (/dev/md0). I understand things may be slow because it is in RAID but can I see a percentage or is there an estimate or how long it should take? I have been waiting about an hour now. When I did a Slackware install on another machine with only 1TB hdd (no raid) it took about 5 seconds to format...so even with 4 HDDs it should not be more than a minute right?
You may be waiting on the initial building of the arrays. That's usually what takes the most time. Open another terminal screen (Alt F2) and try this command.
Code:
cat /proc/mdstat
or as root
Code:
mdadm --detail /dev/mdx
where "/dev/mdx" is the raid device.
You can see if all the arrays have finished "building" or there are still some in progress.
There may be some better commands but I don't remember any more at the moment.
EDIT: In the past I've run into some problems if I didn't wait for the arrays to build before continuing the installation.
Last edited by TracyTiger; 08-23-2016 at 09:51 PM.
ext4 by default does lazy allocation meaning that after the quick first-stage there's a second stage that runs in the background doing metadata allocation for the entire filesystem.
Code:
iostat -zm 6
mdadm based raid initialization can be optimized two ways.
- The first is
Code:
echo 512000 > /proc/sys/dev/raid/speed_limit_max
, meaning 'use up to 500MB/s of the available I/O subsystem resources for initialization'. This is sane as mdadm has built-in 'ionice'.
- The second is use mdadm's "--layout f2" option for all raid10 including two disk layouts. Originally developed to take advantage of spinning media rotational delay, this will increase large and small block I/O significantly SSD media too.
Mounting the ext4 partition during lazy allocation "-o noatime,nodiratime" will reduce allocation time by nearly half. Not sure why.
If you do the usual, layout the raid array followed by ext4, then ext4 lazy allocation and mdadm initialization are both trying to access the entire array at the same time so the process does take significantly longer than serially, eg, waiting for the mdadm initialization to complete before format.
What I typically do on a build is to increase the setting "speed_limit_min" to 50,000 or 100,000 and then check that the default "speed_limit_max" is higher than the min setting.
The general idea is to increase the minimum speed from the default of around 1,000.
I don't remember if I actually timed the different settings however.
Last edited by TracyTiger; 02-01-2017 at 02:00 PM.
Reason: Fixed tags
I am installing Slackware 14.2 on mdadm RAID10 with 4 1TB drives. The installer is at the point where it is formatting ext4 on the raid drive (/dev/md0). I understand things may be slow because it is in RAID but can I see a percentage or is there an estimate or how long it should take? I have been waiting about an hour now. When I did a Slackware install on another machine with only 1TB hdd (no raid) it took about 5 seconds to format...so even with 4 HDDs it should not be more than a minute right?
Hi,
Formatting is one thing, but I think you're talking about disk synchronization here. Initial synchronization takes very long. I just finished configuring RAID1 on 2x2 TB, and initial sync took about four hours. I remember a painful installation at a company that had a couple of servers with 4x4 TB hard drives. I installed Slackware using software RAID 5 on these, and the inital sync took more than a day (that is, 24 hours), and this even after increasing the speed_limit_min parameter from 1000 to 50000, otherwise it would have taken roughly a week (if mdstat's ETA is anywhere reliable). The problem here is if you're doing anything else than RAID1, you have to wait until all disks are in sync before the initial reboot.
Also I'm taking more than 24 hours to install the 14.2 on a laptop. If I had known in advance I would have opted for version 13.37, which I already installed on another PC. Now I do not want to interrupt the process since I arrived at the series "n" and for the curiosity to see what has different 14.2 from 13.37, but it is not excluded that after I'll formatting and return on my steps. It's really absurd for a new laptop to stay on for days...
The flip side would be to use LVM. Add the raid10 device as a physical volume. Carve out logical volumes as needed out of the PV space. You can always extend a logical volume later, so there's no need to format the entire thing at once.
Thank you Richard, but 1) I do not understand absolutely what you speak and 2) as I said, I almost got to the end (after about 19 hours) and I want to see how it ends.
Hello from Claudio
as I already wrote you in a previous answer please don't revive old threads but open new ones for your problems.
one of the backsides of doing this, for example, is that you confuse people that are trying to help you causing them to waste their time: in specific, you are posting in a thread that is about RAID arrays initialization time and it seems that instead you are speaking about the time needed for installing packages sets
Quote:
Originally Posted by coiks54
Now I do not want to interrupt the process since I arrived at the series "n"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.