first sequence boot issue after installation

first sequence boot issue after installation

Postby fvdw » Mon Jul 04, 2011 7:54 pm

Hi langerak

the issue with disk space and cannot reproduce here, but I have 8-1 Beta running and some changes have been made in the disk size routines. See screen shot of the menu when creating a new user.

disk-size.JPG


Seems your restart has reset something, would be interesting to know what caused that.

About transfer speed, yes thats what I get on a 100 Mbits network as well on Gigabit I can reach for big files 10-11 MByte/s for reading and writing close to 8 MByte/s

Tell us when you have released a new version of your script
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby Jocko » Wed Jul 06, 2011 9:44 pm

fvdw wrote:Hi langerak

the issue with disk space and cannot reproduce here, but I have 8-1 Beta running and some changes have been made in the disk size routines. See screen shot of the menu when creating a new user.

Seems your restart has reset something, would be interesting to know what caused that.


Good evening Fvdw,

With the langerak script test, I got the same result as Langerak: it is necessary to do two boot sequence so the boot is normal.

At first startup, only the partition sda5 is mounted, sda8 didn't it.

I attach:
  1. the output of ps command done after the first startup.
    Code: Select all
    / # ps -ef
    UID        PID  PPID  C STIME TTY          TIME CMD
    root         1     0  0 01:00 ?        00:00:00 init
    root         2     0  0 01:00 ?        00:00:00 [kthreadd]
    root         3     2  5 01:00 ?        00:00:10 [ksoftirqd/0]
    root         4     2  0 01:00 ?        00:00:00 [events/0]
    root         5     2  0 01:00 ?        00:00:00 [khelper]
    root         8     2  0 01:00 ?        00:00:00 [async/mgr]
    root       101     2  0 01:00 ?        00:00:00 [sync_supers]
    root       103     2  0 01:00 ?        00:00:00 [bdi-default]
    root       104     2  0 01:00 ?        00:00:00 [kblockd/0]
    root       109     2  0 01:00 ?        00:00:00 [ata/0]
    root       110     2  0 01:00 ?        00:00:00 [ata_aux]
    root       114     2  0 01:00 ?        00:00:00 [ksuspend_usbd]
    root       119     2  0 01:00 ?        00:00:00 [khubd]
    root       138     2  0 01:00 ?        00:00:00 [rpciod/0]
    root       145     2  0 01:00 ?        00:00:00 [kswapd0]
    root       146     2  0 01:00 ?        00:00:00 [aio/0]
    root       147     2  0 01:00 ?        00:00:00 [nfsiod]
    root       213     2  0 01:00 ?        00:00:00 [scsi_eh_0]
    root       218     2  0 01:00 ?        00:00:00 [mtdblockd]
    root       277     2  0 01:00 ?        00:00:00 [usbhid_resumer]
    root       297     2  0 01:00 ?        00:00:00 [kjournald]
    root       310     2  0 01:00 ?        00:00:00 [kjournald]
    root       336     2  0 01:00 ?        00:00:00 [kslowd000]
    root       337     2  0 01:00 ?        00:00:00 [kslowd001]
    root       425     1  0 01:00 ?        00:00:00 /usr/sbin/buttons-spd
    root       431     2  0 01:00 ?        00:00:00 [flush-8:0]
    root       440     1  0 01:00 ?        00:00:00 /usr/sbin/noflushd -n 15 /dev/sda
    root       488     1  0 01:00 ?        00:00:00 /sbin/udhcpc -b -i eth0 -s /etc/api/api_dhcpc.php dhcpdCbScript
    root       496     1  0 01:00 ?        00:00:00 /sbin/udevd
    root       501     1  0 01:00 ?        00:00:00 /usr/bin/httpd -f httpd.conf -d /etc
    nobody     507   501  0 01:00 ?        00:00:00 /usr/bin/httpd -f httpd.conf -d /etc
    root       527     1  0 01:00 ?        00:00:00 /usr/sbin/syncawayd -n 3
    root       539     1  1 01:00 ?        00:00:02 mrvlqosd
    root       575     1  0 01:00 ?        00:00:00 dropbear
    root       604     1  0 01:00 ?        00:00:00 /usr/sbin/nmbd -D -l /var/log/samba
    root       606     1  0 01:00 ?        00:00:00 /usr/sbin/smbd -D -l /var/log/samba
    root       609   606  0 01:00 ?        00:00:00 /usr/sbin/smbd -D -l /var/log/samba
    root       610     1  0 01:00 ?        00:00:00 /bin/sh
    root       617   575  2 01:03 ?        00:00:00 dropbear
    root       618   617  0 01:03 ttyp0    00:00:00 -sh
    root       621   618  0 01:03 ttyp0    00:00:00 ps -ef
  2. the output of df command done after the first startup.
    Code: Select all
    df
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/root               151744    112496     31416  78% /
    /dev/sda5               798508     17496    772900   2% /rw_fs
    tmpfs                      200        72       128  36% /rw_fs/tmp/usr/var
    / # fdisk -l /dev/sda

    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks  Id System
    /dev/sda1               1         200     1606468+ 83 Linux
    /dev/sda2             201         402     1622565  83 Linux
    /dev/sda3             403         659     2064352+ 82 Linux swap
    /dev/sda4             660        9729    72854775   5 Extended
    /dev/sda5             661         761      811282+ 83 Linux
    /dev/sda6             762         770       72261  83 Linux
    /dev/sda7             771         971     1614501  83 Linux
    /dev/sda8             972        9729    70348603+ 83 Linux
  3. boot.log (with - Mounting volume Default: [Fail])
    Code: Select all
    / # cat boot.log
    start boot log
    inserting kernel modules:
    make dev node for buttons...
    start buttons control daemon
    buttons-spd daemon started
    start fan control daemon
    fan-spd T daemon started
    configure loopback netwerk interface
    export reset gpio pin
    starting php based setup routines step 1
    ioctl invalid return value = -1 fan control daemon stopped
    



    start boot log
    inserting kernel modules:
    make dev node for buttons...
    start buttons control daemon
    buttons-spd daemon started
    start fan control daemon
    fan-spd T daemon started
    configure loopback netwerk interface
    export reset gpio pin
    starting php based setup routines step 1
    ioctl invalid return value = -1 fan control daemon stopped
    



     * Starting syslogd... mwexec(): /sbin/syslogd
                 [ OK ]
    mwexec(): chown 99:99 /tmp/etc/nas_conf_vltl.xml
     * Initial Orion-Nas XML configuration file...       [ OK ]
     * Configuring Disks... mwexec(): /usr/sbin/noflushd -n 15 /dev/sda
                 [ OK ]
     * Configuring System Users...
    Warning: fopen(/etc/rootpasswd): failed to open stream: No such file or directory in /etc/finc/userfunc_users_commit.finc on line 38
    mwexec(): /usr/bin/passwd -P dummy dummy
    mwexec(): /usr/bin/smbpasswd -e 'dummy'
                 [ OK ]
     * Starting mount of volumes...
       - Mounting volume Default:
                          [ Fail ]
     * Finishing mount of volumes...           [ Fail ]
     * Generating Hosts File...              [ OK ]
     * Configuring System Hostname... mwexec(): /usr/bin/hostname 'SPD8020-base.local'
              [ OK ] 
     * Configuring Samba...mwexec(): /bin/mkdir -p /share/1000/public
    mwexec(): /bin/chmod 0777 /share/1000/public
                    [ OK ]
     * Configuring LAN interface... mwexec(): /sbin/ifconfig -a 'eth0' 169.254.86.128 netmask 255.255.0.0
    mwexec(): /sbin/ifconfig 'eth0' up
    mwexec(): /sbin/udhcpc -b -i 'eth0' -s /etc/api/api_dhcpc.php dhcpdCbScript
              [ OK ]
     * Starting udevd... mwexec(): /sbin/udevstart
    mwexec(): /sbin/udevd
                    [ OK ]
     * Starting web server... mwexec(): /usr/bin/httpd -f httpd.conf -d /etc
                 [ OK ]
     * Initializing Timezone... mwexec(): ln -sf /usr/share/zoneinfo/Etc/GMT+1 /etc/localtime
                 [ OK ]
    mwexec(): /usr/bin/killall  smbd
    mwexec(): /usr/bin/killall  nmbd
     * Configuring Samba...                [ OK ]
    mwexec(): /usr/bin/killall  smbd
    mwexec(): /usr/bin/killall  nmbd
    mwexec(): /usr/sbin/nmbd -D -l /var/log/samba
    mwexec(): /usr/sbin/smbd -D -l /var/log/samba
    mwexec(): cat /etc/nas_services | grep TG | grep syncawayd
     * Starting syncawayd... mwexec(): /usr/bin/killall  syncawayd
    mwexec(): /usr/sbin/syncawayd -n 3
                 [ OK ]
     * Marvell mediaserver not started...mwexec(): /usr/bin/killall  zxtract
    mwexec(): /usr/bin/killall  mrvldms
    mwexec(): /usr/bin/killall  zfs
    ,QOSd... mwexec(): /usr/bin/killall  mrvlqosd
    mwexec(): /usr/bin/killall -9 proftpd
     * Starting FTP Service... mwexec(): mkdir -p /var/proftpd
    mwexec(): chmod 777 /var/proftpd
    mwexec(): chmod 777 /etc
    mwexec(): rm -Rf /etc/proftpd.conf
    mwexec(): touch /etc/proftpd.conf
    mwexec(): chmod 666 /etc/proftpd.conf
    mwexec(): /bin/mkdir -pm 755 /tmp/var/log/proftpd

    Warning: Invalid argument supplied for foreach() in /etc/finc/ftpfunc_restart.finc on line 327
    mwexec(): /usr/sbin/proftpd
    mwexec(): chmod 755 /tmp/var/log/proftpd/proftpd.log
    mwexec(): /usr/bin/killall -QUIT ez-ipupdate
    starting php based setup routines step 2
     * Starting dropbear...              [ OK ]
    starting php based setup routines step banner
    

    *** Marvell Semiconductors ltd.
        This is PHILIPS-NAS version: 1.2.9.fw
        built on: Sat May 15 22:43:07 CEST 2010

        LAN IP address: 192.168.1.156 (DHCP)

        Port configuration:

        LAN   -> eth0
    php based setup routines finished
    web permission on resolv.conf
    set device tuning for dms performance
    move smbd en nmbd db files to ramdisk to enable disk spin down
    rcS finished
  4. at again boot.log after a second start.
    Code: Select all
     * Initial Orion-Nas XML configuration file...          [ OK ]
     * Configuring Disks...                                  [ OK ]
     * Configuring System Users...
    Warning: fopen(/etc/rootpasswd): failed to open stream: No such file or directory in /etc/finc/userfunc_users_commit.finc on line 38
                                     [ OK ]
     * Starting mount of volumes...
       - Mounting volume Default:
                                                             [ OK ]
     * Finishing mount of volumes...                         [ OK ]
     * Generating Hosts File...                              [ OK ]
     * Configuring System Hostname...                        [ OK ]
     * Configuring Samba...                                  [ OK ]
     * Configuring LAN interface...                          [ OK ]
     * Starting udevd...                                     [ OK ]
     * Starting web server...                                [ OK ]
     * Initializing Timezone...                              [ OK ]
     * Configuring Samba...                                  [ OK ]
     * Starting syncawayd...                                 [ OK ]
     * Marvell mediaserver not started...,QOSd...  * Starting FTP Service... starting php based setup routines step 2
     * Starting dropbear...                               [ OK ]
    starting php based setup routines step banner
    

    *** Marvell Semiconductors ltd.
        This is PHILIPS-NAS version: 1.2.9.fw
        built on: Sat May 15 22:43:07 CEST 2010

        LAN IP address: 192.168.1.156 (DHCP)

        Port configuration:

        LAN   -> eth0
    php based setup routines finished
    web permission on resolv.conf
    set device tuning for dms performance
    move smbd en nmbd db files to ramdisk to enable disk spin down
    rcS finished


    I hope this can help you find what's wrong
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby fvdw » Thu Jul 07, 2011 6:06 pm

