I'm trying to find a way to exclude file systems during the autorelabel process. I have a file system (/exports) that has tens of millions of files on it and I *know* I don't want it relabeled. I've tried semanage fcontext -a -t "<<none>>" "/exports(/.*)?" and it seems to insist on relabeling that file system. I also tried to see if there was a /.autorelabel_exclude option as I saw some patches but can't seem to find indication of them anywhere (perhaps I missed it). I really need to make sure that I can exclude these massive directories if at all possible. Any help? -- James A. Peltier Manager, IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 778-782-6573 Fax : 778-782-3045 E-Mail : jpeltier at sfu.ca Website : http://www.sfu.ca/itservices http://blogs.sfu.ca/people/jpeltier "The smartest people are constantly revising their understanding, reconsidering a problem they thought they?d already solved. They?re open to new points of view, new information, new ideas, contradictions, and challenges to their own way of thinking." - Jeff Bezos
It is possible to use semanage to label the files correctly and to persist after reboot see man pages for FTP Hope this helps Russell On 26 Dec 2012, at 09:05, "James A. Peltier" <jpeltier at sfu.ca> wrote:> I'm trying to find a way to exclude file systems during the autorelabel process. I have a file system (/exports) that has tens of millions of files on it and I *know* I don't want it relabeled. > > I've tried semanage fcontext -a -t "<<none>>" "/exports(/.*)?" and it seems to insist on relabeling that file system. I also tried to see if there was a /.autorelabel_exclude option as I saw some patches but can't seem to find indication of them anywhere (perhaps I missed it). I really need to make sure that I can exclude these massive directories if at all possible. > > Any help? > > -- > James A. Peltier > Manager, IT Services - Research Computing Group > Simon Fraser University - Burnaby Campus > Phone : 778-782-6573 > Fax : 778-782-3045 > E-Mail : jpeltier at sfu.ca > Website : http://www.sfu.ca/itservices > http://blogs.sfu.ca/people/jpeltier > > "The smartest people are constantly revising their understanding, reconsidering a problem they thought they?d already solved. They?re open to new points of view, new information, new ideas, contradictions, and challenges to their own way of thinking." - Jeff Bezos > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
On 12/26/2012 01:05 AM, James A. Peltier wrote:> I really need to make sure that I can exclude these massive directories if at all possible.The only way that appears to be available is to mark the filesystem "noauto" and mount it after the system has otherwise started.
On 12/26/2012 4:05 AM, James A. Peltier wrote:> I'm trying to find a way to exclude file systems during the autorelabel process. I have a file system (/exports) that has tens of millions of files on it and I *know* I don't want it relabeled. >How often do you need to do this? The obvious solution is to comment out the entry in /etc/fstab for the /exports filesystem and then "touch /.autorelabel" and reboot. When the machine comes back up, remove the comment the entry in /etc/fstab and then do a "mount -a". If you want to do this on a regular basis, just script the whole thing, including a script called from /etc/rc.d/rc.local which checks for a semaphore file created by the first script and does the uncomment and "mount -a" if the first script has been run. Do lots of error checking and don't forget to remove the semaphore file when the system is back up. Run the whole thing out of cron. There may be a more direct way to do what you want, but this is one way to do it using simple shell commands. Hope this helps Harold linux since 1993