Re: [SOLVED] disk space issues...any help is greatly appreciated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Robert wrote:

<snip original stuff>
I noticed the chorus of agreement that your problem was likely a result of failure to mount your backup drive. My backup script, which also uses rsync begins like this, insuring a good mount before shoving bytes around. It's not SUPPOSED to be mounted before the script runs but I test for that, too. (The drive label is OTOT):

       #!/bin/bash
       # Backup using rsync and rotating directories
       #
       #Set the Dest. Mount
       UD=/media/OTOT
       MS=8388608 # Minimum free space 8GB
       #
       # Drive mount logic:
       #
       if [ -z $(mount | grep $UD | awk '{ print $3 }') ]; then
         mount $UD
       fi
       if [ -z $(mount | grep $UD | awk '{ print $3 }') ]; then
         echo "Drive refuses to mount!!"
         exit 1
       fi
       #
       # Drive is mounted. Get device name
       #
       XDR=$(mount | grep $UD | awk '{ print $1 }')

etc., etc.

Thanks Robert, Ned, William, et al (no offense intended to the many not named here), who replied with the need for logic and for checking that all devices, including the ext HDD, were connected to the UPS.

Re: Logic in the script: no doubt, I will be modifying it to check for valid mount point before starting. As always, I'm learning from my mistakes :)

As for the server having been up, I think what happened was the server and the HDD (which was connected to the UPS) went down before the rsync was scheduled to run. When power was lost, the mount point wasn't properly released. When it came back up and online, the USB drive was mounted to /media/bkup_ (trailing _ provided by the system) which turned out to be a folder on /, not a pointer to the external drive.

Again, thanks for the tips, pointers and sound ideas.

-Ray


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux