Two little bugs

Re: Two little bugs

Postby Jocko » Fri Feb 23, 2018 9:21 pm

Ok I misunderstood your previous post
Hi applied patch and now I see sda but unformatted.
When I try to initialize it can't do it and this show this message:
Code: Select all
Reported message:
   Fail (volume unknown)


Restart the NAS to switch in regular mode.

More detail in: /etc/.setup.fs/setupjob.log
So you have still the setup mode on your NAS and then you need to restart the nas from the web-interface to restore the regular mode.

Please to repeat the asked output after rebooting the NAS by this way.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Two little bugs

Postby Aled72 » Sat Feb 24, 2018 10:07 am

Then... I post a screen story of procedure. :-D

1st part, the prelude :-)
You do not have the required permissions to view the files attached to this post.
Aled72
Donator VIP
Donator VIP
 
Posts: 73
Joined: Sun Feb 04, 2018 3:27 pm

Re: Two little bugs

Postby Aled72 » Sat Feb 24, 2018 10:09 am

2nd part.
The epilogue
You do not have the required permissions to view the files attached to this post.
Aled72
Donator VIP
Donator VIP
 
Posts: 73
Joined: Sun Feb 04, 2018 3:27 pm

Re: Two little bugs

Postby Jocko » Sat Feb 24, 2018 10:55 am

:pound
Thank you for this post but I repeat again what I already posted
Jocko wrote:Please do not run more setup job : more you run setup jobs less I wil understand what is the current state of your NAS.
So DO NOT RUN anymore setup job!

The issue is not at this level.

What I wait is :
Jocko wrote:So this time I really need these outputs
Code: Select all
mount
gdisk -l /dev/sda     (I updated this line as I know now you have a gpt table)
file -bs /dev/sda8
/etc/api/nasapi.php "mrvlGetDisk high all"
/etc/api/nasapi.php "mrvlGetVolume high all"
(at least with your last post I am sure now you have no longer the setup mode on your nas)
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Two little bugs

Postby Aled72 » Sat Feb 24, 2018 11:10 am

Sorry Jocky, I jumped a post

