more filesystem space via USB or NFS?

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

more filesystem space via USB or NFS?

Postby zachofalltrades » Mon Oct 03, 2011 6:50 pm

I have ALARM flashed to the NAND of my TonidoPlug, but I can't add too much to the system without moving some parts of the system to external filesystems. I thought I'd use a couple of external drives and mount them to the larger parts of the system after mirroring the current content. The top level paths to be moved would be:
/bin
/lib
/var
/usr
/sbin

I'm not sure whether to use a couple of flash drives, hard disks, or a combination. I'd probably want /var on a harddisk (along with a swap partition), but the others might be just fine on a flash drive.

I'm also contemplating using NFS and mounting them from another host (I can share filesystems via NFS from my router). With GB ethernet straight to the sharing host, would the performance be significantly worse than filesystems connected via USB?

Any recommendations?
----------
ALARM on TonidoPlug : Nginx, NFS, owncloud
ALARM on RaspberryPi : PocketMine-MP
zachofalltrades
 
Posts: 14
Joined: Thu Jul 22, 2010 5:43 am
Location: Wisconsin, USA

Re: more filesystem space via USB or NFS?

Postby zachofalltrades » Thu Oct 06, 2011 10:31 pm

thanks for the tips

The biggest directory tree by far is /usr, and if it is safe to move that will give the most benefit.

I like the idea of moving /var because it contains so many files that are continuously or routinely updated, I think the internal NAND will have better longevity by getting that whole tree off to another filesystem.

I've always put new user directories on other filesystems by just putting a link to the alternate location. With a limited number of users, that is not to hard to do.

I'll update later with my success or failure...
----------
ALARM on TonidoPlug : Nginx, NFS, owncloud
ALARM on RaspberryPi : PocketMine-MP
zachofalltrades
 
Posts: 14
Joined: Thu Jul 22, 2010 5:43 am
Location: Wisconsin, USA

Re: more filesystem space via USB or NFS?

Postby zachofalltrades » Fri Oct 07, 2011 10:17 pm

I can't seem to get this to work.

1. I flashed a new rootfs to the NAND of the plug.
2. I rebooted with the flashing drive removed
3. check my mounts:
[root@alarm usr]# df -h
Filesystem Size Used Avail Use% Mounted on
ubi0:rootfs 462M 191M 267M 42% /
tmpfs 10M 148K 9.9M 2% /run
udev 10M 4.0K 10M 1% /dev
shm 251M 0 251M 0% /dev/shm
/dev/sda1 1.9G 35M 1.8G 2% /media/spare
/dev/sda2 92G 609M 87G 1% /media/three
/dev/sda3 604G 473G 132G 79% /media/fatmedia
/dev/sdb1 985M 1.3M 934M 1% /media/sysrecover
/dev/sdb2 6.5G 227M 6.0G 4% /media/sysbackup
/dev/sdc4 908G 200M 862G 1% /media/bigdata
/dev/sdc3 3.7G 397M 3.1G 12% /media/usr
/dev/sdc2 3.7G 76M 3.5G 3% /media/var

4. I installed rsync
5. sync /usr to /media/usr and /var to /media/var
rsync -vrlHpEXogtW /usr /media
rsync -vrlHpEXogtW /var /media

6. edit /etc/fstab to look like this:
[root@alarm usr]# cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
LABEL=usr /usr ext3 rw,noatime 0 0
LABEL=var /var ext3 rw,noatime 0 0

7. reboot, login, check disk usage:
[root@alarm /]# du -h -x -d 1
3.9M ./bin
0 ./dev
1.9M ./etc
20M ./lib
0 ./mnt
0 ./opt
0 ./run
0 ./srv
0 ./tmp
0 ./sys
3.6M ./var
311M ./usr
3.7M ./boot
0 ./home
0 ./proc
8.1M ./sbin
4.0K ./root
108K ./media

and mounts:
[root@alarm /]# mount
ubi0:rootfs on / type ubifs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
/dev/sda1 on /media/spare type ext3 (rw,noatime)
/dev/sda2 on /media/three type ext3 (rw,noatime)
/dev/sda3 on /media/fatmedia type vfat (rw,noatime,utf8,gid=100,umask=002)
/dev/sdb1 on /media/sysrecover type ext2 (rw,noatime)
/dev/sdb2 on /media/sysbackup type ext2 (rw,noatime)
/dev/sdc4 on /media/bigdata type ext3 (rw,noatime)
/dev/sdc3 on /media/usr type ext3 (rw,noatime)
/dev/sdc2 on /media/var type ext3 (rw,noatime)

Did I mess something up in fstab?
or is the boot process on the Tonido just not respecting it?

Any advice?
----------
ALARM on TonidoPlug : Nginx, NFS, owncloud
ALARM on RaspberryPi : PocketMine-MP
zachofalltrades
 
Posts: 14
Joined: Thu Jul 22, 2010 5:43 am
Location: Wisconsin, USA


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 9 guests