[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OpenVPN fails



	Hi.

On Tue, Oct 06, 2015 at 06:21:59PM +0100, Tony van der Hoff wrote:
> On 06/10/15 17:59, Reco wrote:
> > 
> 
> > Allow me to explain then.
> > 
> Thank you, Reco, I'm really grateful. I'm learning a lot here!

You're welcome.

> OK, here goes:
> 
> root@tony-lx:~# cat /proc/mdstat
> Personalities : [raid1]
> md6 : active raid1 sdb11[1]
>       434672504 blocks super 1.2 [2/1] [_U]
> 
> md5 : active (auto-read-only) raid1 sdb10[1]
>       9763768 blocks super 1.2 [2/1] [_U]
> 
> md4 : active raid1 sdb9[1]
>       4880372 blocks super 1.2 [2/1] [_U]
> 
> md3 : active raid1 sdb8[1]
>       9763768 blocks super 1.2 [2/1] [_U]
> 
> md2 : active raid1 sdb7[1]
>       4880372 blocks super 1.2 [2/1] [_U]
> 
> md1 : active raid1 sdb6[1]
>       14646200 blocks super 1.2 [2/1] [_U]
> 
> md0 : active raid1 sdb5[1]
>       4880372 blocks super 1.2 [2/1] [_U]
> 
> unused devices: <none>

Whoops. You're using a degraded RAID1. Lots of them, actually.
Glad I finally put my leet telepathy skills to some use (:evilgrin:).

Your /etc/fstab looks OK.
Your devices.map looks OK.

Partition tables are also good, although some may consider different
(yep, they really are) partition tables for RAID1 somewhat
unconventional. But hey, if it worked for you - who am I to argue.
Using only extended partitions is unconventional too,
but if it did not prevent booting - that's OK for me.

And now it's time to end this trouble once and for all.

Easy way:

1) Those should work just fine, and fix the trouble somewhat:

mdadm --add /dev/md0 /dev/sda5
mdadm --add /dev/md1 /dev/sda6
mdadm --add /dev/md3 /dev/sda8
mdadm --add /dev/md4 /dev/sda9
mdadm --add /dev/md6 /dev/sda11

2) A big warning - wait for RAID rebuild to finish before rebooting.
Really. I mean it. Monitor the rebuild progress via /proc/mdstat.

3) Reboot to check that you're using correct kernel version.

Which leaves us with /dev/md2 and /dev/md5.
These use /dev/sdb7 and /dev/sdb10, respectively.
Sadly, both have size 9999M, and their respective pairs (sda7 and sda10)
have only 4999M, so you won't be able to add them to RAID1.


Hard way:

1) Destroy partition table on /dev/sda ("parted rm", for example).

2) Copy partition table from /dev/sdb to /dev/sda ("parted mkpart").
Ensure that both drives really have the same partition tables.

3) Add partitions from /dev/sda to respective RAIDs.

4) Wait for RAID rebuild to finish. That's really important part.

5) Re-install grub to /dev/sda just in case.

6) Reboot.

7) Check /proc/mdstat to ensure that there are no degraded RAIDs this
time. Check kernel version while you're at it.

8) ...

9) Profit.

Reco


Reply to: