Can't create new disk image grater than 2 GB

Can't create new disk image grater than 2 GB

Postby frikzy » Sat May 18, 2013 10:22 pm

Hello,
I succesfully upgraded my LCNS2 classic with fvdw-sl-14 firmware and firmware is really great. :applause
I tried to create new disk image of 40 GB to connect my TV via USB. I managed to create disk image of max 2 GB and then activate device mode. My TV recognized new USB-device and everything is OK, except this image is to small.
When I move slider to 40 GB (or any other size more than 2 GB) after some time (~15 minutes), I got a message: "disk image nr 1 with size of 40 GB created". And next to button "Delete disk image" there is a message: "Create command returned 0 but no disk image found?? no disk image available in disk-images share." All upper tree buttons are grey, so I can't activate device mode.
When I check in File share management, there is sometimes disk-images (but not every time).
I apreciate your help with this item.
frikzy
Donator VIP
Donator VIP
 
Posts: 13
Joined: Mon Feb 27, 2012 9:06 pm

Re: Can't create new disk image grater than 2 GB

Postby fvdw » Sat May 18, 2013 10:30 pm

I will see if I can reproduce this error

ps you need to delete the old image first
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Can't create new disk image grater than 2 GB

Postby fvdw » Sat May 18, 2013 10:33 pm

confirmed I get the same problem when trying to create a 5 GB image.
I will look at this tomorrow (too late now) sorry to keep you waiting
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Can't create new disk image grater than 2 GB

Postby Jocko » Sat May 18, 2013 10:34 pm

Maybe an issue with a timeout and the php script doesn't run upto the end...
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Can't create new disk image grater than 2 GB

Postby fvdw » Sat May 18, 2013 10:38 pm

it seem the image is created compltely (last trial with a 3 GB one) file was there.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Can't create new disk image grater than 2 GB

Postby Jocko » Sat May 18, 2013 10:42 pm

I assume that the shell command runs upto the image is created but that the php parent process is killed by over timeout.

But as it's late I checked nothing to confirm my idea
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Can't create new disk image grater than 2 GB

Postby fvdw » Sat May 18, 2013 11:02 pm

if you create an image bigger then 2GB you get also the 3 top buttons grayed out after closing re-opening the webinterface, seems not be able to find the image, could be an error in filesize routine, the file is there in reality, so no timeout issue to my opinion To be checked tomorrow
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Can't create new disk image grater than 2 GB

Postby Jocko » Sun May 19, 2013 9:44 am

I looked at the php code and it is not a timeout problem but a php function that apparently does not return the correct value: FileExists on line 195 of the menu
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Can't create new disk image grater than 2 GB

Postby Jocko » Sun May 19, 2013 9:55 am

founded :-D

it's a php limit :fuming.

here an extract from php.net for the file_exists function
Note: Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results for files which are larger than 2GB.


So we must change some code lignes :evil:
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Can't create new disk image grater than 2 GB

Postby fvdw » Sun May 19, 2013 9:59 am

I had this in the past and found a way to use it, need some time to refresh the memory...
The adaption is also used in determining total disk size on information page

It was also present in usb-extras in the past but maybe someone changed it :whistle

---edit no filesize is still calculate ok it uses this code
Code: Select all
   // function filesize does not work on file larger then 2 GB
   exec("ls -al $img | awk '{ print $5}'",$out,$retval1);
   return round($out[0]/(1024*1024*1000));
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Next

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 10 guests