New Lacie Networkspace 2TB with GPT enabled?

New Lacie Networkspace 2TB with GPT enabled?

Postby mamboman » Fri Jul 06, 2012 11:43 pm

Hi all,

I have just bought a Lacie Networkspace 2TB. And immediately was somehow disappointed by the restricted functionality.
Now I found your forum here and spent parts of this night in disassembly and fooling around with GParted.
I tried to follow the guidance in "howto-fvdw-on-lacie nwsp2-5jan2012.pdf" but coming to the point where I wanted to read out the disk with "fdisk",
fdisk calls out it cannot read a disk with GPT partition table on:.
fdisk.png


When I start GPartEd it looks like this:
gparted.PNG


From what I read in the forums:
1) I cannot use fdisk in this situation to do the job, right?
2) On the other hand I cannot use GPartEd as the kernel of the firmware will not work on a GPT partition table, right?

So - what? Didn't someone else have the same issue or do I miss something?

I would really love to deploy the new firmware from you that everybody is so enthusiastic about - but I really don't know how.

Thanks for any help!
You do not have the required permissions to view the files attached to this post.
mamboman
 
Posts: 13
Joined: Thu Jul 05, 2012 2:51 pm

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby fvdw » Sat Jul 07, 2012 8:32 am

probably you have a nwsp2 "lite" as we know that this has a bootloader that support GPT. As far as we know a nwsp "classic" doesn't has GPT support yet. There is a separate topic (viewforum.php?f=11) to see which one you have.

However looking to the output and seeing that physical and logical sector size is 512 bytes on this disk (assuming fdisk gives the correct output) then it looks to me that this a conventional disk and that you can partition it with fdisk as described in our manual and that it then should run (assuming the boot loader still supports the conventional disks)

GPT has has advantage for disk smaller then 2.2 TB. It enables use of disks bigger then that size. 2.2 TB is the max size a ms-dos partition table can handle.

We have already a kernel for the nwsp2 supporting GPT thats not a problem. We can sent you that if you wish to try.
It will be included in the next release anyhow.
If you have a spare HDD then maybe it is good that you try out first if you set that up with our firmware if that runs we know that the boot loader supports also none GPT partitioned disks. If that works ok than you could convert the original disk assuming it is not an advanced format disk.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby mamboman » Sat Jul 07, 2012 10:35 am

Hi fvdw,

Thanks for the very fast reply :)

Let me just add my extended experience from last night and why I then really decided to give up - seeing no more way to go:

I started to delete partitions in GPartEd and then immediately (means: without yet committing the changes) adding new partitions like this (cheers to bozo29 who seems to have made some similar experiences like I do):

sda1 - primary - 512MB / ext3 >> (here write fvdw-sl firmware)
sda2 - primary - 512MB / ext3 >> (here write fvdw-sl firmware)
sda3 - primary - 512MB / swap
-----------------------------
sda4 - extended - rest of hdd
sda5 - 785MB / ext3 >> (here write the files in the tar ball sda5-lacie-nwsp.tar.gz)
sda6 - 7MB / unformated >> (here write UIMAGE-26xyz-NWSP2CL-n - compressed linux kernel image)
sda7 - 512MB / ext3 >> (here write fvdw-sl firmware)
sda8 - rest of hdd / ext3

BUT: when trying to add sda4 -> GPartEd does not allow me to add an parition of type "Extended Partition" - options "Extended Partition" as well as "Logical Partition" remain greyed out???? I did not find a way to build the partition layout as described above. So I exited GPartEd without saving the changes and saved at least my original state.

I do not own a second drive to do test runs :(

What you recommend is: use the good old fdisk, delete all partitions and then follow your normal description?
What about the GPT? This will not be changed I assume? And the old boot loader will still reside somewhere on the disk and do the job - although I delete all the partitions and build a new layout?

If you have a new kernel supporting GPT:
1) will it be the new version 12.1 already or is it 11.0 and I can upgrade then - once it runs - via Web-GUI?
1a) how can I get it?
2) how (exactly) to I change the partition layout by using GPartEd and not fdisk? What layout does your firmware expect?
3) In case the bootloader will not work after repartitioning - how exactly can I re-generate it do to the job correctly then?

Sorry for disturbing you - and thanks so much for your patience!!!
Hopefully this also helps every other owner of the new Networkspace disks with 2 TB.

To be honest - maybe I should wait until there is a new description of patching the new versions of the Lacie - and there is some more experience with it? The most experience
seems to be there with the older version and disk layout.

Kind regards,
Mamboman
mamboman
 
Posts: 13
Joined: Thu Jul 05, 2012 2:51 pm

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby fvdw » Sat Jul 07, 2012 11:40 am

If you have a new kernel supporting GPT:
1) will it be the new version 12.1 already or is it 11.0 and I can upgrade then - once it runs - via Web-GUI?
1a) how can I get it?
2) how (exactly) to I change the partition layout by using GPartEd and not fdisk? What layout does your firmware expect?
3) In case the bootloader will not work after repartitioning - how exactly can I re-generate it do to the job correctly then?


ad 1. It can be used to run 11.0 and 12.1

ad 1a. I will sent you a pm with the new kernel

ad 2. The partition table must contain the partitions with sda1,sda2.sda3, sda5, sda6, sda7, sda8be as in the guide explained. The extended partition sda4 is only created to be able to create sda5-sda8 with fdisk (which uses msdos based partion tables) This is necessary because msdos based partition tables can not contain more then 4 primary partitions. To solve that an extended partition is created that can contain again logical partitions.
If gparted can not make extended partitions but more primary partitions just skip creating sda4 or make it a partition of one block size (of course then increase start end block numbers of sda5-sda8 with 1)

ad 3. if the bootloader can not read disks formatted by fdisk then recreate the old partitions that you had using gparted with GPT settings. But I "think" it will run the fdisk partitioned disk without a problem if your HDD is conventional disk and not an advanced format HDD, but I can guarantee this. So better go the route to try to get a gparted GPT partioned disk working

check you pm's for the new kernel. Try to make the partition table with gparted not using extended partitions

I a quite sure we can solve this :whistle :mrgreen:
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby mamboman » Sat Jul 07, 2012 2:01 pm

Hi,

quick reply: thanks for the kernel. Just downloaded it and will see whether I make it today.

My version seems to be a "lite" version. The board mentions: "LACIE NI_IS ASTON CR REV C". This is something new obviously over the classic version - at least when I look over the pictures.

So, keep your fingers pressed whether there will be a reboot after my changes :) I will give it a try and report my experience.

Kind regards!
mamboman
 
Posts: 13
Joined: Thu Jul 05, 2012 2:51 pm

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby fvdw » Sat Jul 07, 2012 3:59 pm

It must work, this a post from a user Matzi (viewtopic.php?f=4&t=581)
he had the same problem. (His disk was an advanced format 2 TB disk) He also posted there a partition table that can be used when using fdisk to partition it). The bootloader recognized both

Thanks for the kernel - Good news!

I can confirm this kernel is running on a gpt partitioned disk. At least on a 2.0TB WD HDD, most likely it will work on bigger HDDs as well. But there are two things left. The externel USB HDD (GPT partitioned as well) is still not recognized. Maybe you know another trick ?

For partititoning I did the following with gparted:

sda1 504MB
sda2 503MB
sda3 503MB
sda4 1MB
sda5 784MB
sda6 8MB
sda7 503 MB
sda8 the rest

These sizes are taken from gparted on the prior installation.

Now, is there something to optimize? What are the required sizes? What about partition 4 which is not necessary now because there is no extended partition in gpt and part 4 was just providing the frame for part 5-8. I just set up a minimum partition 4 to provide the ususal parttion numbers.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby mamboman » Sun Jul 08, 2012 1:03 am

Hi,

did it! And it works fine (apart from the problems mentioned below!)

Steps to reproduce are:

Get a kernel with GPT enabled (like the one you provided)

I used Ubuntu 12 Live CD. Performed most of the steps by using "sudo".
In your manual leave out "step (g) deleting partitions" and do that in GPartEd. Delete all partitions there and recreate them.
As the disk is already GPT, all of the partitions have to be built as "primary partitions"
For each of the partitions I used "Align to cylinder" - don't know if that's needed. fvdw: yes that is needed an very important, if you don't do thsi the performance of the NAS will be seriously affected in file writing and reading (it has to do with advanced format disk having 4096 physical sector size and emulating 512 sector size, see internet for more information)
I used the following sizes:

sda1 - 512MB -> ext3
sda2 - 512MB -> ext3
sda3 - 512MB -> swap-linux
sda4 - 1MB - placeholder only, ext3
sda5 - 785MB -> ext3
sda6 - 7MB -> unformated >> (here write UIMAGE-26xyz-NWSP2CL-n - compressed linux kernel image)
sda7 - 512MB ->ext3
sda8 - rest of hdd -> ext3

I had to perform the steps like follows:
- Delete all partitions
- Then actively commit in GPartEd
- Then one by one create a partition as described above and commit it - I had always "kernel cannot be informed" warnings which did not allow me to create all partitions in one go.

