Problem creating raid1

Problem creating raid1

Postby hirkkak » Tue Apr 16, 2024 10:41 pm

Hi, first of all congratulations for all the work done.

I´m trying to use a 2BIGN2 with a raid 1 (2TB each and MBR) but it stuck on creating journal.
Fresh install 18.3 with empty disks.

Code: Select all
Setup task makeraid.sh is now running
Found disk: sda(XXXXXXX)
Found disk: sdb(XXXXXXX)
Create raid device md0
=>OK: md0 created (raid1)
Format partition md0 with file system ext4:
=>mke2fs 1.43.4 (31-Jan-2017)
Discarding device blocks: done
Warning: could not erase sector 2: Input/output error
Creating filesystem with 487556640 4k blocks and 121896960 inodes
Filesystem UUID: 429471d1-1243-40f0-bb56-47c3d0a88d3e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
Warning: could not read block 0: Input/output error
Warning: could not erase sector 0: Input/output error
Writing inode tables: done
Creating journal (262144 blocks):


What i´m doing bad? it´s the second time i tryed it (on the 1st try i waited more than 2 hours).
I reinizializated both disk again, and retryed but it´s seem that is the same result.

And on other hand, and looking for in the forum i saw that post:
viewtopic.php?f=27&t=3659&p=38601&hilit=raid1#p38601

I'm very disappointed because this is NOT a real RAID1 firmware.
Someone who choose to set a NAS to RAID1 is for data security. So when any disk fail, NAS MUST can boot with only one disk in any slot.


Edit:
Solved reading...
It´s that true? can be solved by installing fdwl firmare on both disk (sda+sdb)?

https://plugout.net/viewtopic.php?f=7&t=1271
-If you have a multi disk nas and use the fvdw-sl console and standalone kernel install only 1 disk in the nas in slot 1 (most lefthand slot seen from back) to prepare the system disk.

Code: Select all
boot_disk4=disk ${kernel_addr} 1:${primaryPart}; setenv rootfs /dev/sdb7;
boot_disk3=if disk ${kernel_addr} 0:${primaryPart}; then setenv rootfs /dev/sda7; else run boot_disk4; fi
boot_disk2=if disk ${kernel_addr} 1:${secondaryPart}; then setenv rootfs /dev/sdb7; else run boot_disk3; fi
boot_disk1=if disk ${kernel_addr} 0:${secondaryPart}; then setenv rootfs /dev/sda7; else run boot_disk2; fi
boot_disk=if test ${resetFlag_env} -eq 0; then run boot_disk1; else run boot_disk3; fi
disk_disk=run boot_disk; setenv bootargs console=ttyS0,115200 root=${rootfs} ro reset=${resetFlag_env} productType=${productType_env}; bootm ${kernel_addr};


- But in uboot args it seems to be supported. Although since I don't have much knowledge in this area, I suppose I might be wrong.

Thanks a lot!
Last edited by hirkkak on Thu Apr 18, 2024 8:29 am, edited 1 time in total.
hirkkak
 
Posts: 11
Joined: Sat Apr 13, 2024 6:01 am

Re: Problem creating raid1

Postby hirkkak » Thu Apr 18, 2024 8:14 am

I also tried to create disks as gpt. Only following this and uploading kernel with tftp:
https://plugout.net/viewtopic.php?f=27&t=3659&start=100#p37557
Code: Select all
setenv bootargs console=ttyS0,115200 netconsole=6666@${ipaddr}/,6666@${serverip}/ root=/dev/sda7

printenv bootargs

ide reset
tftpboot 0x800000 firmware/kirkwood/UIMAGE-414133-KIRKWOOD-5
bootm

I managed to boot, but it´s seem as mi uboot does not support gpt.
gdisk -l showed all partitions correctly on gpt when i booted but not while uboot console
MI_UBOOT.png

Code: Select all
Marvell>> ide part
ide part
Partition Map for IDE device 0  --   Partition Type: DOS
Partition     Start Sector     Num Sectors     Type
    1                    1      -387938129      ee

Partition Map for IDE device 1  --   Partition Type: DOS
Partition     Start Sector     Num Sectors     Type
    1                    1      -387938129      ee




As there are no way to boot normally, i back to msdos partition table.
Finally i managed to build the raid by reading this attachment in the forum. :doh

Instruction to add additional disks to 5big and 2big vers 1 or 2, or networkspace max v2 using fvdw-sl console and fvdw-sl-installer script
https://plugout.net/download/file.php?id=4122

- So initialize disk is buggy on 2big2 if u want build a raid.?

On the first boot disk-b are not listed.
Once i rebooted was been showed, but raid are degraded.
In raid status is showed as in_sync but estimated time are not showed

Any help whould be apreciated.
(Future donor if I can get it to work as it should :P )
You do not have the required permissions to view the files attached to this post.
hirkkak
 
Posts: 11
Joined: Sat Apr 13, 2024 6:01 am

Re: Problem creating raid1

Postby fvdw » Thu Apr 18, 2024 5:42 pm

Hi, jocko is our raid expert but currently he is not available.
For me it is not clear what you are trying to do. Our firmware uses a certain partition structure on each disk and to build a raid array you should not use sda and sdb as whole disk. Doing that may result in the errors you got but also will erase firmware.
You should build the array using the data partitions sda8 and sdb8. But why use your own script ? The firmware has in disk setup window of the firmware web interface the possibility to let the firmware build and setup a raid array.
Wrt to gpt support of your bootloader. In het uboot console give the command
Code: Select all
printenv
and look if you see an environment variable with value gpt,lba64. I would expect that your bootloader supports gpt.
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Problem creating raid1

Postby hirkkak » Fri Apr 19, 2024 7:17 am

Hi, thanks for your response,

I just trying to build a Raid1.

By using web gui, "initiliaze disk" works, but making the Raid stucks at create journal. And if i recreate the right structure en sdb by following the instruccions on the manual (not using any script)
- Adding extra disks on multi drive devices : 5big1, 2big1, 5big2, 2big2, networkspace max v2 , after installing fvdw-sl on the system disk (sda) and upgrading the firmware to the latest version, you can add the other disks by following this instruction 3. Add additional disks
Do not use multiple system disks in multi disk nas, it will cause erratic behavior because the bootloader may use the wrong disk to load kernel and firmware.

Attachment: Add additonal disks instruction 5big2 2big2 nwsp2max 2big1 5big1-04oct15.zip
https://plugout.net/download/file.php?id=4122


Building the raid ends with error, and appears as degraded.

This is my disk structure after initialize sdb8 now as ext3 for trying again.

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

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 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      243200  1951897500   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      243200  1950226740  83 Linux


Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
256 heads, 63 sectors/track, 242251 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb4             201      242251  1951899264   5 Extended
/dev/sdb5             209         312      838656  83 Linux
/dev/sdb6             321         328       64512  83 Linux
/dev/sdb7             337         400      516096  83 Linux
/dev/sdb8             409      242251  1950221952  83 Linux


I have tried using the command on uboot (printenv) and indeed. No references to GPT neither LBA. So seems as not supported.

How risky is updating uboot?
I prefer to use disks with GPT structure for using +2TB diks on nearly future.
hirkkak
 
Posts: 11
Joined: Sat Apr 13, 2024 6:01 am

Re: Problem creating raid1

Postby fvdw » Fri Apr 19, 2024 11:45 am

Building the raid ends with error, and appears as degraded.

what is the error?

I notice that sda8 and sdb8 ado not have the same size, sdb8 is smaller then sda8, is this by purpose? For raid1 the size of the partition should be the same as far as I remember. Maybe this causes your problem. Also something strange in disk size.
Code: Select all
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Code: Select all
Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
256 heads, 63 sectors/track, 242251 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

Notice the difference in number of heads and cylinders although total size of the disk is specified to be the same ??

If have a similar nas with 2 disks this is how my partition structure is
Code: Select all
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 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      243200  1951897500   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      243200  1950226740  83 Linux

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb4             201      243200  1951897500   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      243200  1950226740  83 Linux
root@2bignas:/ #


