'Root is full' problem [solved]

R Kimber richardkimber at btinternet.com
Mon Jul 6 16:11:57 UTC 2015


On Mon, 6 Jul 2015 10:42:49 -0500
W Scott Lockwood III wrote:

> On 7/6/2015 10:34 AM, R Kimber wrote:
> >> This exactly. You need to add logic to your script that checks to see
> >> if
> >> >the disk is mounted. There are a lot of things you can do here - check
> >> >to see if it's mounted, try to mount it, and bail if not successful
> >> >would be my suggestion.
> > I'm using lsyncd. I'm not sure if there's a way of getting it to check
> > that the disk is mounted before if tries to do anything.  Maybe I need
> > a different system.
> Lsyncd works great, when you know that your disks are stable and won't 
> randomly disappear.
> 
> One option is, if you do this regularly, but don't need it to be updated 
> up to the second, just write a script to rsync it via cron. You could 
> run it at whatever interval you're ok with, be that once every 5 
> minutes, or once a month or whatever. This would allow you to make sure 
> that the disk is there, because if it's not, lsyncd will happily just 
> write all the files to local disk under the mount point, just as you 
> have already seen.
> 
> Another option here is to write a cron job that runs every 15 minutes or 
> so, and looks for the mount. If it doesn't find it, you can have it 
> email you. If it does find it, you can have it just exit.
> 
> Yet another option is to setup something like Nagios and monitor the 
> disks with it.

Yes, thanks.  I think I will have to write a cron job.

One problem I have now is that the two USB disks are mounted with different
permissions.  I've abandoned mounting them with fstab, so they are now
mounted automatically in /media/<user>/  but the new disk is mounted with
root as owner and group and I can't write to it (create folders etc).  The
old disk however, is owned by me (group is users).  Why should they be
different? And how do I make it so that they are both always mounted so
that I can write to them?

- Richard.
-- 
Richard Kimber





More information about the ubuntu-users mailing list