Error creating Raid 5

Re: Error creating Raid 5

Postby Jocko » Sat Apr 18, 2015 10:08 pm

first did you make the step
Code: Select all
cat /etc/mdadm.0 > /etc/mdadm.conf
mdadm --detail --scan >> /etc/mdadm.conf
after creating the raid5?

What is the output of cat /etc/mdadm.conf.

It seems that there was an issue with mke2fs :
Code: Select all
Writing superblocks and filesystem accounting information:     0/29709
Warning, had trouble writing out superblocks.
so no superblock is available. In this case the mount command fails.

At least check if the raid is assembled again after rebooting cat /proc/mdstat
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Error creating Raid 5

Postby b1gnas » Sat Apr 18, 2015 10:16 pm

i followed the guide after the mdadm command

Code: Select all
root@fvdwsl-base:/ # cat /etc/mdadm.conf
CREATE owner=root group=root mode=0666 auto=yes
PROGRAM /usr/bin/mdadm-events
DEVICE /dev/sd[abcde]8
ARRAY /dev/md0 level=raid5 num-devices=5 UUID=a6fa0748:d015319e:2cb48968:c8a3c68a
root@fvdwsl-base:/ #


Code: Select all
root@fvdwsl-base:/ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sde8[4] sdd8[5](F) sdc8[6](F) sdb8[1]
      3893898496 blocks level 5, 64k chunk, algorithm 2 [5/2] [_U__U]
     
unused devices: <none>
root@fvdwsl-base:/ #

b1gnas
 
Posts: 145
Joined: Fri Apr 17, 2015 8:11 am

Re: Error creating Raid 5

Postby Jocko » Sat Apr 18, 2015 10:29 pm

So you have an issue with your RAID: only two disks are available ! [_U__U] (first _ is your missing disk sda) and I note that sdc8 and sdd8 have a fail status.

Then you can not have a raid volume in this case (and not format it also...)

I think the best way is to destroy your raid (chap5) and try again to build it.

Note: if you get the same mdstats output before formatting it, no need to continue the remaining step
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Error creating Raid 5

Postby b1gnas » Sat Apr 18, 2015 10:31 pm

Ok i will try to destroy e create it again
b1gnas
 
Posts: 145
Joined: Fri Apr 17, 2015 8:11 am

Re: Error creating Raid 5

Postby Jocko » Sun Apr 19, 2015 9:59 am

Before rebuilding the raid, use the SMART menu to check if there is nothing wrong with these 2 disks.

Please to post also the 2 outputs
Code: Select all
gdisk -l /dev/sdc
gdisk -l /dev/sdd
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Error creating Raid 5

Postby b1gnas » Sun Apr 19, 2015 10:12 am

this is the result now

Code: Select all
root@fvdwsl-base:/ # umount /dev/sdb8
root@fvdwsl-base:/ # umount /dev/sdc8
root@fvdwsl-base:/ # umount /dev/sdd8
root@fvdwsl-base:/ # umount /dev/sde8
root@fvdwsl-base:/ # mdadm --create /dev/md0 --level=5 --raid-devices=5 missing
/dev/sdb8 /dev/sdc8 /dev/sdd8 /dev/sde8
mdadm: /dev/sdb8 appears to contain an ext2fs file system
    size=973474740K  mtime=Sun Apr 19 13:27:01 2015
mdadm: /dev/sdc8 appears to contain an ext2fs file system
    size=973474740K  mtime=Sun Apr 19 13:27:01 2015
mdadm: /dev/sdd8 appears to contain an ext2fs file system
    size=973474740K  mtime=Sun Apr 19 13:27:01 2015
mdadm: /dev/sde8 appears to contain an ext2fs file system
    size=973474740K  mtime=Sun Apr 19 13:27:01 2015
Continue creating array? yes
mdadm: array /dev/md0 started.
root@fvdwsl-base:/ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sde8[4] sdd8[3] sdc8[2] sdb8[1]
      3893898496 blocks level 5, 64k chunk, algorithm 2 [5/4] [_UUUU]
     
unused devices: <none>
root@fvdwsl-base:/ # cat /etc/mdadm.0 > /etc/mdadm.conf
root@fvdwsl-base:/ # mdadm --detail --scan >> /etc/mdadm.conf
root@fvdwsl-base:/ # mke2fs -t ext3 -j -m 1 /dev/md0
mke2fs 1.42.11 (09-Jul-2014)
Creating filesystem with 973474624 4k blocks and 243376128 inodes
Filesystem UUID: 6499ec74-d32e-4754-939b-4e6ff019132d
Superblock backups stored on blocks:
   32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
   4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
   102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done                           
Writing inode tables: done                           
ext2fs_mkdir: Attempt to read block from filesystem resulted in short read while creating root dir


