/mnt/ filling up partition - caching?
Sorry couldn't think of a better title - I'm very tired now so I'll probably make some mistakes in the post too! :mrgreen:
Right, so I've just randomly run df -h on my server / partition only to find the partition was 99% full - it's only 4GB but it's only for the system files, no data. Anyway I checked where the space was being used and it was in /mnt/usbdrive - where I mount USB HDDs to backup the data partition. I deleted the contents of the folder and partition usage returned to a more reasonable 23%. So, what am I doing wrong? It seems like what's being backed up to the USB drive is being cached or something until it fills the drive. Am I using the wrong mount options or something? I'll double check tomorrow but I think the backups are being copied to the USB HDDs successfully. Oh and I've noticed before now that some of the folder structure remained in the /mnt/ directory after unmounting the drive - I'm not sure if I checked on partition usage then though.
Thanks
Re: /mnt/ filling up partition - caching?
Right, I've just done another backup and it seems to have backed everything up correctly and the folder is now empty (after unmounting the drive, of course). However, this time I've slightly modified my backup script to add a few seconds delay between mounting the drive and starting to move files, before it mounted then started backing up straight away - do you think this could have been the problem? I.e. if it was causing the files to be copied into the /mnt/usbdrive folder instead of the USB drive if there was a delay in mounting?
Re: /mnt/ filling up partition - caching?
Yup sounds like the files are being copied when it is not mounted, if its a custom script just put in a check to make sure its mounted correctly before continuing
Re: /mnt/ filling up partition - caching?
Yeah that's what I've done now, and it seems to be working as it should - nothing left in the mount folder after unmounting.