How to scrub directory only if on own partition/drive?
Hi all,
I've been working on a script to run a disk wipe (using Jim Garlick's scrub tool) on the filesystem in Xerox production printer RIPs.
Easy enough if there's just one partition, but I need to cater for the possibility of multiple drives/partitions, and either ZFS or UFS (don't know if that matters).
I can't quite figure out how to detect whether the second directory is on a separate partition (or even HDDs), and set a string/variable to trigger the process or skip.
e.g., I always want to run against the root, but it's a SLOW process, so only run again if /var/spool/XRXnps is mounted on there's a second partition (or drive)
Also, if it IS on a second HDD, run both scrub processes simultaneously (by backgrounding the first one?).
I hope that's clear (I'll paste my code so far below, but note ../XRXnps directory exists regardless whether under its own partition, or under the root partition).
Cheers, DD
----
Moderator's Comments:
edit by bakunin: if you use "code"- instead of "icode"-tags it is easier to read. "icode" is for single commands within text ./like -this. See?
I'm using PartitionMagic's wizard to partition my drive for Linux, and after I get past the first step it asks if I want to screate a seperate Linux Swap Partition. What is a Linux Swap Partition and is something I need/should have? (10 Replies)
Hello everyone.
I am new to Linux so hope some one could help me here.
I have a 30 Gb HD and windows Xp is my O/S, HD is not partitioned,but I want to Partitioned it, so I could Install Knoppix(Linux)on one of the partitioned one, how could I do this? OR should I erase every thing and then... (1 Reply)
We are still using solaris 1 with sunos 4.1.4 because nobody here knows Unix.
My colleague did a backup (dump) to the wrong place (/dev/sd0h) and we lost this part of the drive. The information is still on tape but we cannot repartition the /dev/sd0h. fsck keeps on about the "wrong SUPER BLOCK"... (2 Replies)
Dear all,
I have a AIX server with logical 3 partitions and the server is connecting a tape drive. the first partition can successfully making a system backup to the tape but how can i fail to mount the tape to second and thrid partition. would anyone can help me to deal with it? what command... (3 Replies)
Solaris 10 5/08 on Ultra 40 M2
It boots fine off primary disk but having issues booting off the mirror disk.
I get this error when booting off mirror disk:
Booting 'Solaris 10 ... Mirror disk'
root (hd1,0,a)
Error 22: No such partition
Press any key to continue...
Any... (7 Replies)
Hi,
I have found a directory on my web server that have 2 same directory names in the same location on the same partition. Is there a way to mkdir a name twice and be able to see them both in the same location?
Heres an example of the ouput:
# ls
access_log.1.bkup ... (10 Replies)
Hi ,
I have a Mac OS X Lion mac book pro. I have a hard drive which I have partitioned in two
(a) OSX Partition - Mac OS Extended Journaled format. Mount point: /
(b) Data Partition - Windows NT Filesystem format. Mount point: /Volumes/Data
I need to access the NTFS partition (I have a... (6 Replies)
Short version:
pfexec zpool scrub rpool fails saying I do not have permission to perform that action. Apparently scrub is not one of the pfexec allowed actions. Any idea on how to get around it?
Long version:
I got tired of manually running scrubs and am trying to set it to happen... (4 Replies)
Hi
I am trying to write a python script that executes a command to screen scrub results below
I will appreciate it very much if you can help me with a python script that can
pick the percentage USAGE in the second column based on the supplied queue number in the first column
import re... (0 Replies)
hello,
We are using Solaris 11.3 on SPARC T5-2. The below is the actual output from "zpool status" command. The disks were scrubed last week, but it says the scrub repaired on Dec 31, 1969.
Does anyone know how to correct this to report the correct date?
Thanks
pool: rpool
state:... (5 Replies)
Discussion started by: jasonu
5 Replies
LEARN ABOUT PHP
mac_partition
MAC_PARTITION(4) BSD Kernel Interfaces Manual MAC_PARTITION(4)NAME
mac_partition -- process partition policy
SYNOPSIS
To compile the process partition policy into your kernel, place the following lines in your kernel configuration file:
options MAC
options MAC_PARTITION
Alternately, to load the process partition module at boot time, place the following line in your kernel configuration file:
options MAC
and in loader.conf(5):
mac_partition_load="YES"
DESCRIPTION
The mac_partition policy module implements a process partition policy, which allows administrators to place running processes into
``partitions'', based on their numeric process partition (specified in the process's MAC label). Processes with a specified partition can
only see processes that are in the same partition. If no partition is specified for a process, it can see all other processes in the system
(subject to other MAC policy restrictions not defined in this man page). No provisions for placing processes into multiple partitions are
available.
Label Format
Partition labels take on the following format:
partition/value
Where value can be any integer value or ``none''. For example:
partition/1
partition/20
partition/none
SEE ALSO mac(4), mac_biba(4), mac_bsdextended(4), mac_ifoff(4), mac_lomac(4), mac_mls(4), mac_none(4), mac_portacl(4), mac_seeotheruids(4),
mac_test(4), maclabel(7), mac(9)HISTORY
The mac_partition policy module first appeared in FreeBSD 5.0 and was developed by the TrustedBSD Project.
AUTHORS
This software was contributed to the FreeBSD Project by Network Associates Labs, the Security Research Division of Network Associates Inc.
under DARPA/SPAWAR contract N66001-01-C-8035 (``CBOSS''), as part of the DARPA CHATS research program.
BUGS
See mac(9) concerning appropriateness for production use. The TrustedBSD MAC Framework is considered experimental in FreeBSD.
While the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by
entry point checks. As such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user.
BSD December 9, 2002 BSD