upgrade to 16.1 not without issues

upgrade to 16.1 not without issues

Postby knielen » Mon Jan 04, 2016 7:30 pm

Hi,

Last weekend I did an upgrade via the Firmware Update tool to 16.1, no problems during update.

After the update I had to manually add all the shares, causing issues with the correlating tools like NZBGet. After an hour I have all my files back and no more issues except that the RPi tells me I have 2 identical harddrives while only one is connected.

In this picture you see the disk drives:
https://www.dropbox.com/s/p2hnvmhsn74tvki/RPi1.png?dl=0

Here is what happens when I want to make a new share:
https://www.dropbox.com/s/mir6v0r5x79b3co/RPi2.png?dl=0

Do you have an idea what causes these issues?

Thank you
knielen
Donator VIP
Donator VIP
 
Posts: 16
Joined: Tue Dec 30, 2014 12:20 pm

Re: upgrade to 16.1 not without issues

Postby Jocko » Tue Jan 05, 2016 8:22 am

Hi knielen,

Did you try to reboot several times the rspb2? To see if the disk doubloon disappears.

About share; did you make some hot-unplugs ?
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: upgrade to 16.1 not without issues

Postby knielen » Tue Jan 05, 2016 10:29 am

Hi Jocko,

I allready did a reboot a lot, makes no difference.

No, the USB disk has not been unplugged at all, only did a firmware update.

What's confusing as well is that I have the Rpi 1 B+, but the firmware name is rspb2, I did pick the right download.

For now everything works okay, but it's inconvenient :oops:
knielen
Donator VIP
Donator VIP
 
Posts: 16
Joined: Tue Dec 30, 2014 12:20 pm

Re: upgrade to 16.1 not without issues

Postby Jocko » Tue Jan 05, 2016 10:48 am

Hi knielen,

Currently I have no idea why you lost your shares settings after upgrading. Later, we go to try to reproduce it (but with a backup of the nas database to restore directly them)

So currently you have a corrupted nas database with an orphan disk. Can you post the output of
Code: Select all
grep -A 20 '<disk>' etc/nas_conf_db.xml

grep -A 11 '<vol>' etc/nas_conf_db.xml
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: upgrade to 16.1 not without issues

Postby knielen » Tue Jan 05, 2016 1:29 pm

Also 2 disks, which are the same :hammerhead

Code: Select all
root@fvdwsl-base:/ # grep -A 20 '<disk>' etc/nas_conf_db.xml
                        <disk>
                                <device>/dev/sda</device>
                                <inactivityperiod>15</inactivityperiod>
                                <lastselftest>0</lastselftest>
                        </disk>
                        <usbguard>
                                <enable>true</enable>
                                <inactivityperiod>15</inactivityperiod>
                        </usbguard>
                </hdparams>
                <notify>
                        <eventbmp>3</eventbmp>
                        <email>
                                <enable>false</enable>
                                <address/>
                                <smtpip/>
                        </email>
                        <icq>
                                <enable>false</enable>
                                <idnum/>
                                <passwd/>
--
                <disk>
                        <size>2.39004135132</size>
                        <internal>true</internal>
                        <name>Single</name>
                        <system>true</system>
                        <blockdev>/dev/mmcblk0</blockdev>
                        <diskid>035344534c303847801977366300e900</diskid>
                        <model>SL08G</model>
                        <usb>false</usb>
                        <freesize>0</freesize>
                        <init>true</init>
                        <partitions>
                                <partition>
                                        <lvname>/dev/mmcblk0p4</lvname>
                                        <volid>1000</volid>
                                        <color>#9d773e</color>
                                        <index>0</index>
                                        <size>2.39004135132</size>
                                </partition>
                        </partitions>
                </disk>
                <disk>
                        <size>1863.01269531</size>
                        <internal>true</internal>
                        <name>USB-A</name>
                        <system>false</system>
                        <blockdev>/dev/sda</blockdev>
                        <diskid>DE177DE8040000BF_Samsung_M3_Portable</diskid>
                        <model>Samsung_M3_Portable</model>
                        <usb>true</usb>
                        <freesize>0</freesize>
                        <init>true</init>
                        <partitions>
                                <partition>
                                        <lvname>/dev/sda5</lvname>
                                        <volid>2000</volid>
                                        <color>#5088be</color>
                                        <index>0</index>
                                        <size>1863.01269531</size>
                                </partition>
                        </partitions>
                </disk>
                <disk>
                        <size>1863.01269531</size>
                        <internal>true</internal>
                        <name>USB-A</name>
                        <system>false</system>
                        <blockdev>/dev/sda</blockdev>
                        <diskid>DE177DE8040000BF-0:0_Samsung_M3_Portable</diskid                                 >
                        <model>Samsung_M3_Portable</model>
                        <usb>true</usb>
                        <freesize>0</freesize>
                        <init>true</init>
                        <partitions>
                                <partition>
                                        <lvname>/dev/sda5</lvname>
                                        <volid>2001</volid>
                                        <color>#71d975</color>
                                        <index>0</index>
                                        <size>1863.01269531</size>
                                </partition>
                        </partitions>
                </disk>

Code: Select all
root@fvdwsl-base:/ # grep -A 11 '<vol>' etc/nas_conf_db.xml
                <vol>
                        <volid>1000</volid>
                        <md>/dev/mmcblk0p4</md>
                        <fs>1000</fs>
                        <lastindex>1</lastindex>
                        <name>SD-Card</name>
                        <devices/>
                        <raidtype>single</raidtype>
                        <color>#9d773e</color>
                        <formatting>0</formatting>
                        <size>2.39004135132</size>
                </vol>
                <vol>
                        <volid>2001</volid>
                        <md>/dev/sda5</md>
                        <fs>2001</fs>
                        <lastindex>1</lastindex>
                        <name>USB-A-5</name>
                        <devices/>
                        <raidtype>single</raidtype>
                        <color>#71d975</color>
                        <formatting>0</formatting>
                        <size>1863.01269531</size>
                </vol>
                <vol>
                        <volid>2001</volid>
                        <md>/dev/sda5</md>
                        <fs>2001</fs>
                        <lastindex>1</lastindex>
                        <name>USB-A-5</name>
                        <devices/>
                        <raidtype>single</raidtype>
                        <color>#71d975</color>
                        <formatting>0</formatting>
                        <size>1863.01269531</size>
                </vol>
knielen
Donator VIP
Donator VIP
 
Posts: 16
Joined: Tue Dec 30, 2014 12:20 pm

Re: upgrade to 16.1 not without issues

Postby Jocko » Tue Jan 05, 2016 3:35 pm

Ok maybe an explanation.

In version 16.1, I added in the disk_id an instance value (0:0) to handle the case if you plug an hub (otherwise, the disks are the same id).

So when you rebooted the NAS, the firmware added new settings for the disk (id: DE177DE8040000BF-0:0_Samsung_M3_Portable) in the nas database instead of reuse information with id: DE177DE8040000BF_Samsung_M3_Portable. But still I don't understand why the firmware does not remove the obsolete settings :scratch.

