#6077 closed enhancement (obsolete)
Better support for persistent /var (on USB disk)
Reported by: | mike@… | Owned by: | developers |
---|---|---|---|
Priority: | normal | Milestone: | Barrier Breaker 14.07 |
Component: | packages | Version: | Trunk |
Keywords: | Cc: | mike@… |
Description
I am working with a Linksys WRT160NL and would like a persistent /var. I am using an external USB disk to implement this. I have found a few things that make this slightly difficult:
- Issue: /etc/init.d/boot creates several required directories in /var/. This script runs before the fstab script runs. As a result, the directories are not created on my persistent volume. Recommendation: move the creation of directories within var to a new script that executes after fstab but before services that require /var (or should I use mini_fo?).
- Issue: /etc/init.d/fstab runs before /etc/init.d/usb. This seems to mean that fstab's "mount -a" call will not mount USB disks because they are not yet available. Solution: run usb at priority 38 and fstab at priority 39. I also had to add a "sleep 10" to the usb script, after "/bin/mount -t usbfs none /proc/bus/usb." Bad. Mini_fo?
- Issue: the default /var symlink must be removed by hand if one wants to make /var a mount point. Recommendation: make the /var symlink configurable by OpenWRT's "make menuconfig."
- Issue: users may not want to use the default tmpfs /tmp. Recommendation: allow users to deactivate the tmpfs /tmp. Determine an init script ordering that allows /tmp to be mounted from a disk before it is required.
Attachments (0)
Change History (4)
comment:1 Changed 8 years ago by W. Michael Petullo <mike@…>
comment:2 Changed 8 years ago by W. Michael Petullo <mike@…>
I worked around issue 1 (above) by moving all my big persistent data to /mnt/sda1 and using hotplug to mount my USB device. /var now only contains little files, like OpenWRT expects. This took patching OpenLDAP and krb5. These patches have been added to OpenWRT.
OpenWRT has fixed issue 2 by adding swapon support to its hotplug scripts. I now use hotplug instead of /etc/fstab.
Issue 3 is now irrelevant (see prior 2 solutions).
Issue 4 stands, but is not an issue to me right now.
comment:3 Changed 6 years ago by nbd
- Resolution set to obsolete
- Status changed from new to closed
comment:4 Changed 4 years ago by jow
- Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07
Milestone Attitude Adjustment 12.09 deleted
See also:
https://forum.openwrt.org/viewtopic.php?id=21624
for questions regarding the timing of USB mounting within the boot sequence.