fvdw wrote:About the the two times boot required to get share partition mounted correctly. A similar problem we had in version 6.0 and 6.1 After having upgraded from 5.1
It was resolved in fvdw7-0 and I did not see it here when installing 8-0 (on the spd8020), need to have a look at that.


well the bug fix from 7.0 to fix this problem from version 6.0 and 6.1 is present in 8.0 as well. The reason that time was that the firmware tried to mount the share partition (sda6 on spd8020 and sda8 on lacie nwsp1) before a passwd file was created it could then not find the username it uses to mount the partition. In the current firmware as 8-0 the passwd file is created before the share partition is mounted.
So there must be another reason for this. Or is the problem of the need of a second boot no longer present in the latest version in the script (I read something in earlier post of langerak mentioning that it work ok now) ??
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby fvdw » Thu Jul 07, 2011 8:15 pm

mm..odd
There are two reasons why the script php script will report "fail" when mounting the share partition.
(1) it can not create the directory /share/1000
(2) it can not mount the partition on /share/1000

For (1) it uses the command
Code: Select all
exec("sudo /bin/mkdir -p ".$dir ,$result,$ret);

To make this work the user "nobody" must be defined, which is done in creating the passwd file before the mount script runs
For (2) it use the mount command
When (1) or (2) fails an entry is made in the system log (/var/log/messages) there you should be able to find if command (1) failed or (2). Of course if (1) fails also (2) will fail as no mountpoint is present.