But to restore the nas database, I need an additional information (to avoid to lose the share settings as I don't known if the shares created on USB-A-5 use 2000 or 2001 as sharemount point,)
Code: Select all
grep -A 1 '<sharemount>' /etc/nas_conf_db.xml
ls -l /direct-usb
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: upgrade to 16.1 not without issues

Postby knielen » Tue Jan 05, 2016 6:19 pm

Here it is:

Code: Select all
root@fvdwsl-base:/ # grep -A 1 '<sharemount>' /etc/nas_conf_db.xml
                        <sharemount>1000</sharemount>
                        <volid>1000</volid>
--
                        <sharemount>2001</sharemount>
                        <volid>2001</volid>
--
                        <sharemount>2001</sharemount>
                        <volid>2001</volid>
--
                        <sharemount>2001</sharemount>
                        <volid>2001</volid>
--
                        <sharemount>2001</sharemount>
                        <volid>2001</volid>
--
                        <sharemount>2001</sharemount>
                        <volid>2001</volid>
--
                                <sharemount>2000</sharemount>
                        </webshare>
root@fvdwsl-base:/ # ls -l /direct-usb
lrwxrwxrwx  1 root root 11 2011-11-16 12:00 /direct-usb -> /share/2001
root@fvdwsl-base:/ #
knielen
Donator VIP
Donator VIP
 
Posts: 16
Joined: Tue Dec 30, 2014 12:20 pm

Re: upgrade to 16.1 not without issues

Postby Jocko » Tue Jan 05, 2016 6:40 pm

Ok

To restore your nas database :
I assume you have create a share "temp" on the SD card
- backup the nas database
Code: Select all
cp /etc/nas_conf_db.xml /share/1000/temp/nas_conf_db.xml.org

- copy the nas database
Code: Select all
cp /etc/nas_conf_db.xml /share/1000/temp

- set write permissions
Code: Select all
chmod a+w /share/1000/temp/nas_conf_db.xml


From a laptop (so you need a full access on the share "temp"), edit nas_conf_db.xml file stored in the share temp:
- remove this disk node:
Code: Select all
<disk>
                        <size>1863.01269531</size>
                        <internal>true</internal>
                        <name>USB-A</name>
                        <system>false</system>
                        <blockdev>/dev/sda</blockdev>
                        <diskid>DE177DE8040000BF_Samsung_M3_Portable</diskid>
                        <model>Samsung_M3_Portable</model>
                        <usb>true</usb>
                        <freesize>0</freesize>
                        <init>true</init>
                        <partitions>
                                <partition>
                                        <lvname>/dev/sda5</lvname>
                                        <volid>2000</volid>
                                        <color>#5088be</color>
                                        <index>0</index>
                                        <size>1863.01269531</size>
                                </partition>
                        </partitions>
                </disk>
(so disk node with diskid DE177DE8040000BF_Samsung_M3_Portable)
and keep only one vol node(you have to keep only one)
Code: Select all
<vol>
                        <volid>2001</volid>
                        <md>/dev/sda5</md>
                        <fs>2001</fs>
                        <lastindex>1</lastindex>
                        <name>USB-A-5</name>
                        <devices/>
                        <raidtype>single</raidtype>
                        <color>#71d975</color>
                        <formatting>0</formatting>
                        <size>1863.01269531</size>
                </vol>

- save it and overwrite the current nas database
Code: Select all
cp  /share/1000/temp/nas_conf_db.xml /etc


So go to the disk setup menu it should be ok now (check also the main share menu)

But do not restart the NAS (you will get again two disks).
I am building a test patch for fixing this bug
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: upgrade to 16.1 not without issues

Postby knielen » Wed Jan 06, 2016 8:24 am

Yay, this fixed the problem, looks normal again. I will wait for an update.
Thanks for the quick support! :applause
knielen
Donator VIP
Donator VIP
 
Posts: 16
Joined: Tue Dec 30, 2014 12:20 pm

Re: upgrade to 16.1 not without issues

Postby Jocko » Wed Jan 06, 2016 11:25 am

:-D
See your pm to get the patch file.

To install it you need to have a share 'fvdw' and store it the zip archive.
Then install it by using the upload menu with control code 'unzip'.

If it is OK:

do this tests:
* first step without rebooting your rspb
- do a safe removal (usb disks menu). Of course you need to stop before some servers requiring a share on this disk (cron, nbzget, btsync,....)
- unplug and plug again the disk
- wait a moment and see if the disk is mounted again (usb disks menu), the shares are restored on it (main share menu) and only one USB disk (disk setup menu)

So if it is ok, restart the NAS, and see if all is still ok

Note: later we go to try to reproduce the error.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Next

Return to Raspberry Pi 1, 2, 3 and 4

Who is online

Users browsing this forum: No registered users and 1 guest