[server-admins] what's left on root?

Jonathan Marsden jmarsden at fastmail.fm
Fri Mar 9 17:33:21 MST 2012


On Fri, Mar 9, 2012, at 11:17 AM, DM Smith wrote:

> There may be a lot of other config stuff under /etc that should be
> preserved. Such as groups, passwords, .... Maybe /etc should be it's
> own mount point?

Not usually advisable.  Tf that additional /etc partition fails to mount
the machine won't boot, can't use networking, etc etc. So that makes any
kind of "recovery mode" single user boot impossible.

> You might consider moving /tmp to minimize writes.

If the machine has plenty of RAM you could consider making /tmp a
separate tmpfs filesystem.

Earlier, Troy wrote:

>> I like to keep the root partition free of any data that we consider
>> worthy of preserving, and now it is more important than ever, as this
>> partition is experiencing problems.

If that is the goal, then logically the server would have been
configured with separate partitions for /home, /var, /usr and /usr/local
to keep all those off the / partition, and it would use a separate swap
partition, too.  Incidentally, as far as I know /space is not part of
the Linux File Hierarchy Standard ... was there a good reason for using
that directory name?

Config files in /etc are generally going to be "worthy of preserving",
so you should back /etc up regularly to some other partition, at
minimum.  Something like:

 BACKUPDIR=/usr/local/backups
 DAYSTOKEEP=180
 mkdir -p $BACKUPDIR
 tar zcf $BACKUPDIR/$(hostname)-etc-$(date +%F).tar.gz /etc
 find $BACKUPDIR -name "$(hostname)-etc-*" -mtime +$DAYSTOKEEP -delete

in a /etc/cron.weekly/ script should work (this assumes /usr/local is a
separate partition, use /space/backups or similar if you have to).

Jonathan
-- 
  Jonathan Marsden
  jmarsden at fastmail.fm




More information about the server-admins mailing list