nwsp2 classic gpt support

Re: nwsp2 classic gpt support

Postby Mijzelf » Mon Dec 24, 2012 10:40 am

I think for the tests you could better stick with /tmp/mountpoint, as /share/1000 already exists and is in use (by /dev/sda8) which can have unpredictable consequences. Fvdw says /dev/loop0 is already in use, so use /dev/loop1 instead. The actual mountpoint is for the initial tests not really important. But if the bootscript is going to be adapted the loopdevice has to be mounted on /share/1000 instead of /dev/sda8.
Do i have to resetup losetup when the box reboots, or shuts down due to powerloss?
Yes, but that is supposed to be handled by a bootscript. *Somewhere* in a script is the line
Code: Select all
mount /dev/sda8 /share/1000
which has to be replaced with
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda
mount /dev/loop1 /share/1000
But that has to be done later. First test if the technique works.
And there is no chance of major dataloss in case of an powerloss?
Not more then by use of a regular partition. A regular partition is just a block of sectors containing a filesystem. (Actually the filesystem is optional, it's just a block of sectors). The loopdevice is the same.
Yet it's a good idea to writedown the offset somewhere, as it might be needed if you ever need to read the disk on a different platform. A partition table is just a way to write on disk where the partitions start and end, but this loopdevice partition doesn't have such a nice administration.
Maybe Mijzelf, knows a bit more about this.
No sorry. I vaguely remember to have read something about jtag on the Lacie Edmini, which pinning might or might not be equal to those of the ns2.
BTW, you are talking about buying a new ns2. I *think* it will be hard to find a new classic. I suppose Lacie only builds lites, these days.

/Edit: (unconfirmed) Information about the EdminiV2 jtag pinning: http://forum.nas-central.org/viewtopic.php?f=146&t=71
The serial port of the ns2 at least matches these pinning.
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 10:57 am

There is a php script taking care of mounting the data partition. This reads data from the NAS database as it is different for spd8020 (sda6) and Lacie devices (sda8).
It can be modified for this special case. No problem

PS . You mentioned you have an advanced format disk. To let it work it must have a logical sector size of 512 Bytes (physical 4096). We have some post on the forum of person trying to use a disk with logical and physical sector size of 4096 Bytes. Those could not be identified by the bootloader.
However the advanced format disks I know all have 512 Bytes logical sector size.
Your partition table and offset should also be based on sector size of 512 bytes
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 11:14 am

As far as i could trace the J2 connector on the board is the one to be used for serial and JTAG
the pinout is (relying on internet sources)
The J2 pinout is:
1 VCC (+3,3V)
2 GND
3 JTAG TMS : input to board
4 JTAG TCK : input to board
5 JTAG TDO : output from board
6 JTAG TDI : input to board
7 Serial RxD : input to board
8 Serial TxD : output from board

a picture of the connector see here http://lacie.nas-central.org/wiki/Seria ... space_2%29
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Mon Dec 24, 2012 11:40 am

Thanks for the JTAG info.
I will look into this.

I have a advanced disk format indeed.
How can i force 512bytes use?
The times i've used fdisk, it said that is was 4096, and it was using 4096 too.
So my partition tables were based on 4096 byte sectors.
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 11:49 am

think yopu can not force it

this is for instance the info from my seagate disk, it is an advanced format as well but has logial size of 512 Bytes

Code: Select all
smartctl 6.0 2012-10-10 r3643 [armv5tel-linux-2.6.39.4] (local build)
Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda Green (AF)
Device Model:     ST2000DL001-9VT156
Serial Number:   
LU WWN Device Id:
Firmware Version: CC41
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5900 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)


ps the partition table in the howto guide is based on logical sector size of 512 bytes
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 11:54 am

if fdisk shows something like this then it uses 512 Bytes logical sector size

Code: Select all
Command (m for help): p

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Mon Dec 24, 2012 11:55 am

When i use fdisk, and recreate sda6 on cylinder 33 from this example.
I get an block size of ~64000 instead of ~8000.
Seems logical because 4096/512=8
8*8000=64000.
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 12:04 pm

can you post the output of "p" command of fdisk here ?
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Mon Dec 24, 2012 12:39 pm

screenshot did not work, so i copy pasted it from terminal.
I didn't have the partition table anymore, so i quickly recreated it using this table for this example Click



Code: Select all
Command (m for help): p

Disk /dev/sdd: 3000.6 GB, 3000558944256 bytes
255 heads, 63 sectors/track, 45599 cylinders
Units = cylinders of 16065 * 4096 = 65802240 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x388032dc

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         250    16063976    5  Extended
/dev/sdd5               1          32     2054272   83  Linux
/dev/sdd6              33          33       63236   83  Linux
/dev/sdd7              34          34       63236   83  Linux
/dev/sdd8              35         140     6810536   83  Linux
/dev/sdd9             141         249     7003316   83  Linux
/dev/sdd10            250         250       63236   83  Linux
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 1:19 pm

then I am afraid we have a problem. Others that had a disk with logical/physical sector size of both 4096 bytes and could not get it recognized by the bootloader

At least you should make a partition table based on this bigger sector size, that means basically divide all cylinders number by 8. For those smaller then 8 you need to use 1

Thinking it over, 512 bytes logical sector size makes no sense because the number of sectors is then exceeding the max it can address.

Anyhow in this post a user on with a nwsp2 lite managed to get a 2.5 TB disk operational using the kernel with GPT support
viewtopic.php?f=4&t=581
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 7 guests