× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Array is not autobuild

slvnews
Aspirant

Array is not autobuild

Hello

 

Procedure

2 way array, 1 disc 

boot menu, factory default

1 disc system complete

add sec empty disc

 

array /dev/md1 - built

array /dev/md127 - build

array /dev/md0 - not build, not grow

 

in past, it work automqaticly. Now not. The same disc, the same nas

 

I made it by cfdisc - partition. When try to add by mdadm - disc to small (hmm) - the same disc

 

I made it by fdisc, enter correct sectors - work

 

mdadm -add - works

 

But it doesnt work automaticly (geometry problem ?). Difference - I add totaly clean drive: dd /dev/zero of=/dev/drive bs=1M count=100 before add disc to nas

 

Best

 

 

Model: RNDU2000|ReadyNAS Ultra 2 Chassis only
Message 1 of 7
StephenB
Guru

Re: Array is not autobuild

We have sometimes seen md0 or md1 not sync automatically.  I think in most cases that's related to a disk failure (bad sector somewhere?).

 

I'm not saying that's happened here - though it might be worth checking the smart stats.  The -x option will give you some additional info about cached errors.

Message 2 of 7
Sandshark
Sensei

Re: Array is not autobuild

I don't thnk you can make a partition properly aligned for md0 with cfdisk.  The only tool I've found that will is parted.

 

volume_util -O  will optimize the swap parttiton RAID, and will (at least when I've used it) also trigger expanding md0.  I don't know if it will create the OS partition on the drive if it doesn't already exist, though.  But it's worth a try.

 

volume_util is a handy command line tool that Negear has put on the system.  I assume that the GUI calls it for various functions, such as this one.

 

 

Message 3 of 7
slvnews
Aspirant

Re: Array is not autobuild


@Sandshark wrote:

I don't thnk you can make a partition properly aligned for md0 with cfdisk.  The only tool I've found that will is parted.

 

<answer>

fdisk. Could be given sector - beginieng and end

Parted is good tool too. But I use for all disc, multi partition. There was 2 partitions (for md0, md127), so I did it by fdisk

</answer>

 

volume_util -O  will optimize the swap parttiton RAID, and will (at least when I've used it) also trigger expanding md0.  I don't know if it will create the OS partition on the drive if it doesn't already exist, though.  But it's worth a try.

 

<answer>
/dev/md0 is for / (root) partition

partition was on /dev/md0

but it was 1 disc array

 

I add drive/partition

mdadm -add /dev/md0 /dev/sdb1

and grow array

mdadm --grow --raid-devices=2 /dev/md0

 

and it start sycing

volume_util - I don't know this utility. I'll check 

 

</answer>

 

 

 

volume_util is a handy command line tool that Negear has put on the system.  I assume that the GUI calls it for various functions, such as this one.

 

<answer>

 

could be, I don't know. I used "by hand"

 

It not start automaticly. I don't know why. Wrong first sector ? So there was free space on the begining of drive. So I made partition on this free space. By fdisc. cfdisk doesn't work

</answer>

 

 


 

Message 4 of 7
Sandshark
Sensei

Re: Array is not autobuild

fdisk (and I believe cfdisk) will normally refuse to start a partition at sector 64, which is what you need for the NAS md0.  I'm surprised you got it to do it.

 

Of course, I don't think I've ever tried to create parttion 1 last.  Maybe it will let you in that case.

 

parted will complain that the partition isn't "properly aligned", but will let you do it.

Message 5 of 7
StephenB
Guru

Re: Array is not autobuild

I think @Sandshark is saying that some of these tools will automatically enforce partition alignment that isn't consistent with the NAS.

 

Many of them enforce one megabyte aligment (2048 512K sectors).

Message 6 of 7
slvnews
Aspirant

Re: Array is not autobuild

I don't know, for me usually work... I don't know. And again... I'm not expert of hardvrives. Usually work...

 

mkdir test_fdisk
cd test_fdisk/
dd if=/dev/zero of=file.zero bs=4k count=1000000
1000000+0 przeczytanych rekordów
1000000+0 zapisanych rekordów
4096000000 bytes (4,1 GB, 3,8 GiB) copied, 20 s, 205 MB/s

losetup /dev/loop0 file.zero

fdisk /dev/loop0

Witamy w programie fdisk (util-linux 2.31.1).

Polecenie (m wyświetla pomoc): p
Dysk /dev/loop0: 3,8 GiB, bajtów: 4096000000, sektorów: 8000000
Jednostki: sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Typ etykiety dysku: dos
Identyfikator dysku: 0x01902dc6


Polecenie (m wyświetla pomoc): n
Typ partycji
p główna (głównych 0, rozszerzonych 0, wolnych 4)
e rozszerzona (kontener na partycje logiczne)
Wybór (domyślnie p): p
Numer partycji (1-4, domyślnie 1): 1
Pierwszy sektor (63-7999999, domyślnie 63): 64
Ostatni sektor, +sektorów lub +rozmiar{K,M,G,T,P} (64-7999999, domyślnie 7999999):

Utworzono nową partycję 1 typu 'Linux' o rozmiarze 3,8 GiB.

Polecenie (m wyświetla pomoc): p
Dysk /dev/loop0: 3,8 GiB, bajtów: 4096000000, sektorów: 8000000
Geometria: głowic: 255, sektorów/ścieżkę: 63, cylindrów: 497
Jednostki: sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Typ etykiety dysku: dos
Identyfikator dysku: 0x01902dc6

Urządzenie Rozruch Początek Koniec Sektory Rozmiar Id Typ
/dev/loop0p1 64 7999999 7999936 3,8G 83 Linux

Polecenie (m wyświetla pomoc):

 

how about first sector... ?

But fdisk allow to enter first sector

Could be changed by change number of cylinders, heads etc

 

 

Message 7 of 7
Top Contributors
Discussion stats
  • 6 replies
  • 1178 views
  • 0 kudos
  • 3 in conversation
Announcements