this is the output of yours command:
Code: Select all
root@BKP-Central:/ # mount
/dev/sda7 on / type ext3 (rw,relatime,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda5 on /rw_fs type ext3 (rw,noatime,data=ordered)
tmpfs on /rw_fs/tmp/usr/var type tmpfs (rw,relatime,size=5000k)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
root@BKP-Central:/ # gdisk -l /dev/sda                                       
GPT fdisk (gdisk) version 0.8.5                                             
                                                                             
Partition table scan:                                                       
  MBR: protective                                                           
  BSD: not present                                                           
  APM: not present                                                           
  GPT: present                                                               
                                                                             
Found valid GPT with protective MBR; using GPT.                             
Disk /dev/sda: 3907029168 sectors, 1.8 TiB                                   
Logical sector size: 512 bytes                                               
Disk identifier (GUID): 00000000-0000-0000-0000-000000000000                 
Partition table holds up to 128 entries                                     
First usable sector is 34, last usable sector is 3907029134                 
Partitions will be aligned on 2048-sector boundaries                         
Total free space is 4062 sectors (2.0 MiB)                                   
                                                                             
Number  Start (sector)    End (sector)  Size       Code  Name               
   1            4096         1052671   512.0 MiB   8300  Linux filesystem   
   2         1052672         2101247   512.0 MiB   8300  Linux filesystem   
   3         2101248         3149823   512.0 MiB   8200  Linux swap         
   4         3149824         3166207   8.0 MiB     8300  Linux filesystem   
   5         3166208         4739071   768.0 MiB   8300  Linux filesystem   
   6         4739072         4755455   8.0 MiB     8300  Linux filesystem   
   7         4755456         5804031   512.0 MiB   8300  Linux filesystem   
   8         5804032      3907029134   1.8 TiB     8300  Linux filesystem   
root@BKP-Central:/ # file -bs /dev/sda8                                     
data
root@BKP-Central:/ # /etc/api/nasapi.php "mrvlGetDisk high all"
Array
(
    [0] => Array
        (
            [diskid] => JK1105B8GYG4VX
            [name] => sda
            [blockdev] => /dev/sda
            [isusb] => 0
            [isformated] => 1
            [isinternal] => 1
            [issystem] => 1
            [totalsize] => 1860.24
            [freesize] => 0
            [table] => gpt
            [partitions] => Array
                (
                    [0] => Array
                        (
                            [size] => 1860.24909163
                            [volid] =>
                            [color] => #9d773e
                            [lvname] => /dev/sda8
                        )

                )

        )

)
root@BKP-Central:/ # /etc/api/nasapi.php "mrvlGetVolume high all"
Array
(
    [0] => Array
        (
            [volid] =>
            [totalsize] => 1860.24909163
            [freesize] => 0
            [usedsize] => 1860.24909163
            [name] => SD-Card
            [md] => /dev/sda8
            [color] => #77b784
            [formatting] => 0
            [status] => active
            [busy] => 0
            [raidtype] => single
            [devices] =>
        )

)
root@BKP-Central:/ #
Aled72
Donator VIP
Donator VIP
 
Posts: 73
Joined: Sun Feb 04, 2018 3:27 pm

Re: Two little bugs

Postby Jocko » Sat Feb 24, 2018 12:03 pm

Ok,

it seems with your last setup job (reset sda), sda8 is no longer formatted.

I fail to read the error message on your screen capture. So can you post please the content of
Code: Select all
cat /etc/.setup.fs/setupjob.log
cat  /etc/.setup.fs/*.sh


and also :
Code: Select all
ls -l /etc/finc/dm_update_single_db.finc
ls -l /etc/finc/dm_set_usb_raid.finc
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Two little bugs

Postby Aled72 » Sat Feb 24, 2018 12:57 pm

This output is very long:

Code: Select all
root@BKP-Central:/ # cat /etc/.setup.fs/setupjob.log
<b>Setup task reset.sh is now running</b><br>
Found disk: sda(JK1105B8GYG4VX) <br>
Found disk: seg(00D04BA71808948A) <br>
Format partition sda8 with file system ext4: <br>
=>mke2fs 1.43.4 (31-Jan-2017)
/dev/sda8 is mounted; will not make a filesystem here!
=><span style="color:red;"><b>Fail (set ext4 file system on sda8 failed)</b></span><br>
<br><span style="color:red;">NAS restarting on user's request</span><br>
Restore the regular boot mode...<br>
OK<br></span>
NAS is restarting...OK<br>
root@BKP-Central:/ # cat  /etc/.setup.fs/*.sh
#!/bin/sh

# Jocko : version 1.3 19/01/2017

. /etc/.setup.fs/setupjob.ini
. /etc/.setup.fs/dic_setup.ini

LOG=/etc/.setup.fs/setupjob.log

stopjob(){
 stop=$(date '+%s')
 [ -n "$1" ] && error=$@ || error=
 sed -rie "s/.*(stop=).*/\1$stop/g;s/.*(status=).*/\1$status/g;s/.*(error=).*/\1\"$error\"/g" /etc/.setup.fs/setupjob.ini
 [ $status -eq 3 ] && echo '<span style="color:red;"><b>'$@'</b></span><br>'>> $LOG
}

check_mode(){
 if ps x -o cmd|grep -v grep|grep -c noflushd > /dev/null
 then
  status=3
  stopjob 'setup mode is not available !'
  exit 1
 fi
}

unlink /rw_fs/tmp/setup 2>/dev/null
check_mode

status=0
stop=
error=

if [ -z "$start" ] || [ $start -eq 0 ]
then
 start=$(date '+%s')
 sed -rie "s/.*(start=).*/\1$start/g;s/.*(stop=).*/\1$stop/g;s/.*(status=).*/\1$status/g" /etc/.setup.fs/setupjob.ini
 echo -e '<b>'$task_start"</b><br>"> $LOG
else
 echo -e '<br><b>'$task_restart"</b><br>">> $LOG
 sed -rie "s/.*(stop=).*/\1$stop/g;s/.*(status=).*/\1$status/g" /etc/.setup.fs/setupjob.ini
fi

if [ -f /etc/.setup.fs/check_disk ]
then
 . /etc/.setup.fs/check_disk 'sda,JK1105B8GYG4VX,0 seg,00D04BA71808948A,0 '

 if [ -e '/etc/.setup.fs/set_fs.0' ]
 then
  src=$(readlink -f '/etc/.setup.fs/set_fs.0')
  . $src sda8 ext4
  unlink "$src"
 fi
 if [ -e '/etc/.setup.fs/set_partid.0' ]
 then
  src=$(readlink -f '/etc/.setup.fs/set_partid.0')
  . $src sda8
  unlink "$src"
 fi
 if [ -e /etc/.setup.fs/reset_shares-0.0 ]
 then
  src=$(readlink -f /etc/.setup.fs/reset_shares-0.0)
  export start
  ret=$(/usr/bin/php $src 0)
  if [ "$ret" !=  "0" ]
  then
   status=3
   stopjob $ret
   exit 1
  else
   echo " OK<br>" >> $LOG
   unlink $src
  fi
 fi
 if [ -e '/etc/.setup.fs/delete_table.1' ]
 then
  src=$(readlink -f '/etc/.setup.fs/delete_table.1')
  . $src seg
  unlink "$src"
 fi
 sleep 5
 if [ -e '/etc/.setup.fs/set_table.1' ]
 then
  src=$(readlink -f '/etc/.setup.fs/set_table.1')
  . $src seg8 gpt
  unlink "$src"
 fi
 sleep 5
 if [ -e '/etc/.setup.fs/set_fs.1' ]
 then
  src=$(readlink -f '/etc/.setup.fs/set_fs.1')
  . $src seg8 ext4
  unlink "$src"
 fi
 if [ -e '/etc/.setup.fs/set_partid.1' ]
 then
  src=$(readlink -f '/etc/.setup.fs/set_partid.1')
  . $src seg8
  unlink "$src"
 fi
 status=1
 stopjob
 echo '<b>'$task_end'</b><br>'>> $LOG
 # unlink "$0"
 /etc/leds_switch off
 sleep 5
 /etc/leds_bootup
else
 status=3
 stopjob $err_missing_info
fi
root@BKP-Central:/ # ls -l /etc/finc/dm_update_single_db.finc
-rw-r--r--  1 root root 19465 2018-02-20 01:26 /etc/finc/dm_update_single_db.finc
root@BKP-Central:/ # ls -l /etc/finc/dm_set_usb_raid.finc
-rw-r--r--  1 root root 7498 2018-02-20 01:26 /etc/finc/dm_set_usb_raid.finc
root@BKP-Central:/ #
Aled72
Donator VIP
Donator VIP
 
Posts: 73
Joined: Sun Feb 04, 2018 3:27 pm

Re: Two little bugs

Postby Jocko » Sat Feb 24, 2018 1:23 pm

Ok with your last outputs, I succeeded to reproduce your issue :
aled72-issue.jpg


Setup job fails as sda8 is still mounted
Code: Select all
/dev/sda8 is mounted; will not make a filesystem here!

The firmware failed to unmount it because sda8 is mounted on a bad mountpoint (directly on /share). There is a bad mountpoint because nas database is still not rightly updated.

I go to deepen why. (As I reproduced your issue, it will be easy). So wait a short moment
You do not have the required permissions to view the files attached to this post.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Two little bugs

Postby Jocko » Sat Feb 24, 2018 2:42 pm

This time, I think the issue is fixed.

I also understand why sda8 was unformatted even if mke2fs aborts. It is an error in my format script which destroys the fs before running the format command. Now I added a test to check if the partition is not yet mounted.

To install the new file, use the same workaround :
* go to the firmware upgrade menu, click on the small button '+' :
* upload the attached file (step1) but do not run step2
* open a shell terminal and do
Code: Select all
cd /tmp
mv firmware.bin fvdw-sl-17-x-reset-disk-fix-24feb18.tar.gz
tar -xf fvdw-sl-17-x-reset-disk-fix-24feb18.tar.gz -C /

Then reboot the NAS.

