nwsp2 classic gpt support

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 1:02 pm

Don't think so. The bootloader reads the partition table, and reads the uImage from partition 6. That's all. And the start of this filesystem is semi-random. Read with any other offset it's just noise.


Could losetup/mk2efs set something that could make that when accessing the disk always the offset is used ?

In the firmware we still use busybox losetup
Code: Select all
$ losetup --help
BusyBox v1.15.3 (2010-03-25 23:49:03 CET) multi-call binary

Usage: losetup [-o OFS] LOOPDEV FILE - associate loop devices
   losetup -d LOOPDEV - disassociate
   losetup [-f] - show

Options:
   -o OFS   Start OFS bytes into FILE
   -f   Show first free loop device


But I also have a full version of it from gnu-utils

ps reading this " -o OFS Start OFS bytes into FILE"

Shouldn't then the offset not be a mutiple of 4096 + 1
Now it will start at the end byte of a physical sector. That will affect performance of these disk I read on the internet
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 1:04 pm

Mijzelf wrote:The value is >2^31 and smaller than 2^32. For a signed int this means that the value can either truncate, or swap negative. I think losetup doesn't have such bugs, as 4GiB is not extremely big, when talking about disks and files. But you'll never know. (BTW, where did you get this losetup?)

You mean the offset of 3686809600?
This is the offset you and fvdw recommended.


mke2fs -j /dev/loop1 is finished.
Code: Select all
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
182919168 inodes, 731666546 blocks
36583327 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
22329 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 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@fvdwsl-base:/ #


This is fdisk:
Code: Select all
root@fvdwsl-base:/ # fdisk /dev/sda

The number of cylinders for this disk is set to 364801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 3000.5 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               9          72      514080  83 Linux
/dev/sda2              73         136      514080  83 Linux
/dev/sda3             137         200      514080  82 Linux swap
/dev/sda4             201         400     1606500   5 Extended
/dev/sda5             209         312      835380  83 Linux
/dev/sda6             321         328       64260  83 Linux
/dev/sda7             337         400      514080  83 Linux

Command (m for help):


This is "mount"
Seems alright.
Code: Select all
root@fvdwsl-base:/ # mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,barrier=0,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
/dev/sda5 on /rw_fs type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered)
tmpfs on /rw_fs/tmp/usr/var type tmpfs (rw,relatime,size=200k)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
root@fvdwsl-base:/ #



losetup -a does not exist?
There is a -f command.
losetup -f outputs this :
Code: Select all
root@fvdwsl-base:/ # losetup -f
/dev/loop0
root@fvdwsl-base:/ #


There is no /dev/loop1 present?
Is this correct? :scratch


Hurray.
Code: Select all
mkdir /tmp/mountpoint

Is not giving a readonly error anymore.
Code: Select all
root@fvdwsl-base:/ # mkdir /tmp/mountpoint
root@fvdwsl-base:/ #
Last edited by minibike12 on Tue Dec 25, 2012 1:07 pm, edited 1 time in total.
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 1:07 pm

the -f option shows the first free loop device

The -a option won't work on this version of losetup.
Don't worry /dev/loop1 is present

Now try to mount it

and perform again a mount command to see if it is in the list
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 1:08 pm

Hurray, no more readonly error anymore.
Code: Select all
root@fvdwsl-base:/ # mkdir /tmp/mountpoint
root@fvdwsl-base:/ # mount /dev/loop1 /tmp/mountpoint
root@fvdwsl-base:/ #
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 1:12 pm

perform a "mount" command to see how it is mounted
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 1:14 pm

Ok here is "mount" command.
Seems that /dev/loop1 is mounted correctly.
Code: Select all
root@fvdwsl-base:/ # mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,barrier=0,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
/dev/sda5 on /rw_fs type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered)
tmpfs on /rw_fs/tmp/usr/var type tmpfs (rw,relatime,size=200k)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/loop1 on /rw_fs/tmp/mountpoint type ext3 (rw,relatime,errors=continue,barrier=0,data=ordered)


Here is "df" command
It shows 2.73TB free space.
Code: Select all
root@fvdwsl-base:/ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               198368    126040     62088  67% /
/dev/sda5               822216     17560    796304   2% /rw_fs
tmpfs                      200        64       136  32% /rw_fs/tmp/usr/var
/dev/loop1           2880742272    205940 2734203024   0% /rw_fs/tmp/mountpoint
root@fvdwsl-base:/ #



Continue with ?
Code: Select all
umount /tmp/mountpount
reboot
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 1:17 pm

continue with umount and use the restart button in the web interface !

Also pressing and holding for 2 sec the power button and then release it should imitate a reboot with setting the EEPROM properly
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 1:25 pm

Ok, unmounted succesfully.
And restarted using "restart server" button in web interface.

When rebooted use this again?
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda
mkdir /tmp/mountpoint
mount /dev/loop1 /tmp/mountpoint


When i've done this there should be 2.73TB available in the web interface?
And what folder or command can i use to confirm it is working?
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 1:28 pm

when it has rebooted indeed setup the loop device with the offset and mount it on the folder "/share/1000"
probably the subfolder "1000" doesn't exist yet. So create it first with
Code: Select all
mkdir /share/1000

and set permission correctly
Code: Select all
chmod 777 /share/1000
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 1:30 pm

So in this order?
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda
mkdir /share/1000
chmod 777 /share/1000
mount /share/1000
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 9 guests