Having done this, actively format sda3 to linux-swap.
Then exit GPartEd. Expecially DO NOT format the other partitions here, but follow your description (see below).

Leave out "step (i) create the new partition table..." from your description as we already did it.

Perform the steps "(i)" ...end of your description.
Hint: In "step (k) Write UIMAGE..." of course you need to use the GPT-enabled kernel.

Now I have the firmware up and running!!! Thanks so much.

But: I have immediately two problems to be report - where shall we track them? :please
1) Cannot create users with password containing special characters like "$" or "#" - but this is urgently needed in my environment as I need to share passwords setup in different systems to enable a "transparent login" with windows users.
2) I cannot add a share. Wheneever I click on "Accept" after having set a new share like "photos" just nothing happens. The NAS does not create it.
Both of the problems where things that I expected to work and bring benefit over the LaCie standard web gui.
Hopefully this can be fixed somehow? Even if I would have to "patch" something in the configurations files by removing the disk again and attach it to the Ubuntu Linux?

Apart from that: really great work. Blazing fast Web-GUI over the sticky LaCie GUI. :thumbup

Any help for my 2 probs highly appreciated!

Kind regards,
Mamboman
mamboman
 
Posts: 13
Joined: Thu Jul 05, 2012 2:51 pm

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby fvdw » Sun Jul 08, 2012 9:57 am

glad to hear you got it working ;)

about the problems you mention.

ad 1. Indeed for passwords only letters and number can be used. For sure this can be changed but we need to look if it can be done easily without creating other problems. This is specilaity of Jocko but I think he is not around this weekend so you need to wait a little for this one

ad 2. This problem is strange, :scratch as it is one of the basic features of the firmware. Its should work Didn't you get any error message ? Is the new share also not visible in the web interface ? Which shares do you see when accessing the nas with windows explorer ?
ps did you set the permissions properly of the nas database when installing it on sda5 ?

Now that the firmware is up and running you can also connect to it via the ssh server with a program like Putty (terminal) or Winscp. That makes it easier to solve problems. And yes the firmware web interface has also a menu where we can upload patches.

To connect with via ssh you need to use username: root and password: giveit2me

When you have connected with ssh have a look in the folder /share/1000 in the root file system, that is the mountpoint of sda8, the big partition containing all the shares. What does it contain ? and what er the permission of this folder (should be 777)
The nas database is in the folder /rw_fs/etc (/rw_fs is the mountpoint of sda5). You can also check if the permission are set properly

When you have connected via putty you could also give a command like "mount" (withouth the quotes) and see if sda8 is mounted or not.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby mamboman » Sun Jul 08, 2012 5:52 pm

Hi,

well, thanks to this great firmware, by logging in via putty everything can be diagnosed perfectly so far.

The problem of adding shares via GUI still exists and I really have no clue why. Anything that I can check for?

fvdw: there is a file in the folder /etc/inc with name globals.inc in that file there is a line
"debug" => false
change false in true and reboot
now syslog is activated and you can find it in /var/log/messages
It should mentions when it fails to create a share


I did not get any error message. I am using IE9 with Win 7 Enterprise (EN), 64 Bit.
I also use win7 (ultimate) 64 bits and IE9, but have no problems :scratch

