LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Stuck with creation software RAID1 (partitioning and formatting) (https://www.linuxquestions.org/questions/centos-111/stuck-with-creation-software-raid1-partitioning-and-formatting-4175575055/)

gabrielg 03-16-2016 11:00 AM

Stuck with creation software RAID1 (partitioning and formatting)
 
Hello All,

For some days I am trying to create software RAID1 on my CentOS 5.7

I connected two 2TB same disks on /dev/sdb and /dev/sdd
I made array looks like:
Code:

        Version : 0.90
  Creation Time : Wed Mar 16 14:03:50 2016
    Raid Level : raid1
    Array Size : 1953514496 (1863.02 GiB 2000.40 GB)
  Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
  Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Wed Mar 16 15:58:54 2016
          State : active, resyncing
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

 Rebuild Status : 81% complete

          UUID : c04a7f9a:2da28181:59fc1b56:a54772ff
        Events : 0.7

    Number  Major  Minor  RaidDevice State
      0      8      16        0      active sync  /dev/sdb
      1      8      48        1      active sync  /dev/sdd

so everything looks good so far, but when I try to make file system I have an error all the time.
When partitioning:
Code:

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
And then making fs (no matter restarted or not):
Code:

mkfs ext4 /dev/md0p1
I get
Code:

mkfs.ext2: invalid blocks count - /dev/md0p1
How number of blocks can be wrong? Why I get "Invalid argument" error when the same partitiong and formatting works perfectly on both disks separately?

Any help will be very valuable for me.

Regards

Gabriel

syg00 03-17-2016 04:12 AM

Maybe you should wait until it finishes synching.

gabrielg 03-17-2016 05:25 AM

Reason and solution
 
I think I've found reason.
I needed other tool for making filesystem: mke4fs from e4fsprogs.

I've found info about it on http://unix.stackexchange.com/questi...d-blocks-count

Quote:

It's bad error checking in the argument parsing I think causing that message. The version of mke2fs on RHEL 5 doesn't support the -t type argument, so it's somehow parsing the /dev/VGora/oradata path as the last (optional) block count argument.

Anyway, the way you'll want to do it is to ensure you have e4fsprogs installed and then use mkfs.ext4 /dev/VGora/oradata or mke4fs.
So partitioning was okay, despite that error with refreshing partition info.
Thanks for suggestion syg00, I didn't write about it but I tried making fs after syncing too. With the same result.
No matter that I've found info that matrix is usable even during syncing.

What is strange for me that filesystem is created on /dev/md0 (I mean device) instead of /dev/md0p1 (I mean partition created on device). This was my additional misunderstanding.

Regards

Gabriel


All times are GMT -5. The time now is 09:41 AM.