[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-list
Subject:    Re: School me on server hard drive management. (Hot swap, SATA
From:       David <bouncingcats () gmail ! com>
Date:       2011-09-30 7:36:10
Message-ID: CAMPXz=r7ZwLP0XeybVbA1Zm8zOTaCa6ivYuMCf10LYzgFWJdSA () mail ! gmail ! com
[Download RAW message or body]

On 29 September 2011 23:46, linux guy <linuxguy123@gmail.com> wrote:
>
> Is there an easy was to know if a disk is mounted and act accordingly or
> prevent data from being written to a mountpoint ?

Here is how I prevent data accidentally being written to a unmounted
mountpoint. You must first ensure that "/example/mountpoint" is an
empty directory. Then

chattr -V +i /example/mountpoint

so for your example: chattr -V +i /home/me/myth

I started doing this for all my mountpoints after I read about the
immutable bit. See:

man chattr

Re detecting if a disk is mounted, in older versions of fedora, the
package sysvinit-tools provided the '\bin\mountpoint' command which
implements this. Try:

man mountpoint

to see if it is available on your system.
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic