Sponsored Content
Operating Systems Linux Make directory used as mount point read-only Post 302921915 by Peasant on Tuesday 21st of October 2014 05:44:34 AM
Old 10-21-2014
If you are referring to drive being disconnected during backup, you can create something like this which will check if mountpoint is avalible every second, and if it is not it will kill the rsync proces.
Code:
set -x
mount | grep "/test" > /dev/null
if [ $? -eq 0 ]; then
echo "your rsync goes here" & RPID=$!
else
echo "will not rsync, unable to find mountpoint"
fi
e=0
while [ $e -eq 0 ]
do
mount | grep "/test" > /dev/null
if [ $? -gt 0 ]; then
echo "Cannot see mountpoint!, will abort"
e=$(( $e + 1 ))
kill $RPID
sleep 1
fi
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recover mount point

A disk was sliced into 6 slices with m01 being the mount point for one of the slices. This mount point was deleted with rmdir (ie. rmdir m01). What is the easiest way to recover this mount point? (1 Reply)
Discussion started by: here2learn
1 Replies

2. UNIX for Dummies Questions & Answers

mount point

hi people, I'm trying to create a mount point, but am having no sucess at all, with the following: mount -F ufs /dev/dsk/diskname /newdirectory but i keep getting - mount-point /newdirectory doesn't exist. What am i doing wrong/missing? Thanks Rc (1 Reply)
Discussion started by: colesy
1 Replies

3. UNIX for Advanced & Expert Users

mount point lists

is there any command to know the list of mount points in a server.i need only the mount point lists.i tried using df but it was not helpful.i am using Solaris (1 Reply)
Discussion started by: dr46014
1 Replies

4. Solaris

Mount Point Sorting?

Dear Gurus, Could it be possible to have the output of df -k sorted? The df -k output messed up after recent power trip. Also, is there any folders that I should look into to reduce the root size (other than /var/adm and /var/crash) after server crash? Many thanks in advance. ... (2 Replies)
Discussion started by: honmin
2 Replies

5. Solaris

Mount point in a server

Hi , How to find out mount point in a server ? OS -- SunOS 5.6 Generic sun4u sparc SUNW Thanks (4 Replies)
Discussion started by: Maddy123
4 Replies

6. Shell Programming and Scripting

Mount point usage

Hi Guys, I have Solaris 9 and RHEL 5 boxes I implemented script to send me an email when my mount point is > 90. Now the ouput id like these: /dev/dsk/emcpower20a 1589461168 1509087840 64478720 96% /data1 /dev/dsk/emcpower21a 474982909 451894234 18338846 97% /data2... (2 Replies)
Discussion started by: Phuti
2 Replies

7. Red Hat

NFS mount point

Hi, Can you tell me something about NFS mount point ? Regards, Maddy (3 Replies)
Discussion started by: Maddy123
3 Replies

8. UNIX for Beginners Questions & Answers

Can we have 2 mount point under the same name but at different directory?

guys i would like to know can we have 2 mount point which is same name but on different directory? (3 Replies)
Discussion started by: leecopper
3 Replies

9. AIX

How to change the mount point of LV?

I have situation where my disk upon reboot, has its mount point as # LOGICAL VOLUME: disk4vol VOLUME GROUP: disk4vg LV IDENTIFIER: 00f609aa00004c0000000152414b786c.1 PERMISSION: read/write VG STATE: active/complete LV STATE: closed/syncd TYPE: jfs2 WRITE VERIFY: off MAX LPs: 512 PP SIZE: 512... (1 Reply)
Discussion started by: mrmurdock
1 Replies

10. UNIX for Beginners Questions & Answers

How to create a new mount point with 600GB and add 350 GBexisting mount point? IN AIX

How to create a new mount point with 600GB and add 350 GBexisting mount point Best if there step that i can follow or execute before i mount or add diskspace IN AIX Thanks (2 Replies)
Discussion started by: Thilagarajan
2 Replies
HALEVT-MOUNT(1) 					      General Commands Manual						   HALEVT-MOUNT(1)

NAME
halevt-mount/halevt-umount - Mount or umount device through HAL SYNOPSIS
halevt-mount [options] [-w] mountpoint|device|udi halevt-mount [options] <-c | -r> <-a | mountpoint | device | udi> halevt-mount [options] <-l | -s> halevt-umount [options] < -a | mountpoint | device | udi> DESCRIPTION
halevt-mount Mount or umount device through HAL and keep a track of devices handled. When called as halevt-umount the default is to unmount, when called as halevt-mount the default is to mount. Option -c, -l, -r, -s or -w changes the operation performed. Additional argument is considered to be a mount point, a device or an udi when unmounting or removing. If the commands are not called with -s after changes in the state of the devices (after mounting, unmounting, removing devices), the infor- mation available for halevt-mount and halevt-umount may become out of sync with the state of the system. When run as user halevt (or as root), no uid= argument is passed to HAL when mounting, otherwise this option is passed, if the filesystem allows it. OPTIONS
-a When listing, list all the existing devices. For the other operations, perform the operation on all the handled devices. -c Remove the handled device. -d device Use device device. -f file Use file file to store information about the handled devices instead of the default. -h Help message and options summary. -i directory Use lock file and device information file in the directory directory (if they are not already specified). -l List handled devices. Formatted with, on each line, udi:device:mountpoint. -p mountpoint Use mountpoint mountpoint. -m umask Set mount umask to umask if run as a system user, and the filesystem supports it. -n file Use file file as lock file. -o option Add the option option to the mount call. -r Umount. -s Sync the information about the handled devices with the informations known by HAL. -u udi Use udi udi. -w Add to the handled devices. SEE ALSO
halevt(1), gnome-mount(1), pmount(1) VERSION
This is halevt-mount version 0.1.6.2. AUTHOR
Main author is Patrice Dumas pertusus at free dot fr. AVAILABILITY
The latest version of this program can be found at: http://www.nongnu.org/halevt/ COPYRIGHT
Copyright (C) 2007-2008 Patrice Dumas <pertusus at free dot fr>, There is NO warranty. You may redistribute this software under the terms of the GNU General Public License; either version 2 of the License, or (at your option) any later version. For more information about these matters, see the file named COPYING. 7th Edition HALEVT-MOUNT(1)
All times are GMT -4. The time now is 09:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy