Maximum HDD Size / Partition Size

Maximum HDD Size / Partition Size

Postby sepher » Sun Mar 21, 2021 4:25 am

Hi,

As far as I got from the topics I read, I see that the bootloader of 8020 does not support GPT ( and it seems to be taking a big risk to play with it to bring support for GPT ).
So many users limit their HDD capacity at most 2 TB. I do not know if I missed something and if the latest versions of the custom firmware brings GPT support or not.

Assuming GPT is still not supported, may we still use disks greater than 2 TB, but with partitions < 2 TB ( actually 2.2 I think ). Normally MBR may access a 4 TB disk
( assuming 512 block size ) when the partitions are <= 2 TB (I know it is a bit risky, and a poor coded disk tool may corrupt it). So, if my understanding of the filesystem
of 8020 is correct. Disk is partitioned to 5 partitions (2 primary, 1 swap and 2 more on extended ). The first 2 contain the firmware of the device I think, as it is
linux the swap is just right there and 2 more on extended ( one for OS configuration, scripts etc, and the other for the generic media storage I believe ).

So, is it possible to create another partition of ~2 TB of (assuming the first 2 TB contains the regular partitions sdb1 to stb6 ) like
/dev/sdb1/ Primary Linux (e.g. 150 MB)
/dev/sdb2/ Primary Linux (e.g. 150 MB)
/dev/sdb6/ Primary Linux (e.g. ~ 1.7 TB )
/dev/sdb4/ Extended ( ~2 TB )
/dev/sdb3/ Linux SWAP (e.g. 200 MB)
/dev/sdb5/ Linux (e.g. 300 MB )
/dev/sdb7/ Linux (e.g. ~1.5 TB )

It is quite possible that the sdb1 must be at the start by the means of bootloader accessing it (I do not know how it accesses it actually), but if sdb2 ( which is the copy of sdb1 I think )
is not needed at boot time it may be transferred to extended partition ( on this case swap partition may be allocated as primary if needed ). So, can we use the whole capacity like this?
If theoretically correct, normally the sdb7 will not be used by any applications by default. But, can we modify some applications' configs to use this partition ( e.g. alter the path of the
torrent client to use only this partition ), or much more simply we may create shortcuts/links on actual sdb6 referencing to sdb7 (e.g. the application_1 uses /MEDIA/app_1/ folder - assuming
sbd4 is mounted as /MEDIA (or /MEDIA is mounted on /dev/sdb4 truly) , we may change the app_1 folder to a link referring to /MEDIA2/app_1 folder of course assuming /MEDIA2 is mounted as sdb7.
If that is OK, we may need some modifications on the scripts, but if you want a few applications to get benefit of the new space, I believe it'll be worth it.

By the way, the forum achieved a long way from the last time I checked it. I see some extensions are open to donators for now, which I find quite fair. However, as far as I see PayPal is the only way for
the donations. For the countries like one I am living in, it is impossible to donate since we banned PayPal :) because of the taxing issues ( it was announced by PayPal they will be back locally shortly before
several years ago but still nothing heard). So, if there is an alternative I'd be glad to hear it. And finally, I recommend a final donation type if you find plausible: Workforce of any kind; it may be a computer
part that you are in need of as well as a coding job. You may give the forum users tasks (simple or more challenging based on the background and/or previous work ) to complete some portions of the code
to be cleaned from bugs or extra functionalities to be added, or some designer for the fascinating UI, anything you need to outsource. You may build the roots of a company, who knows.
sepher
 
Posts: 3
Joined: Wed Jan 01, 2014 10:42 pm

Re: Maximum HDD Size / Partition Size

Postby Mijzelf » Sun Mar 21, 2021 8:44 am

If the Philips NAS is like the Lacie (u-boot in rom, kernel+rootfs on disk) then the only problem is to get u-boot loading the kernel. Then the kernel is executed, which reads the partition table once again. The kernel supports GPT, so from the moment the execution is handled from u-boot to the kernel, GPT is no longer a problem.
Seeing your partitioning suggestion there doesn't seem to be a dedicated kernel partition. So I guess the kernel is on sda1 or -2, as a 'normal' file. So u-boot must be able to find these partitions.

There are several ways to get a bigger disk working. The most straightforward, but also most complicated, is the use of a hybrid partition table, as I wrote here. I also have been experimenting with the use of a loop device, mapped on the raw disk space at >2TB, but it performed badly. Maybe that is better now, there have been some big improvements in the loop device kernel implementation lately.
Meanwhile I found a better way, the use of addpart. Just partition your disk using MBR, adding the 'normal' partitions, and add some script in the boot sequence which executes
Code: Select all
addpart sda 7 4294967296 2147483648
mount /dev/sda7 /mnt/sda7

It should do the job. (Not tested).

