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

Strange issue with migration from 102 to 312

SLK-Purdue
Luminary

Strange issue with migration from 102 to 312

I updated from a ReadyNAS RN102 to a RN 312.  I moved the volumes as detailed in the instructions.   Everything worked great and the new unit came up just fine.running 6.10.3.   (Nice improvement in performance!!!) 

 

Interesting, in the service display HTTP and HTTPS are grey and can not be enabled.   (see photo)  I can access the unit via HTTP just fine.   In the log, I see the following.  I would like to be sure things are correct and also enable HTTPS and get the cert set correctly.   Any ideas?

 

Thanks,

 

Scott

 

 
 
 
 
 
 
Sep 22, 2020 13:18:46
 
System: Service protocol amazon-drive is enabled.
Sep 22, 2020 13:18:46
 
System: Service protocol HTTP is disabled.
Sep 22, 2020 13:17:33
 
System: ReadyNASOS background service started.
Sep 22, 2020 13:15:51
 
System: The system is rebooting.
 
 

 

 

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 1 of 14

Accepted Solutions
StephenB
Guru

Re: Strange issue with migration from 102 to 312


@Sandshark wrote:

It sounds to me that PHP5 was remoevd, but this file was not: /etc/apache2/mods-enabled/php5.load.  I'm not really versed in how apache uses such configuration files, but I think it automatically runs anything in that directory, there is no poiner to the file elsewhere that you also need to remove.  Try just moving that file to a holding area and see what happens.


Since it works in the RN102, /usr/lib/apache2/modules/libphp5.so wasn't removed either (and is the arm version of the library). So PHP5 wasn't fully removed.  

 

Still you could simply move php5.load.  Make sure there's no php5.conf in the folder either. Also, you should look at the libraries php5.load is loading, and move them to the holding area also.

 

Lines 200, 201 in the apache2.conf are

