Few problems with fvdw

Re: Few problems with fvdw

Postby fvdw » Sun Feb 05, 2012 8:47 pm

You need to be more specific on what you have done.
What error do you get when formatting the image with the TV ?

How did you make the "clone" and how did try to get it used by the firmware usb-extra's feature.

If you write that you get the mount error and that the share is not image is not available as share it means that the back side usb port is not connected to your TV. In auto switch mode the firmware will then tries to mount the disk image, which fails because your TV probably made it unreadable. You can disable auto switch in the usb-extras menu and set it to "device mode" that will always setup the system to use back side usb port. Needles to say that in that setting the front side usb port of the nwsp2 can not be used.
So if we succeed to let your TV format the disk image in the format it wants to have it in then that could be a solution for you.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Few problems with fvdw

Postby hamcloak » Sun Feb 05, 2012 9:15 pm

fvdw wrote:You need to be more specific on what you have done.
What error do you get when formatting the image with the TV ?

How did you make the "clone" and how did try to get it used by the firmware usb-extra's feature.

If you write that you get the mount error and that the share is not image is not available as share it means that the back side usb port is not connected to your TV. In auto switch mode the firmware will then tries to mount the disk image, which fails because your TV probably made it unreadable. You can disable auto switch in the usb-extras menu and set it to "device mode" that will always setup the system to use back side usb port. Needles to say that in that setting the front side usb port of the nwsp2 can not be used.
So if we succeed to let your TV format the disk image in the format it wants to have it in then that could be a solution for you.


The TV just gives me an useless error, something like "Can't format this device" or something like that, no error code.
I made the "clone" using the dd command in Ubuntu. However, it's not necessary to have the clone, if the TV can format the disk itself.

What i did: I created an 50GB disk image on the NS2 and activated the back USB port manually. Then i connected it via USB to my MacBook Pro running an Ubuntu Live CD and created an partition table on the disk image. After that i created an XFS partition on the disk image (to use with the TV). But i had to move the NS2 so i had to shut it down, when i booted it again i got the share error: "disk image not avaialble as share, mount failed with code 255".

So what i really need, is an separate partition on the hard disk (i made this already, 50GB, /dev/sda9) that i can access via USB, and let the TV format it.
Or i need an image that is XFS formatted and can be mounted.
hamcloak
 
Posts: 32
Joined: Thu Jan 19, 2012 6:56 pm

Re: Few problems with fvdw

Postby fvdw » Sun Feb 05, 2012 10:52 pm

as on the original firmware the usb file gadget is used to make the back side port work. This gadget can only work with disk image files and not disk partitions like /dev/sda9

Current it uses the file /share/1000/disk.image.1 to connect to the back side usb port.
This file is created when using the create image command in the web interface.
You can of course replace that by another file, just remove the disk image using the web interface and put a file in the directory /share/1000 with name disk.image.1 (of course via SSH access)
Ypu could create a disk image of 50 GB your self using these commands after accessing NAS via SSH (Putty)

Create basic a image file of 50 GB
Code: Select all
/bin/dd if=/dev/zero bs=1M count=50000 of=/share/1000/disk.image.1

Create a partition in this 50 GB image
Code: Select all
/sbin/fdisk -S 63 -H 255 -C 6500 /share/1000/disk.image.1

this command will open fdisk, give the following commands in fdisk to create 1 partition using the whole disk image
(do not create more partitions as file gadget won't like that)
Code: Select all
n
p
1
1
6500
t
83
w

The last command w is necessary to write the table to the image, if you don't do that no changes are made to the image
Now you have a disk image with partition identified as native Linux.
Please note that the numbers in these command are for a 50 GB file if you want to make another size you need to adapt the numbers. (in dd count and in fdisk the number of cylinders typically you need 130 cylinders per GB (notice the number 6500)

Now connect your nwsp2 to your TV using back side usb port and switch to device mode manually.
The TV should recognize the disk now but it will be unformatted and you can format it using your TV.
The fact that the original image as made by the firmware can not be formatted is because the partition identifier is set for FAT32 by the firmware when creating the image, apparently your TV cannot change that. Now that you have a image with a Linux partiton inside it should be able to format it. You can not format it on the NAS itself as it doesn't has the commands to format XFS partitions in the firmware. But an unformatted disk image is no problem for the file gadget. Your TV or PC will see it as unformatted drive.

PS creating a 50 GB disk image will take a while. You could start with on image of 5 GB to see if it works. If you do that then the parameter count in the dd command should be 5000 instead of 50000 and the number of cylinders used in the fdisk part should be 650 instead of 6500 (two places)

PS2 when rebooting the nas it will use auto switch mode by default. So after reboot you mus set it to manual again

PS 3 if you switch to host mode you probably will get the mount error and the image will not be available as share but that won't affect anything else on the NAS

PS 4 If you use the remove image command in the webinterface your image will be gone and you will need to recreate it

PS5 Be careful with dd en fdisk commands, if you make a mistake in the syntax you can easily destroy all data in a partition that you did not intended. Don't say I didn't warn you (nick name of the dd command = dead disk)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Few problems with fvdw

Postby hamcloak » Mon Feb 06, 2012 4:25 pm

Thanks for your reply. I tried what u said but i receive the same error when formatting it with the TV. ("Formatting failed")
I thought maybe it will help if i reboot the device, but after rebooting i get the "Fail, not switched to device mode unmouting disk image share failed" error when switching to the back USB port.

I'm really out of idea's, what more can i do?

EDIT: Just got it working! Made an 5GB partition for testing purposes using your method, formatted it to XFS using GParted in Ubuntu and plugged it into the TV, still working after reboot! You're the man. Now the only thing is to wait till T-Mobile releases an firmware-update for my Huawei router. Many many thanks for your help :)
hamcloak
 
Posts: 32
Joined: Thu Jan 19, 2012 6:56 pm

Re: Few problems with fvdw

Postby fvdw » Mon Feb 06, 2012 6:49 pm

nice to see you got it working.
In future release we will look at the possibility to use different type of images in combination with the back side usb port

ps I assume that when you switch to host mode you get get the mount error when using this XFS partition
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Few problems with fvdw

Postby hamcloak » Mon Feb 06, 2012 7:15 pm

fvdw wrote:nice to see you got it working.
In future release we will look at the possibility to use different type of images in combination with the back side usb port

ps I assume that when you switch to host mode you get get the mount error when using this XFS partition


Hmm yeah, just made an 50GB partition but after i rebooted i get the error again.
Why didn't i get it with the 5GB partition, but with the 50GB it appeared right after the reboot.
Now how can i mount the partition again without having to recreate the partition after every reboot? :\
hamcloak
 
Posts: 32
Joined: Thu Jan 19, 2012 6:56 pm

Re: Few problems with fvdw

Postby fvdw » Mon Feb 06, 2012 7:30 pm

If you only use it for recording from your TV there is no need to mount it. After reboot set it to manual and switch to device mode.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Few problems with fvdw

Postby hamcloak » Mon Feb 06, 2012 7:38 pm

fvdw wrote:If you only use it for recording from your TV there is no need to mount it. After reboot set it to manual and switch to device mode.


That's the problem, i can't switch to device mode, than i get the error.
hamcloak
 
Posts: 32
Joined: Thu Jan 19, 2012 6:56 pm

Re: Few problems with fvdw

Postby fvdw » Mon Feb 06, 2012 7:44 pm

Sorry I did not read properly.
It means that the image can not be unmounted. That can happen when it is in use by some one. For instance accessing it via explorer. Close the applications that use the folder where the image is mounted could solve this.

Otherwise try to unmount it in Putty
Code: Select all
umount /share/1000/disk-images/image-1


with giving the command
Code: Select all
mount

you can see if it is still mounted or not
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Few problems with fvdw

Postby hamcloak » Mon Feb 06, 2012 7:49 pm

fvdw wrote:Sorry I did not read properly.
It means that the image can not be unmounted. That can happen when it is in use by some one. For instance accessing it via explorer. Close the applications that use the folder where the image is mounted could solve this.

Otherwise try to unmount it in Putty
Code: Select all
umount /share/1000/disk-images/image-1


with giving the command
Code: Select all
mount

you can see if it is still mounted or not


When i enter the first command i'll get the error "can't umount umount /share/1000/disk-images/image-1: Invalid argument".
With the 'mount' command i don't see any mounted disk images.
hamcloak
 
Posts: 32
Joined: Thu Jan 19, 2012 6:56 pm

PreviousNext

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 4 guests