On the other hand, I don't know if it's a good idea to put big filesystems on a old box like that. It needs an amount of memory for each mounted filesystem, and I think it needs more when the filesystem is bigger. And how much does that Philips have? 16MiB? Somewhere 16MiB is just not enough.
OpenWrt has dropped all support for routers having less than 32MiB, and strongly discourage to buy a router with 'only' 32MiB. 16MiB is not enough to run a modern Linux kernel, and do some basic routing. 32MiB might not be enough to be able to upgrade the firmware. (Mind you, a router usually has no swap, or any significant storage space, so upgrading means you have to load the whole upgrade blob (4-8MiB) in ram, next to the running kernel, to be able to flash it.
These problems are a bit concealed on a NAS, as swapspace is generally not a problem, but of course mechanical harddisks are slow, and so if swapping is needed for normal operation, the box will be unacceptable slow.
Mijzelf
 
Posts: 254
Joined: Wed Nov 21, 2012 9:12 am

Re: Maximum HDD Size / Partition Size

Postby fvdw » Sun Mar 21, 2021 9:01 am

Hi, thank you for your comments, much appreciated.

About paypal in which country do you life if I may ask?

About spd 8020.
Actually we have uboot version for it that support gpt. But it requires another partition setup and as such user should besides flashing uboot to flash memory also prepare a new disk. Because spd8020 is not used a lot anymore and has very limited ram size (16 MB) and slow cpu it can run larger application with acceptable performance we decided to not release that uboot version. Ps if flashing goes wrong then the device becomes a brick and need special tools and software to bring it back to live.

About partition structure.
Partition 1 and 2 contains the firmware. One is active and used for booting. The other one is used to write a new version of firmware after which active boot partition is swapped so at next boot the partition with new firmware is used for boot.
Partition 7 is needed to upgrade firmware. A new version is uploaded to that partition and then written to partition 1 or 2. See above.

And if you use a 2TB disk free space for data partition will be about 1.9TB (not 1.5TB, you made wrong calculation 1TB = 1024 GB, 1 GB = 1024 MB ;) )

Ps. The kernel is in partition 6 on spd8020.
Main issue is that uboot on the spd8020 does not support gpt so it cannot access a disk with gpt partition table to load the kernel
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Maximum HDD Size / Partition Size

Postby sepher » Wed Mar 24, 2021 5:51 am

Hello,

@Mijzelf, of course it is obvious that the SPD8020 is obsolete today. However, there is nothing wrong to try to squeeze it to the last drop available :) That is what we are, what these forums for, right? I know at some point the device will be worthless to keep on the development rack, I do not that point is already history or not (but, as still supported by the latest firmware it seems it is not ). Routers, especially enterprise and some pro home-office ones, are quite a different world. They are quite memory hungry because of the work they do (translation tables, transmission buffers etc. ). And of course, hardware becoming cheaper and cheaper force us the easy way, get a new one!

@fvdw, yes you are right. We are so get used to use GB on disk partitions, so I miscalculated what I gave in MB as GB, nevertheless I believe you got my point on the FS. By the way, I am living in Turkey. Some years ago, PayPal was banned because of tax and security ( Turkish government demanded local user/transaction data to be stored in local servers ) reasons. It was the end of e-bay and
welcome of Aliexpress for us :)

The main reasons I still use this device is, there are not much, lets say, "home class NAS" devices here in Turkey. SPD8020 was a bargain when it appeared on the market and had no rivals (still there is no equivalent device on the Turkish market ). I've built several home made NAS devices using low power ITX boards, however finding a suitable case is almost impossible. Of course, much more processing power and memory is needed for extensive tasks. But, if your going to use it for simple tasks ( your ftp & media server ), and there are a few users ( or one only ), I believe it still has the power in it to do those jobs.

So, finally what I say is, yes the market and the computer world forces us to buy a new cpu, graphic card ( if you can find one nowadays :) ) etc. at least yearly. It is impossible ,and in fact unnecessary , to keep it up. I believe if something meets your needs, then there is no need to switch for a new one. Every year we pay more money than you could imagine to the products offering technologies or functions that we will never use ( or let say use once because you wonder what the heck was it ). SPD8020 works fine for me right now, if I can run it with more capacity, it will mean less maintenance for me, that's why I am seeking for a possibility.

My best regards to all.
sepher
 
Posts: 3
Joined: Wed Jan 01, 2014 10:42 pm

Re: Maximum HDD Size / Partition Size

Postby sepher » Wed Mar 24, 2021 5:52 am

Sorry, for the double post.
sepher
 
Posts: 3
Joined: Wed Jan 01, 2014 10:42 pm

Re: Maximum HDD Size / Partition Size

Postby fvdw » Wed Mar 24, 2021 9:32 am

Thanks for your feedback, nice to hear that there are still happy spd8020 users. For thwe moment it is still included in firmware support although some applications will not be available like for instance samba 4 as they need more cpu power and memory capacity then spd8020 has (same for lacie nwsp1).

Anyhow one tip, if you want more storage capacity you could connect an sata diks via usb using a usb-sata interface
fvdw
Site Admin - expert
 
Posts: 13239
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands


Return to Philips SPD8020

Who is online

Users browsing this forum: No registered users and 1 guest

cron