LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Clarify Mount Point Usage (https://www.linuxquestions.org/questions/linux-general-1/clarify-mount-point-usage-172522/)

jjohnston62 04-20-2004 11:35 AM

Clarify Mount Point Usage
 
Using a hotswap firewire (IEEE1394)-based drive with rsnapshot (rsync) to do disk-based backups. This all works fine.

However, my knowledge on proper use of mount points isn't fine. <G>

I have defined a mount point as /mnt/back - through the rsync script (being kicked off by cron), I do a mount on the hot swap drive (dev/sda1) before doing the sync in the script, using the following

mount /dev/sda1 /mnt/back

however, if something happens that /dev/sda1 is unavailable, I do not want it to write to the /mnt drive, thus filling up the partition and potentially crashing the server.

Question is this - what would be the proper method of defining the mount point, or script handling, so that if the device /dev/sda1 wasn't mounted, the sync wouldn't happen?

Or is this a proper use of mount points, etc?

Thanks .....

ryeman 04-20-2004 12:12 PM

Well, I'm not sure about firewire, however, when I use a USB drive/device, it is automatically added to my /mnt/removable. With your firewire drive disconnected from the computer, remove the /mnt/back from your /mnt folder. I believe there is a setting in kernel 2.6 for adding firewire support as a module. Try that to see if that is what your looking for

jjohnston62 04-20-2004 12:32 PM

The firewire mounts fine.... works fine. My question is more about how to make sure that if I'm writing to a directory /backup - that the /backup directory being written to is on the device /dev/whateverdevice instead of just a directory I've created for a mount point.

Does that make sense?

I'm not saying this properly... not being clear, probably.

bdp 04-20-2004 10:47 PM

one way to check is to cat your /etc/mtab file and grep for the drive of interest. mtab keeps track of what is mounted.

ryeman 04-22-2004 09:49 PM

Quote:

Originally posted by jjohnston62
The firewire mounts fine.... works fine. My question is more about how to make sure that if I'm writing to a directory /backup - that the /backup directory being written to is on the device /dev/whateverdevice instead of just a directory I've created for a mount point.

Does that make sense?

I'm not saying this properly... not being clear, probably.

Oh, I see.. you want to make sure that your files that you transfer are actually on the firewire drive? Well, I know with Linneighborhood, there is an option to "delete mount points on unmount". You may have to create a script to acheive that.


All times are GMT -5. The time now is 06:43 AM.