Hello
I have wl-hdd and want to move /tmp to hdd from router memory how can I do it?
The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Hello
I have wl-hdd and want to move /tmp to hdd from router memory how can I do it?
Try reading wiki first ...
http://wiki.openwrt.org/PackagesOnExternalMediaHowTo
I have my hdd mounted fine, and I have lots of packages on it but I want to have more free ram memory and 8MB is occupied by /tmp folder. My question is how to free this memory moving /tmp to hdd.
I would try :
cp -a /tmp/* /path/to/your/new/tmpdir
umount /tmp
rm /tmp
ln -s /path/to/your/new/tmpdir /tmp
I am not really sure how it will work with usb storage - I used a similar thing on my ipaq .
You can also do it with creating a new partition for tmp
After creating it , formatting and mount it somwhere ( /mnt/usb/tmp ? )
cp -a /tmp/* /mnt/usb/tmp
umount /tmp
umount /mnt/usb/tmp
mount /dev/sda/yourtmppartition /tmp -t ext2
then edit the /etc/fstab and add a new line
/dev/sda/yourtmppartition /tmp ext2 defaults 0 0
and delete the line responsible for mounting the /tmp at tmpfs
and
echo 'mount /dev/sda/yourtmppartition /tmp' > /etc/init.d/S20externalmount
chmod +x /etc/init.d/S20externalmount
That is my guess .
I think that the second version may be better because it will force the router to wait for the usbdrive till it settles down.
You can read some more on that on http://www.handhelds.org/moin/moin.cgi/ExtraMb and other wiki at www.handhelds.org
The most interesting section for You may be "Media (CF/SD etc.)" at http://www.handhelds.org/moin/moin.cgi/UserDocuments .
Of course forget about the jffs2 things...
Good luck .
(Last edited by yans on 24 Apr 2006, 18:10)
Maybe I misunderstand but I think it's not so much that he wants to move /tmp to external storage as much as he wants to free up the RAM that the /tmp ramdrive uses and give it back to the system to use as working RAM. Will these steps help with that?
knetknight yes it's exactly what i want
yans thanx for hints I'll try to umount /tmp maybe it will free some ram memory...
It should - that's why he should get rid /tmp mounted to tmpfs (ramdisk)
My guess is that
umount /tmp
should free the ram. But to have the /tmp dir it should be mounted somewhere else.
That is my guess and when it try to unmount /tmp on my router i get "umount: /tmp: Device or resource busy".
So it may be a little bit more complicated:D
it seams there is no way to umount /tmp... can anyone help?
Ok.
I found it . http://wiki.openwrt.org/UsbStorageHowto
There is a section "How do I boot from the USB device" - this way You should get rid of ramdisk.
(Last edited by yans on 28 Apr 2006, 19:55)
The discussion might have continued from here.