Go to the disk setup menu, you should see again your Disk-A and a volume Vol-A. But this one is no longer formatted. So you need to run either a reset job on the disk or a format job on the volume Vol-A.

After running this job and rebooting the nas, post these outputs to check if all is now right
Code: Select all
mount
file -bs /dev/sda8
/etc/api/nasapi.php "mrvlGetDisk high all"
/etc/api/nasapi.php "mrvlGetVolume high all"
cat /etc/.setup.fs/setupjob.log
And ensure to disable the debug mode (performance issue)
Code: Select all
debugoff
You do not have the required permissions to view the files attached to this post.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Two little bugs

Postby Aled72 » Sat Feb 24, 2018 3:58 pm

Hi, now sda is ok but have the same issue with esata drive. I see it in initialize section but it result always not formatted.

Code: Select all
root@BKP-Central:/ # mount
/dev/sda7 on / type ext3 (rw,relatime,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda5 on /rw_fs type ext3 (rw,noatime,data=ordered)
tmpfs on /rw_fs/tmp/usr/var type tmpfs (rw,relatime,size=5000k)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sda8 on /share/1000 type ext4 (rw,noatime,nodelalloc,data=ordered)
root@BKP-Central:/ # file -bs /dev/sda8                                     
Linux rev 1.0 ext4 filesystem data, UUID=0bb4ab73-bf09-4f84-a550-f8ba31ae0a31 (needs journal recovery) (extents) (large files) (huge files)               
root@BKP-Central:/ # /etc/api/nasapi.php "mrvlGetDisk high all"             
Array                                                                       
(                                                                           
    [0] => Array                                                             
        (                                                                   
            [diskid] => JK1105B8GYG4VX                                       
            [name] => sda                                                   
            [blockdev] => /dev/sda                                           
            [isusb] => 0                                                     
            [isformated] => 1                                               
            [isinternal] => 1                                               
            [issystem] => 1                                                 
            [totalsize] => 1860.24                                           
            [freesize] => 0                                                 
            [table] => gpt                                                   
            [partitions] => Array                                           
                (                                                           
                    [0] => Array                                             
                        (                                                   
                            [size] => 1860.24909163                         
                            [volid] => 1000                                 
                            [color] => #9d773e                               
                            [lvname] => /dev/sda8                           
                        )

                )

        )

)
root@BKP-Central:/ # /etc/api/nasapi.php "mrvlGetVolume high all"
Array
(
    [0] => Array
        (
            [volid] => 1000
            [totalsize] => 1860.24909163
            [freesize] => 1811.37670898
            [usedsize] => 48.8723826456
            [name] => Vol-A
            [md] => /dev/sda8
            [color] => #77b784
            [formatting] => 0
            [status] => active
            [busy] => 0
            [raidtype] => single
            [devices] =>
        )

)
root@BKP-Central:/ # cat /etc/.setup.fs/setupjob.log
<b>Setup task reset.sh is now running</b><br>
Found disk: sda(JK1105B8GYG4VX) <br>
Found disk: seg(00D04BA71808948A) <br>
Format partition sda8 with file system ext4: <br>
=>mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 487653137 4k blocks and 121913344 inodes
Filesystem UUID: 0bb4ab73-bf09-4f84-a550-f8ba31ae0a31
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848

Allocating group tables: done                           
Writing inode tables: done                           
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done       

=>Formatting sda8 succeeded<br>
Update partition type on sda8: OK<br>
Remove orphan shares: OK<br>
Delete the partiton table on seg: OK<br>
Create a new partiton gpt table on seg: <br>
=>Creating gpt partition table succeeded<br>
Format partition seg8 with file system ext4: <span style="color:red;"><b>Fail (bad data partition)</b></span><br>
<br><span style="color:red;">NAS restarting on user's request</span><br>
Restore the regular boot mode...<br>
OK<br></span>
NAS is restarting...OK<br>
root@BKP-Central:/ # debugoff
root@BKP-Central:/ #
Aled72
Donator VIP
Donator VIP
 
Posts: 73
Joined: Sun Feb 04, 2018 3:27 pm

PreviousNext

Return to Lacie D2 network vs2

Who is online

Users browsing this forum: No registered users and 2 guests

cron