I have tried using the command on uboot (printenv) and indeed. No references to GPT neither LBA. So seems as not supported.

How risky is updating uboot?
I prefer to use disks with GPT structure for using +2TB diks on nearly future.

I suggest you read this topic regarding flashing uboot on a 2big2 https://plugout.net/viewtopic.php?f=27&t=3674&p=37800&hilit=uboot+3.5.9#p37800
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Problem creating raid1

Postby hirkkak » Fri Apr 19, 2024 2:30 pm

Sorry i send different fdisk with two differents drives just for trying.

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

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 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      243200  1951897500   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      243200  1950226740  83 Linux

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb4             201      243200  1951897500   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      243200  1950226740  83 Linux


That is my latest try with same disks

and the results

Code: Select all
Setup task makeraid.sh is now running
Found disk: sda(XXXXXXXX)
Found disk: sdb(XXXXXXXX)
Create raid device md0
=>OK: md0 created (raid1)
Format partition md0 with file system ext3:
=>mke2fs 1.43.4 (31-Jan-2017)
Discarding device blocks: done
Creating filesystem with 487556640 4k blocks and 121896960 inodes
Filesystem UUID: 2e087b55-537f-4ca3-9443-f66d07fa345c
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
set label on the data volume successful (RAID1)
=>Formatting md0 succeeded
Update partition type on sda8:fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
OK
=> Fail (unsupported file system)


The error is:
Disk-b not showed until i shutdown nas.

And, as you can see disk-b is missing on raid.

ERROR_RAID-01-01.png


Maybe i should try to update u-boot and see what happen.
You do not have the required permissions to view the files attached to this post.
hirkkak
 
Posts: 11
Joined: Sat Apr 13, 2024 6:01 am

Re: Problem creating raid1

Postby hirkkak » Sat Apr 20, 2024 7:28 am

I added manually sdb8 to raid

Code: Select all
root@fvdwsl-base:/ # mdadm /dev/md0 --fail /dev/sdb8 --remove /dev/sdb8
mdadm: set device faulty failed for /dev/sdb8:  No such device
root@fvdwsl-base:/ # mdadm /dev/md0 --add /dev/sdb8


And the raid start rebuilding after a reboot.

ERROR_RAID-01-Rebuild.png


We'll see what happens in a day...
You do not have the required permissions to view the files attached to this post.
hirkkak
 
Posts: 11
Joined: Sat Apr 13, 2024 6:01 am

Re: Problem creating raid1

Postby fvdw » Sat Apr 20, 2024 9:14 am

Maybe i should try to update u-boot and see what happen

No, Uboot has nothing to do with raid setup. Uboot loads only the kernel and firmware. In your case updating uboot is only useful to enable it to load a kernel and firmware from a disk with gpt partition table.

Ps your problem with sdb could be a hardware problem in case /dev/sdb or its partitions are not found.
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Problem creating raid1

Postby hirkkak » Mon Apr 22, 2024 10:51 pm

This is how it looks after ending and reboot.
I dont know what is trying to clean...

IMG_20240423_002423~01~01.jpg

Screenshot_2024-04-23-00-45-46-42_3aea4af51f236e4932235fdada7d1643~01~01.jpg


Ps. The purpose of uboot updating is to see if the problem remains with gpt.
Maybe is hw problem but i tryed 4 diferents disks (2x2 tb pairs) and same results.All recicled and smart is ok.

Also I keep original disks with lacie sw and works like a charm.
You do not have the required permissions to view the files attached to this post.
hirkkak
 
Posts: 11
Joined: Sat Apr 13, 2024 6:01 am

Re: Problem creating raid1

Postby Jocko » Tue Apr 23, 2024 7:53 am

Hi

Please to post these outputs
Code: Select all
cat /etc/mdadm.conf
cat /proc/mdstat
mdadm --detail /dev/md0
mdadm --examine /dev/sd[ab]8
fdisk -l /dev/sda
fdisk -l /dev/sdb
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Next

Return to Lacie 2Big Network vs2

Who is online

Users browsing this forum: No registered users and 1 guest