200  IncludeOptional mods-enabled/*.load
201  IncludeOptional mods-enabled/*.conf

So you don't actually need to edit the conf file.

 

Still,I'd do the factory reset (painful though it is) if it were my own system.

 

View solution in original post

Message 13 of 14

All Replies
SLK-Purdue
Luminary

Re: Strange issue with migration from 102 to 312

Looks like I ended up in "safe-mode".   What is the proper way to exit "safe-mode"?

 

Scott

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 2 of 14
SLK-Purdue
Luminary

Re: Strange issue with migration from 102 to 312

Some additional information.  Any ideas?

 

admin@NAS-Ksander-2:~$ systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-09-22 18:21:00 EDT; 2h 44min ago
Process: 23934 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Process: 23852 ExecStartPre=/frontview/bin/fvapps (code=exited, status=0/SUCCESS)

 

 

admin@NAS-Ksander-2:~$ systemctl status apache2-safe
● apache2-safe.service - The Apache HTTP Server (Safe Mode)
Loaded: loaded (/lib/systemd/system/apache2-safe.service; static; vendor preset: enabled)
Active: active (running) since Tue 2020-09-22 18:21:00 EDT; 2h 44min ago
Process: 23942 ExecStart=/usr/sbin/apache2 -f /etc/frontview/apache/safe-mode.conf (code=exited, status=0/SUCCESS)
Main PID: 23946 (apache2)
CGroup: /system.slice/apache2-safe.service
├─23946 /usr/sbin/apache2 -f /etc/frontview/apache/safe-mode.conf
├─23947 apache_log
├─23948 /usr/sbin/apache2 -f /etc/frontview/apache/safe-mode.conf
├─23949 /usr/sbin/apache2 -f /etc/frontview/apache/safe-mode.conf
├─23954 /usr/sbin/apache2 -f /etc/frontview/apache/safe-mode.conf
└─23955 /usr/sbin/apache2 -f /etc/frontview/apache/safe-mode.conf

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 3 of 14
SLK-Purdue
Luminary

Re: Strange issue with migration from 102 to 312

Logs show

 

Sep 22 18:21:00 NAS-Ksander-2 systemd[1]: Starting The Apache HTTP Server...
Sep 22 18:21:00 NAS-Ksander-2 apachectl[23934]: apache2: Syntax error on line 200 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: wrong ELF class: ELFCLASS32
Sep 22 18:21:00 NAS-Ksander-2 apachectl[23934]: Action 'start' failed.
Sep 22 18:21:00 NAS-Ksander-2 apachectl[23934]: The Apache error log may have more information.
Sep 22 18:21:00 NAS-Ksander-2 systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 22 18:21:00 NAS-Ksander-2 systemd[1]: Failed to start The Apache HTTP Server.
Sep 22 18:21:00 NAS-Ksander-2 systemd[1]: apache2.service: Unit entered failed state.
Sep 22 18:21:00 NAS-Ksander-2 systemd[1]: apache2.service: Triggering OnFailure= dependencies.
Sep 22 18:21:00 NAS-Ksander-2 systemd[1]: apache2.service: Failed with result 'exit-code'.

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 4 of 14
StephenB
Guru

Re: Strange issue with migration from 102 to 312


@SLK-Purdue wrote:

I updated from a ReadyNAS RN102 to a RN 312.  I moved the volumes as detailed in the instructions.   

It looks like you failed to uninstall your apps.  While the NAS can convert it's core functions from arm to x86, it can't convert third party apps.

 

In your case, at least one of the apps uses php5.

 

Options are to 

  1. do a factory reset, reconfigure the NAS, and restore from backup.
  2. try putting the disks back into the RN102, and migrate back.  Then uninstall the apps, and try again

I guess you could also try uninstalling the apps now (either from the web ui or from ssh) - no idea if that will work or not.

 

Definitely make sure you have a backup, no matter which option you attempt.

 

Message 5 of 14
SLK-Purdue
Luminary

Re: Strange issue with migration from 102 to 312

First, thanks.much.

 

I was pretty sure that I uninstalled but I have now migrated back to the 102 and confirmed that all apps were uninstalled.   What points you to php?

 

I am back running fine on the 102.   Any other thoughts?  Seems the issue is somewhere in the change for arm to x86.   I really want to get the the 312.

 

Scott

 


@StephenB wrote:

@SLK-Purdue wrote:

I updated from a ReadyNAS RN102 to a RN 312.  I moved the volumes as detailed in the instructions.   

It looks like you failed to uninstall your apps.  While the NAS can convert it's core functions from arm to x86, it can't convert third party apps.

 

In your case, at least one of the apps uses php5.

 

Options are to 

  1. do a factory reset, reconfigure the NAS, and restore from backup.
  2. try putting the disks back into the RN102, and migrate back.  Then uninstall the apps, and try again

I guess you could also try uninstalling the apps now (either from the web ui or from ssh) - no idea if that will work or not.

 

Definitely make sure you have a backup, no matter which option you attempt.

 


 

 

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 6 of 14
StephenB
Guru

Re: Strange issue with migration from 102 to 312


@SLK-Purdue wrote:

 

What points you to php?

This log entry you posted:

Sep 22 18:21:00 NAS-Ksander-2 apachectl[23934]: apache2: Syntax error on line 200 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server:

/etc/apache2/mods-enabled/php5.load and /usr/lib/apache2/modules/libphp5.so don't exist on a stock OS-6 system, so php5 was installed by an app. Given that you did uninstall the apps, it sounds like one of your apps didn't remove php when it uninstalled.

 


@SLK-Purdue wrote:

 

I am back running fine on the 102.   Any other thoughts?  Seems the issue is somewhere in the change for arm to x86.   I really want to get the the 312.

 

Well, I gave you the options that I see.  You could do the factory reset and restore the data - that is best done on the RN312, not the RN102. That also gives you a fully clean install (and if the RN102 is old, it likely will give you better performance).

 

Or you can attempt to uninstall php5 on the NAS using ssh.  You'd log in as root, using the NAS admin password.

 

A command that might do it is

apt-get autoremove --purge php5

I say "might" because I haven't actually run this myself.  As always, you use ssh at your own risk.

 

If it does complete successfully, then reboot the RN102 just to make sure the web interface works properly before you move back to the RN312.  Maybe also check that the two files above are gone.

 

Message 7 of 14
SLK-Purdue
Luminary

Re: Strange issue with migration from 102 to 312

Again, thanks much.

 

I can believe that but not sure where to go from here.  Is it safe to try to uninstall php5 at the Linux level with apt?

 

apt list | grep php  - does show php5

 

apt list --installed | grep php - does not show php5

 

Thanks,

 

Scott

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 8 of 14
StephenB
Guru

Re: Strange issue with migration from 102 to 312


@SLK-Purdue wrote:

 

I can believe that but not sure where to go from here.  Is it safe to try to uninstall php5 at the Linux level with apt?

This is of course some risk, especially if you can't use apt - which might be the case if stuff was left behind by a previous uninstall. Hence the repeated suggestion to make a backup. If you have a backup, then it were me, I'd do a factory reset on the RN312 instead of migrating, and start over clean.

 

If you can't make a backup, then maybe get a new disk for the RN312, and keep the RN102 running - repurposing is as a backup NAS.  Then add a second disk to the RN312 when budget permits.

 

A variant here (again has some risk) is to remove one disk in the RN102, and do a factory reset with that disk in the RN312 (leaving the RN102 degraded).  Reconfigure the RN312, and use share-by-share backup jobs to migrate the data to it.

 

Once it is set up, you can either do a similar reset on the RN102, and back-haul the data back to the RN102 from the RN312 (allowing you to use the RN102 as a backup NAS), or you can move the remaining disk to the RN312.  IMO using the RN102 as a backup NAS with jbod volumes on both NAS apt liis better than using RAID-1 on one NAS.

 

 

 

 

 

 

 

Message 9 of 14
SLK-Purdue
Luminary

Re: Strange issue with migration from 102 to 312

Would doing an OS reinstall on the 102 be a worthwhile step to clear any non-original items?  Have you ever done a reinstall via the "boot menu"?

 

And, yes, I have a good backup but it is a lot of data to reload.  

 

Scott

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 10 of 14
Sandshark
Sensei

Re: Strange issue with migration from 102 to 312

It sounds to me that PHP5 was remoevd, but this file was not: /etc/apache2/mods-enabled/php5.load.  I'm not really versed in how apache uses such configuration files, but I think it automatically runs anything in that directory, there is no poiner to the file elsewhere that you also need to remove.  Try just moving that file to a holding area and see what happens.

Message 11 of 14
StephenB
Guru

Re: Strange issue with migration from 102 to 312


@SLK-Purdue wrote:

Would doing an OS reinstall on the 102 be a worthwhile step to clear any non-original items?  Have you ever done a reinstall via the "boot menu"?

I don't think the OS reinstall will fix this particular problem, but you could try it.  It doesn't do a full install of the OS.  Note it will change your admin password back to password, reset the network configuration to dhcp, and turn off volume quota.

 

If you want to check afterwards with ssh, you could do 

# grep php5 /etc/apache2/apache2.conf

and see if that shows up any result.

 

If you are comfortable editing the conf file, you could also just try deleting the line that loads php5.load and try the migration again.

 


@SLK-Purdue wrote:

And, yes, I have a good backup but it is a lot of data to reload.  

 


Good.

 

I'd still do the factory reset.  Something isn't quite right with your OS partition, and there could be some other stuff that will cause problems later on. Also, as noted above, the on-disk btrfs setup on the NAS has changed over the years.  If your volume is older, you will get faster performance if you do the full reset.

 

The alternative method I outlined does work pretty well, and you can continue to use the RN102 until it completes.  Basically just do a reset with one disk in the RN312, and use rsync backup jobs to transfer the data directly from the RN102.  Right before you take the RN102 off-line, you run those jobs again - since they are incremental, they will run quickly, and cleanup any files that were written to the RN102 after the backup was done.

 

How much data do you have?

 

 

 

Message 12 of 14
StephenB
Guru

Re: Strange issue with migration from 102 to 312


@Sandshark wrote:

It sounds to me that PHP5 was remoevd, but this file was not: /etc/apache2/mods-enabled/php5.load.  I'm not really versed in how apache uses such configuration files, but I think it automatically runs anything in that directory, there is no poiner to the file elsewhere that you also need to remove.  Try just moving that file to a holding area and see what happens.


Since it works in the RN102, /usr/lib/apache2/modules/libphp5.so wasn't removed either (and is the arm version of the library). So PHP5 wasn't fully removed.  

 

Still you could simply move php5.load.  Make sure there's no php5.conf in the folder either. Also, you should look at the libraries php5.load is loading, and move them to the holding area also.

 

Lines 200, 201 in the apache2.conf are

200  IncludeOptional mods-enabled/*.load
201  IncludeOptional mods-enabled/*.conf

So you don't actually need to edit the conf file.

 

Still,I'd do the factory reset (painful though it is) if it were my own system.

 

Message 13 of 14
SLK-Purdue
Luminary

Re: Strange issue with migration from 102 to 312

Moving php5.* out of the directory did the trick.  THANK YOU.  Much appreciated.

 

Scott

Model: RN31200|ReadyNAS 300 Series 2- Bay (Diskless)
Message 14 of 14
Top Contributors
Discussion stats
  • 13 replies
  • 2518 views
  • 3 kudos
  • 3 in conversation
Announcements