Now the strange point is that at second boot everything goes ok. As in the clean firmware the passwd file is not present but created at first boot this could be the cause of the problem when the passwd file is created after the mount script. (At second boot the passwd file from first boot is still there. That has been changed in fvdw7-0 and later version first create the passwd file and then mount the share partition. At every boot the passwd file is deleted and recreated so when it works at second boot then the passwd file is not the problem to my opinion.

Please have a look at /var/log/messages after the first boot maybe that helps us to give an indication what wrong. There should be an massage like ..Failed to create DIR ... and/or ..Failed to mount

You can also check if the folder /share/1000 is present or not , if it is present then the the command (1) was succesful as in the clean firmware the folder/share/1000 is not present. In that case the mount command fails at first boot

for reference this is the function used in the php script

Code: Select all
function dm_mount_all() // Mounting all the MD's
{
   global $config,$g;

   $error = 0;
   if (is_booting())
        echo " * Starting mount of volumes...\n";
   $share=SHARE_MOUNTPOINT;

   if ($config['vols']['vol'])
   {
      foreach ($config['vols']['vol'] as $value)
      {
         $volerr = 0;
         if (is_booting())
            echo "   - Mounting volume {$value['name']}: \n";
         //Check if the dir exist ?
         $dir=$share."/".$value['fs'];
         $cmd="mount ".$value['md']." ".$dir;
         if (is_booting())
            $cmd=$cmd." > /dev/null 2>&1";
         if (!(is_dir($dir)))
         {
            exec("sudo /bin/mkdir -p ".$dir ,$result,$ret);
            if ($ret!=0)
            {
               logError(__FILE__,  __LINE__ , "Failed to create DIR", LOG_WARNING);
               $error = 1;
               $volerr = 1;
            }
         }
         //Mounting
         exec($cmd ,$result,$ret);
         if ($ret!=0)
         {
            logError(__FILE__,  __LINE__ , "Failed to mount ".$dir, LOG_WARNING);
            $error = 1;
            $volerr = 1;
         }
         if ($volerr == 0)
         {
            if (is_booting())
               echo "\t\t\t\t\t\t\t [ OK ] \n";
         }
         else
         {
            if (is_booting())
               echo "\t\t\t\t\t\t\t [ Fail ] \n";
         }
      }
   }
   if ($error == 1)
   {
   if (is_booting())
      {
         echo " * Finishing mount of volumes... \t\t\t [ Fail ] \n";
      }
      return FAIL_E;
   }
   else
   {
      if (is_booting())
      {
         echo " * Finishing mount of volumes... \t\t\t [ OK ] \n";
      }
   return OK_E;
   }
}
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby fvdw » Thu Jul 07, 2011 8:24 pm

I edited above post
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby Jocko » Thu Jul 07, 2011 8:31 pm

Ok fvdw,

I do another test and I keep the disk with only one boot sequence...
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby Jocko » Thu Jul 07, 2011 8:43 pm

Oups...

In fact, I had already kept the disk with only one boot sequence...

Strange results : :?:
no message in messages.
dir 1000 exists (and public)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby fvdw » Thu Jul 07, 2011 8:54 pm

I will run an install of fvdw8-0-sl on one my spd8020's to see what that brings after first boot
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby fvdw » Thu Jul 07, 2011 9:07 pm

Jocko wrote:Oups...

In fact, I had already kept the disk with only one boot sequence...

Strange results : :?:
no message in messages.
dir 1000 exists (and public)


How did you verify that, if you connect the disk to Linux PC and looked at sda7 and sda8 then there is no proof that sda8 was mounted. With the output of mount you posted on previous page of this threat it was clear that sda8 was not mounted so it seems the mount command fialed.
If you have put it again in the nwsp1 then it has been booted twice.. ;)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: automatic preparation HDD lacie nwsp1 for fvdw firmware

