Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tips for prolonging solid state drives?

16 views
Skip to first unread message

chrisw...@chriswareham.demon.co.uk

unread,
Dec 17, 2007, 9:18:37 AM12/17/07
to
I now have an Asus Eee PC running NetBSD 4.0 (a releng netbsd-4 snapshot dated
the 15th December). Someone suggested off list that I should try dd'ing boot
floppies to a memory stick to kick start an installation, and that worked
perfectly after I'd failed to get a bootable memory stick going. XFree86 works,
but neither the wired or wireless ethernet appear to, so I'll be reinstalling
with -current shortly in the hope that Quentin Garnier has been able to commit
some appropriate changes.

I tried to find a guide with tips for running NetBSD on hardware that includes
a solid state drive, but didn't come across anything useful. I think the drive
included in the Eee has built in wear leveling, but would like to be sure that
I've done everything else I can to extend the life of the drive. I have added
the "noatime" option to my /etc/fstab entry for /, as well as adding tmpfs
entries for /tmp and /var/run. I have set a maximum size for tmp to 128M, and
will monitor usage to see if it needs to be raised.

I'm now wondering whether there are any other tweaks I should make to prolong
the SSD life. I'm thinking of adding a third tmpfs entry for /var/log, but I'm
worried I'll run out of memory pretty quickly with X and a few apps such as
Firefox running. SO, I'm wondering if anyone has got any tips and tricks for
these neat little machines!

Regards,

Chris

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

matthew sporleder

unread,
Dec 17, 2007, 10:32:07 AM12/17/07
to
On 12/17/07, chrisw...@chriswareham.demon.co.uk


I'm using mfs for /var/log and don't have too many problems with it.
I had to trick some stuff into touching files before apps would work,
but it wasn't that bad.

http://www.mspo.com/netbsdreadmostly.html

Also follow the notes I make in there about:
http://mail-index.netbsd.org/tech-embed/2007/06/12/0000.html <--
read-only stuff.

Right now I'm working on cleaning up /var/spool and will update my
article when I do.

Chris Wareham

unread,
Dec 17, 2007, 4:47:38 PM12/17/07
to
matthew sporleder said on 17/12/07 15:32:

>
> I'm using mfs for /var/log and don't have too many problems with it.
> I had to trick some stuff into touching files before apps would work,
> but it wasn't that bad.
>
> http://www.mspo.com/netbsdreadmostly.html
>
> Also follow the notes I make in there about:
> http://mail-index.netbsd.org/tech-embed/2007/06/12/0000.html <--
> read-only stuff.
>
> Right now I'm working on cleaning up /var/spool and will update my
> article when I do.
>

Hi Matthew,

Thanks for the links. I now have /tmp, /var/run and /var/log mounted as
mfs filesystems as per your notes. At boot up, syslogd complains about
not being able to write to /var/log despite a critical_filesystems_local
entry in /etc/rc.conf, but everything seems OK. I plan on digging
through /etc/defaults to see if syslogd starting up can be delayed until
all filesystems have been mounted.

With /home mounted on an SD card in the external slot, the internal
drive in the Eee should be pretty much untouched during normal
operation, so it's time to install a few packages!

Geert Hendrickx

unread,
Dec 17, 2007, 4:51:11 PM12/17/07
to
On Mon, Dec 17, 2007 at 09:47:38PM +0000, Chris Wareham wrote:
> matthew sporleder said on 17/12/07 15:32:
> >
> >I'm using mfs for /var/log and don't have too many problems with it.
> >I had to trick some stuff into touching files before apps would work,
> >but it wasn't that bad.
> >
> >http://www.mspo.com/netbsdreadmostly.html
> >
> >Also follow the notes I make in there about:
> >http://mail-index.netbsd.org/tech-embed/2007/06/12/0000.html <--
> >read-only stuff.
> >
> >Right now I'm working on cleaning up /var/spool and will update my
> >article when I do.
> >
>
> Hi Matthew,
>
> Thanks for the links. I now have /tmp, /var/run and /var/log mounted as
> mfs filesystems as per your notes. At boot up, syslogd complains about
> not being able to write to /var/log despite a critical_filesystems_local
> entry in /etc/rc.conf, but everything seems OK. I plan on digging
> through /etc/defaults to see if syslogd starting up can be delayed until
> all filesystems have been mounted.


Putting this in /etc/rc.conf.d/dhcpd is a cleaner solution:

lease_db=/var/run/${name}.leases
required_files="/etc/${name}.conf"
start_precmd="dhcpd_precmd"

dhcpd_precmd()
{
if [ ! -f ${lease_db} ]; then
touch ${lease_db}
fi
}


I use this on my Soekris NET4501 router together with some of the other
suggestions (/tmp and /var/run on tmpfs, /var rw and / ro), but I send
syslog messages to a remote host.

Geert

matthew sporleder

unread,
Dec 17, 2007, 6:30:30 PM12/17/07
to
On 12/17/07, Chris Wareham <chrisw...@chriswareham.demon.co.uk> wrote:
> matthew sporleder said on 17/12/07 15:32:
> >
> > I'm using mfs for /var/log and don't have too many problems with it.
> > I had to trick some stuff into touching files before apps would work,
> > but it wasn't that bad.
> >
> > http://www.mspo.com/netbsdreadmostly.html
> >
> > Also follow the notes I make in there about:
> > http://mail-index.netbsd.org/tech-embed/2007/06/12/0000.html <--
> > read-only stuff.
> >
> > Right now I'm working on cleaning up /var/spool and will update my
> > article when I do.
> >
>
> Hi Matthew,
>
> Thanks for the links. I now have /tmp, /var/run and /var/log mounted as
> mfs filesystems as per your notes. At boot up, syslogd complains about
> not being able to write to /var/log despite a critical_filesystems_local
> entry in /etc/rc.conf, but everything seems OK. I plan on digging
> through /etc/defaults to see if syslogd starting up can be delayed until
> all filesystems have been mounted.
>
> With /home mounted on an SD card in the external slot, the internal
> drive in the Eee should be pretty much untouched during normal
> operation, so it's time to install a few packages!
>

I have critical_filesystems_local="/var/run /var/log" as the first
thing in my rc.conf after rc_configured=YES, so I wonder if that's the
cause.

0 new messages