Re: School me on server hard drive management. (Hot swap, SATA channels, LVM, backup, etc.)

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

 




Am 29.09.2011 15:46, schrieb linux guy:
> 
> Mount point management.
> 
> Is there an easy was to know if a disk is mounted and act accordingly or prevent data from being written to a
> mountpoint ?  Or to have the mount point disappear when its not mounted ?
> 
> Example
> 
> Lets say I create a mount point /home/me/myth and that /home/me resides on /dev/sda3.
> 
> Lets say that a disk labelled MYTH normally gets mounted there.  But lets say that someone accidentally unplugs the
> MYTH disk and thus nothing is mounted.  Lets say the myth backend starts recording and in the process writing data
> to /home/me/myth.   If MYTH isn't mounted there, then that data is going to get written to the mount point dir, ie
> /dev/sda3.
> 
> Is there any way to prevent that ?

/bin/mount $MOUNTPOINT 2> /dev/null > /dev/null
mount | grep $MOUNTPOINT > /dev/null
if [ $? -ne 0 ]
 then
 echo "DISK NOT MOUNTED"
 exit
fi

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux