Montag, 3. Februar 2014

Synology - change "RAID1 degraded" to "Basic"

On my DS211j I experimented with the disks (added a second disk, created RAID1 and removed second disk again) and at the end I had a degraded RAID1. I wanted to convert this degraded RAID1 back to Basic but it seems that the DSM web page doesn't allow you to do so. I have looked at the disk config before my experiments started and found that a Basic volume on DSM is already a RAID1, but with only one disk. The only difference to the old situation seems to be that now the RAID1 is registered with two disks instead of one.

So all you have to do is to tell mdadm that the RAID device of interest (/dev/md2 in my case = /volume1) is using only one disk instead of two:

mdadm --grow --raid-devices=1 --force /dev/md2
(Yes, it uses a "grow" command even it "shrinks" the number of disks!!)

Immediately after issuing this command the BEEP of the DS211j stopped and in the Storage Manager the volume was displayed as "Basic". Bingo!

Synology - Move packets from volume2 to volume1


I have a DS211j and currently two HDDs, both set to basic. Now I wanted to use two larger disks and use RAID1 for them. So from having two volumes (volume1 and volume2) I would only have one volume (volume1). One problem is that there are some packets and system services installed on volume2 (e.g. PostgreSQL, Mail Server etc.). These need to be moved to volume1 before I do the disk change. Unfortunately the DSM web page doesn't offer you any settings to move packets and system services from one volume to another. So I had to do it manually.

For PostgreSQL (which is used internally by the DSM for e.g. media indexing) the following was successful:


The information on which volume PostgreSQL resides seems to be in the symbolic link /var/services/pgsql. On my system it points to /volume2 ( /var/services/pgsql -> /volume2/@database/pgsql ). So all I had to do is to change that link.

Stop PostgreSQL:
/usr/syno/etc/rc.d/S20pgsql.sh stop

Copy all data from volume2 to volume1:
rsync -av /volume2/@database/pgsql /volume1/@database/

Disable the original link:
mv /var/services/pgsql /var/services/pgsql-vol2

Create the new link pointing to volume1:
ln -s /volume1/@database/pgsql /var/services/pgsql

Be sure that no one is using the data on volume2 any more (I had only pgsql inside /volume2/@database):
mv /volume2/@database /volume2/@database-deleteme

Restart PostgreSQL:
/usr/syno/etc/rc.d/S20pgsql.sh start


Still have some packets and system services on volume2. Need to look into each and find a way to move it to volume1.

For "printer/spool" (startup script: /usr/syno/etc/rc.d/S55cupsd.sh) the information which volume is used is retrieved as follows:
ds211j> /usr/syno/bin/servicetool --get-service-path printer
/volume2
ds211j>

But how gets the "servicetool" this information ??

Dienstag, 22. Februar 2011

elilo 3.14 compiling

For some purposes i need some more debug messages inside elilo.
So I downloaded elilo 3.14 including source code ("elilo-3.14-all.tar.gz") from http://sourceforge.net/projects/elilo/ (why the hell is the last elilo listed at http://elilo.sourceforge.net "elilo 3.7 Beta Released 7/19" ??).

Then i started my Ubuntu 10.04 LTS server virtual machine (x86-64) and tried to compile elilo in this machine:

myname@ubuntu:~$ sudo apt-get install gnu-efi
...< some apt-get output> ...
myname@ubuntu:~$ sudo apt-get install build-essential
...< some apt-get output> ...
myname@ubuntu:~$ mkdir elilo
myname@ubuntu:~$ cd elilo
myname@ubuntu:~/elilo$ wget -e "http_proxy=http://192.168.3.1" http://ftp2.ie.netbsd.org/mirrors/download.sourceforge.net/pub/sourceforge/e/project/el/elilo/elilo/elilo-3.14/elilo-3.14-all.tar.gz
...< some wget output> ...
myname@ubuntu:~/elilo$ tar -xvzf elilo-3.14-all.tar.gz
...< some tar output> ...
myname@ubuntu:~/elilo$ tar -xvzf elilo-3.14-source.tar.gz
...< some tar output> ...
myname@ubuntu:~/elilo$ cd elilo
myname@ubuntu:~/elilo/elilo$ make


The resulting executable is the "elilo.efi", and as i am compiling on a x86-64 machine, this is for x64 UEFI. How would i compile this for x64 UEFI on a x86 machine? I don't know!

Now i could start adding debug messages.

First blog test

This is my first blog!

This blog will collect all installation experiences i have while installing/maintaining my different devices / virtual machines.