Jump to content

using sd card space for server?


dclay
 Share

Recommended Posts

ran out of space on my internal storage and have alot of space on my sd card and i still have more files to add to my server to make it functional....... is there a workaround for this problem?? like setting up a server within the sdcard? or anything else........im flexible.

Edited by dclay
Link to comment
Share on other sites

My Mk5 ran out of internal space too, with nothing installed. I ended up performing a factory reset (from the Configuration infusion) to get back some space. I think my file system layout is wacked, but it's always been that way:

root@Pineapple:~# ls -l /
drwxrwxr-x    2 root     root           731 Jan 12 22:39 bin
drwxr-xr-x    7 root     root           900 Jan  1  1970 dev
drwxr-xr-x    1 root     root             0 Jan 30 14:53 etc
drwxrwxr-x   13 root     root           740 Jan 12 22:39 lib
drwxr-xr-x    2 root     root             3 Oct  9 23:02 mnt
drwxr-xr-x    9 root     root             0 Jan  1  1970 overlay
drwxrwxr-x    1 root     root             0 Jan  9 15:32 pineapple
dr-xr-xr-x   69 root     root             0 Jan  1  1970 proc
drwxrwxr-x   17 root     root           252 Jan 12 22:39 rom
drwxr-xr-x    1 root     root             0 Mar 15 13:31 root
drwxrwxr-x    2 root     root           744 Jan 12 22:39 sbin
drwxr-xr-x   10 root     root          4096 Jan  1  2014 sd
drwxr-xr-x   11 root     root             0 Jan  1  1970 sys
drwxrwxrwt   14 root     root           420 Jan  1  2014 tmp
drwxr-xr-x    1 root     root             0 Mar 23  2013 usr
lrwxrwxrwx    1 root     root             4 Jan 12 22:39 var -> /tmp
drwxrwxr-x    1 root     root             0 Mar  8 18:32 www
root@Pineapple:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    3.2M      1.3M      1.9M  40% /
/dev/root                11.8M     11.8M         0 100% /rom
tmpfs                    30.2M    120.0K     30.1M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock3            3.2M      1.3M      1.9M  40% /overlay
overlayfs:/overlay        3.2M      1.3M      1.9M  40% /
/dev/sdcard/sd1          28.7G    566.6M     26.7G   2% /sd

Note that my /var is sybolically linked to /tmp. How does that happen?

Edited by fringes
Link to comment
Share on other sites

You can symlink all sorts of goodness for space saving :-)

When installing packages, you can use:

opkg update && opkg -d sd insatll the-package-you-wish

And it will install it to the /sd partition. I would then check the packages .opkg install log and see if it installed it all correctly, if not, symlink em to where they need to go.

The www folder and contents can also be symlinked like you want.

Create the stuff you want on the sd, and symlink them to www

Link to comment
Share on other sites

thanks for your help fringes and datahead.........now at the risk of sounding like a noob can you explain how i could create a symbolic link connecting /www/ to /sd??

also what do you mean rolls over, fringes??

Edited by dclay
Link to comment
Share on other sites

I've had two micro-SD cards roll over and die (stop working).

If you are not already comfortable making symbolic links, I would spend some time getting to know Linux (or other *nix) before you start reorganizing your file systems.

Link to comment
Share on other sites

Well simlinking is such

ln -s /what/needs/stay/in/place /where/it/should/symlink

So example

say I have a directory full of music on my sd card called /Killertoonz, but I want it available in the root /www directory

I would put

ln -s /sd/killertoonz /www

Which would make a symlink structure of/www/killertoonz

Or if I had a specific file omgthebestkillertoon.mp3

ln -s /sd/killertoonz/omgthebestkillertoon.mp3 /www

Would make a symlinked structure as

/www/omgthebestkillertoon.mp3

but the files & /directories stay in place on the /sd

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...