Clicking on "Create" just seems to do nothing at all. Can I look into any log file to see whether something happens at all?
fvdw: I assume you mean create new folder button, that should open a new windwo where you can enter sharenamame and grant access per use. After clicking accept the share should be created.
see above for remark how to activate syslog and after trying to create a share look in syslog what happened (if you use winscp don't forget to clear caches as otherwise it will opne the the file it has in cache)

this what I see in syslog when creating a share with name test-fw
Code: Select all
Jul  8 21:13:34 (none) local0.warn API[2012/07/08 22:13:34] nasapi.inc(27)[4817]: calling mrvlAddShare test-fw hallo private 1000 0 0 0 0
Jul  8 21:13:35 (none) local2.notice sudo:   nobody : TTY=unknown ; PWD=/usr/htdocs/global ; USER=root ; COMMAND=/bin/mkdir -p /share/1000/test-fw
Jul  8 21:13:35 (none) local2.notice sudo:   nobody : TTY=unknown ; PWD=/usr/htdocs/global ; USER=root ; COMMAND=/bin/chmod 0777 /share/1000/test-fw
Jul  8 21:13:36 (none) local2.notice sudo:   nobody : TTY=unknown ; PWD=/usr/htdocs/global ; USER=root ; COMMAND=/usr/bin/smbcontrol nmbd reload-config
Jul  8 21:13:39 (none) local2.notice sudo:   nobody : TTY=unknown ; PWD=/usr/htdocs/global ; USER=root ; COMMAND=/usr/bin/smbcontrol smbd reload-config
Jul  8 21:13:43 (none) local0.warn API[2012/07/08 22:13:43] nasapi.inc(541)[4817]: mrvlAddShare test-fw Return Code: 0
Jul  8 21:13:44 (none) local0.warn API[2012/07/08 22:13:44] nasapi.inc(27)[4817]: calling mrvlSetShareUsersPrivileges test-fw fvdw,full
Jul  8 21:13:45 (none) local2.notice sudo:   nobody : TTY=unknown ; PWD=/usr/htdocs/global ; USER=root ; COMMAND=/usr/bin/smbcontrol nmbd reload-config
Jul  8 21:13:50 (none) local2.notice sudo:   nobody : TTY=unknown ; PWD=/usr/htdocs/global ; USER=root ; COMMAND=/usr/bin/smbcontrol smbd reload-config




Share "public" is there with 0777 mask in "/share/1000" which are themselves with mask 0777. As root I could now manually add my shares the way I like it, no problem. "mount" lists (among others):
/dev/sda8 on /share/1000 type ext3 (rw,relatime,errors=continue,barrier=0,data=ordered)
fvdw: ok so it seems to bemounted properly (rw) and with permissions 777 the firmware user (nobody) should be capabable to create a folder

By manually fine tuning some things I can now operate my new NAS "so là là" which is still much mich more than with the original firmware.
fvdw: indeed but all this should be possible by using the web interface


What I did so far / did have to do via SSH as I could not via GUI:
* Added users into "/etc/passwd" with passwords containing special characters like "$", "#"
fvdw: after rebooting the /etc/passwd file will be recreated and using password as stored in the nas data base file, so the changes you made are overwritten

* Manually adding them via "smbpasswd [user]" and setting the same password
fvdw: same as for passwd. It will be rewritten during reboot, you need to edit the nas database file to keep the passwords

-> Hint: that perfectly works - so I see no need why this is limited on the GUI of the NAS???
fvdw: in the past we didn't have utf8 support, this was as it was implemented in the base firmware were we started from. But we will adapt it

-> Hint: even comments on shares work with blanks in it - Samba allows this!
-> Question: does your PHP Code add the users and passwords at both locations (etc/passwd AND smbpasswd)? I am wondering as I initially could not connect with any of the new users to restricted shares under Win7.
fvdw: yes it does, dependent on the right you gran per user r/w, ro or no access

-> Question: With German Umlauts the version of Samba which is installed seems to have problems. It looks like it cannot decode the password correctly (something like "MD4 decode problem" in the log file log.smbd).
Do you plan to integrate a much newer version of Samba (3.0.24 seems quite outdated). Especially due to Windows 7 support and maybe more bug fixes I would recommend to use a newer version anyway.
fvdw: plan yes, whether we will have sufficient time is something different

* Manually adding the shares I want into "/usr/lib/smb.conf"
* Changing "/rw_fs/etc/nas_conf_db.xml" to UTF-8 encoding and then adding the passwords with special characters (i.e. in Notepad++ on Windows). Also adding the user rights and share names there to keep everything in sync for the case that once the GUI will accept it correctly.
-> Question: why is the password for the users stored there again? Is this needed to push them from here into "/etc/passwd" and via "smbpasswd"?
fvdw: at boot the the startup script reads the passwords form the database and creates passwd file and smbpassword file. This is done to be able to keep settings after firmware upgrade
* Restarting the smbd to see whether everything is fine. Ok.
* After ensuring that restarting the NAS to see if it is still fine. Ok.
fvdw: this is strange passwd file should be recreated, it could work ok if you have edited the passwords as well in the nas database file

So as conclusion: great stuff, great work - and great support here! High flexibility. If all of the above could be achieved via GUI I would really be happy!
But it's okay for me right now to login via SSH and do it manually.
fvdw: this should not be necessary the webgui should be capabable to to this

fvdw: so you can create users using the web interface , correct ? if so it means that the nas database file is writable for the webgui. Why it can not create shares is very odd, hopefully the syslog message gives some information
mamboman
 
Posts: 13
Joined: Thu Jul 05, 2012 2:51 pm

Re: New Lacie Networkspace 2TB with GPT enabled?

Postby fvdw » Sun Jul 08, 2012 6:32 pm

I put my answers in your post


ps what happens if you install Torrent client transmission ? This installation process should create some shares, if that also fails then there must be a permission issue
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 2 guests