nwsp2 classic gpt support

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 3:34 pm

cylinder 409 starts with byte 3355914241. So the offset of 3355914240 should do it. Or if you feel more safe with some distance use the one myself proposed. But lets first see if this disk with 7 partitions boots...
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 3:54 pm

Ok.
Will try this.
I should be able to access the nwsp2 control panel over my network when it works with the 7 partitions right? (i am not that familiar with this cf yet).
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 4:04 pm

yes if you use our firmware, you should be able to access via web interface and ssh. You will need the last option (ssh) to setup the loop device, even if there is no partition 8
A good ssh client in windows is Putty. The default user name to access fvdw-sl firmware via ssh is "root" and password "giveit2me" (without the quotes).
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 6:00 pm

Ok next problem.
Made partitions table without errors :

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               9          72      514080   83  Linux
/dev/sdd2              73         136      514080   83  Linux
/dev/sdd3             137         200      514080   82  Linux swap / Solaris
/dev/sdd4             201         400     1606500    5  Extended
/dev/sdd5             209         312      835380   83  Linux
/dev/sdd6             321         328       64260   83  Linux
/dev/sdd7             337         400      514080   83  Linux


But when i save and quit fdisk "w", and try to format sdd5 to ext3 i get this error:
Code: Select all
root@ubuntu:/home/ubuntu# mke2fs -j -m 1 /dev/sdd5
mke2fs 1.42.5 (29-Jul-2012)
Could not stat /dev/sdd5 --- No such file or directory

The device apparently does not exist; did you specify it correctly?


And this is what i get when using cat /proc/partitions
Code: Select all
root@ubuntu:/home/ubuntu# cat /proc/partitions
major minor  #blocks  name

   7        0     733284 loop0
   8        0  125034840 sda
   8        1     358400 sda1
   8        2  124674048 sda2
   8       16  488386584 sdb
   8       17  488383488 sdb1
  11        0    1048575 sr0
   8       32    1956864 sdc
   8       33    1952832 sdc1
   8       48 2930233344 sdd
   8       49    4112640 sdd1
   8       50    4112640 sdd2
   8       51    4112640 sdd3
   8       52          4 sdd4
root@ubuntu:/home/ubuntu#


sdd4 is only 4 blocks and sdd5 till sdd7 are missing...
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby Mijzelf » Mon Dec 24, 2012 6:19 pm

Hm. Something is still going wrong with the sectorsize. According to fdisk partition 1 is 514080 KiB. But according to /proc/parititons it's 4112640 KiB, which is 8 times as big. What does 'fdisk -l /dev/sdd' give now?
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: nwsp2 classic gpt support

Postby minibike12 » Mon Dec 24, 2012 6:50 pm

I've just pulled my hdd out of the usb casing and plugged it in my pc. (changed to sde instead of sdd)
This seems to be alright.
I now have 512bytes logical and 4096bytes physical instead of 4096bytes logical and physical.
Code: Select all
root@ubuntu:/home/ubuntu# fdisk -l /dev/sde

Disk /dev/sde: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x453788d7

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               9          72      514080   83  Linux
/dev/sde2              73         136      514080   83  Linux
/dev/sde3             137         200      514080   82  Linux swap / Solaris
/dev/sde4             201         400     1606500    5  Extended
/dev/sde5             209         312      835380   83  Linux
/dev/sde6             321         328       64260   83  Linux
/dev/sde7             337         400      514080   83  Linux


But now 1 small weird thing left.
When using cat /proc/partitions it shows all partitions, but partition 4 is 1 block?
Rest of sizes seem okay though...
root@ubuntu:/home/ubuntu# cat /proc/partitions
Code: Select all
major minor  #blocks  name

   7        0     676440 loop0
   8       64 2930266584 sde
   8       65     514080 sde1
   8       66     514080 sde2
   8       67     514080 sde3
   8       68          1 sde4
   8       69     835380 sde5
   8       70      64260 sde6
   8       71     514080 sde7


Added Gparted screenshot that shows it is alright?
[ img ]
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby Mijzelf » Mon Dec 24, 2012 8:02 pm

That is strange indeed. But as the logical partitions are recognized fine, both by the kernel and gparted, I wouldn't care too much. Ultimately partition 4 is only a hack to be able to create 5-7. (Only 4 primary partitions are supported in an MBR partition table)
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: nwsp2 classic gpt support

Postby minibike12 » Mon Dec 24, 2012 8:59 pm

Ok, apparantly partition 4 did not matter.
I booted the NAS perfectly.
I ssh'd in it, and completed this part :
So create the loop device:
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda


Create a filesystem
Code: Select all
mke2fs -j /dev/loop1



This just finished.
But, i am now stuck with a read only error.
I tried
Code: Select all
mkdir /tmp/mountpoint
after
Code: Select all
mke2fs -j /dev/loop1

But i am getting this error :
Code: Select all
root@fvdwsl-base:/ # mkdir /tmp/mountpoint
mkdir: cannot create directory `/tmp/mountpoint': Read-only file system


How can i change it to read and write?


This was the whole ssh process
Code: Select all
login as: root
root@192.168.1.142's password:
root@fvdwsl-base:/ # losetup -o 368609600 /dev/loop1 /dev/sda
root@fvdwsl-base:/ # mke2fs -j /dev/loop1
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
183123968 inodes, 732476653 blocks
36623832 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
22354 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@fvdwsl-base:/ # mkdir /tmp/mountpoint
mkdir: cannot create directory `/tmp/mountpoint': Read-only file system
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby Mijzelf » Mon Dec 24, 2012 9:16 pm

That sounds scary. /tmp/ is supposed to be read/write. Well, you can force it read/write:
Code: Select all
mount -t tmpfs tmpfs /tmp
Now a ramdrive is mounted on /tmp. But I certainly wonder how /tmp can be ro. Maybe some script is confused by the lack of partition 8?
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: nwsp2 classic gpt support

Postby minibike12 » Mon Dec 24, 2012 10:18 pm

Hmm, the browser interface worked normally.
0GB available, as we expected.

But more problems coming.

I tried your tip.
I was able to mount it after that with this code.
Code: Select all
mkdir /tmp/mountpoint
mount /dev/loop0 /tmp/mountpoint

df said that 2.7TB was available.

Then i used :
Code: Select all
umount /tmp/mountpount
reboot


But it didn't turn on after shutdown.
I've turned it on manually.
Light is going steady blue.
But i can't see it in my router anymore.
And i can't acces it with ssh.

Also, the switch on the back does not work anymore.
I can't turn it of or put it in standby anymore...
I have to pull the powerplug.

Something in the startup is not good anymore.

Any more options.
I am willing to redo it all.
Is there something i should change?
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 10 guests