Postby fvdw » Thu Jul 07, 2011 9:14 pm

fvdw wrote:I will run an install of fvdw8-0-sl on one my spd8020's to see what that brings after first boot


well everything seems ok this is content of boot.log after first boot
Code: Select all
start boot log
inserting kernel modules:
make dev node for buttons...
start buttons control daemon
buttons-spd daemon started
start fan control daemon
fan-spd T daemon started
configure loopback netwerk interface
export reset gpio pin
starting php based setup routines step 1




 * Initial Orion-Nas XML configuration file...       [ OK ]
 * Configuring Disks...              [ OK ]
 * Configuring System Users...
Warning: fopen(/etc/rootpasswd): failed to open stream: No such file or directory in /etc/finc/userfunc_users_commit.finc on line 38
             [ OK ]
 * Starting mount of volumes...
   - Mounting volume Default:
                      [ OK ]
 * Finishing mount of volumes...           [ OK ]
 * Generating Hosts File...              [ OK ]
 * Configuring System Hostname...           [ OK ] 
 * Configuring Samba...                [ OK ]
 * Configuring LAN interface...           [ OK ]
 * Starting udevd...                 [ OK ]
 * Starting web server...              [ OK ]
 * Initializing Timezone...              [ OK ]
 * Starting NTP client...              [ OK ]
 * Configuring Samba...                [ OK ]
 * Starting syncawayd...              [ OK ]
 * Marvell mediaserver not started...,QOSd... starting php based setup routines step 2
 * Starting dropbear...              [ OK ]
starting php based setup routines step banner


*** Marvell Semiconductors ltd.
    This is PHILIPS-NAS version: 1.2.9.fw
    built on: Sat May 15 22:43:07 CEST 2010

    LAN IP address: 192.168.1.41 (DHCP)

    Port configuration:

    LAN   -> eth0
php based setup routines finished
web permission on resolv.conf
set device tuning for dms performance
move smbd en nmbd db files to ramdisk to enable disk spin down
rcS finished


this are mounted partitons and file systems (note that on spd8020 sda6 is used for shares intead of sda8 on the nwsp1
Code: Select all
$ mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
/dev/sda5 on /rw_fs type ext3 (rw,noatime,errors=continue,data=ordered)
tmpfs on /rw_fs/tmp/usr/var type tmpfs (rw,relatime,size=200k)
/proc/bus/usb/ on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda6 on /share/1000 type ext3 (rw,relatime,errors=continue,data=ordered)


output df command
Code: Select all
$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               151744    112484     31428  78% /
/dev/sda5               373359      8447    345636   2% /rw_fs
tmpfs                      200        88       112  44% /rw_fs/tmp/usr/var
/dev/sda6            487135856 438754380  48381476  90% /share/1000
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 6 guests