what's wrong?
b1gnas
 
Posts: 145
Joined: Fri Apr 17, 2015 8:11 am

Re: Error creating Raid 5

Postby b1gnas » Sun Apr 19, 2015 10:21 am

Code: Select all
root@fvdwsl-base:/ # gdisk -l /dev/sdc
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
***************************************************************

Disk /dev/sdc: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 9C31A545-3FB1-4468-A43B-3D991EFA5FB8
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 3748181 sectors (1.8 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   5         3341520         5012279   815.8 MiB   8300  Linux filesystem
   6         5140800         5269319   62.8 MiB    8300  Linux filesystem
   7         5397840         6425999   502.0 MiB   8300  Linux filesystem
   8         6554520      1953503999   928.4 GiB   FD00  Linux RAID


Code: Select all
root@fvdwsl-base:/ # gdisk -l /dev/sdd
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
***************************************************************

Disk /dev/sdd: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): C66EFE34-5292-4DAE-AE37-3F85B13E57BE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 3748181 sectors (1.8 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   5         3341520         5012279   815.8 MiB   8300  Linux filesystem
   6         5140800         5269319   62.8 MiB    8300  Linux filesystem
   7         5397840         6425999   502.0 MiB   8300  Linux filesystem
   8         6554520      1953503999   928.4 GiB   FD00  Linux RAID
root@fvdwsl-base:/ #
b1gnas
 
Posts: 145
Joined: Fri Apr 17, 2015 8:11 am

Re: Error creating Raid 5

Postby Jocko » Sun Apr 19, 2015 10:45 am

So it is not GPT disks and how to create the partition table because they are not valid for fvdw-sl (for example you can never use it later as a system disk if you want to reuse the disk to replace sda without losing your data...)

But this can not explain your issue.

Please to post
Code: Select all
fdisk -l
and follow the chap 3 of download/file.php?id=3529 to create a valid partition table on the additionnal disks.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Error creating Raid 5

Postby b1gnas » Sun Apr 19, 2015 10:54 am

Code: Select all
root@fvdwsl-base:/ # fdisk -l

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sde4             201      121600   975145500   5 Extended
/dev/sde5             209         312      835380  83 Linux
/dev/sde6             321         328       64260  83 Linux
/dev/sde7             337         400      514080  83 Linux
/dev/sde8             409      121600   973474740  fd Linux raid autodetect

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdd4             201      121600   975145500   5 Extended
/dev/sdd5             209         312      835380  83 Linux
/dev/sdd6             321         328       64260  83 Linux
/dev/sdd7             337         400      514080  83 Linux
/dev/sdd8             409      121600   973474740  fd Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdc4             201      121600   975145500   5 Extended
/dev/sdc5             209         312      835380  83 Linux
/dev/sdc6             321         328       64260  83 Linux
/dev/sdc7             337         400      514080  83 Linux
/dev/sdc8             409      121600   973474740  fd Linux raid autodetect

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb4             201      121600   975145500   5 Extended
/dev/sdb5             209         312      835380  83 Linux
/dev/sdb6             321         328       64260  83 Linux
/dev/sdb7             337         400      514080  83 Linux
/dev/sdb8             409      121600   973474740  fd Linux raid autodetect

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               9          72      514080  83 Linux
/dev/sda2              73         136      514080  83 Linux
/dev/sda3             137         200      514080  82 Linux swap
/dev/sda4             201      121601   975153532+  5 Extended
/dev/sda5             209         312      835380  83 Linux
/dev/sda6             321         328       64260  83 Linux
/dev/sda7             337         400      514080  83 Linux
/dev/sda8             409      121601   973482772+ 83 Linux
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/md0: 2199.0 GB, 2199023255040 bytes
2 heads, 4 sectors/track, 536870911 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table
root@fvdwsl-base:/ #


Do i need to create a gpt partition table?
b1gnas
 
Posts: 145
Joined: Fri Apr 17, 2015 8:11 am

Re: Error creating Raid 5

Postby Jocko » Sun Apr 19, 2015 11:15 am

No, I just noted that your partition table was not a gpt table and it is why I asked the fdisk output to check all partition tables.

They are ok now.

You need to rebuild the md0 array. As md0 has a wrong status the raid is not currently busy. So skip the steps
Code: Select all
To stop a raid you need to kill several services:
In the web interface, stop NFS, FTP and AFP servers and any media servers
In a shell terminal, stop noflush daemon and samba server
killall noflushd
killall smbd
Unmount the raid
Umount /dev/md0
from the chap 5 of the raid tuto, just: stop the raid; erase the raid superblocks and reset the mdadm.conf file. No need to restart the nas.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

PreviousNext

Return to Lacie 5Big Network vs1

Who is online

Users browsing this forum: No registered users and 2 guests