## FILESYSTEMS and FILES

Files and filesystems are essential components of a BSD system.  The BSDP candidate must
be able to configure new filesystems, adjust various filesystem parameters, take
filesystem snapshots, and perform other complex tasks according to specifications.

---------------

### 3.3.1. Format an FFS filesystem.

Importance: 3.9, Frequency: 2.0, Bloom: K,C,A

**Concept:** NOTE: reworded slightly for clarification.

Before a hard disk can store data it must first be partitioned and then formatted with a filesystem.

BSDP candidates should be able to create a hard disk partition, format it with the Fast File System (FFS), and specify its blocksize, inode density, and other common parameters found in newfs(8).

**Practical:**

disklabel(8), newfs(8)

**Estimated Time:**

10 minutes to format and test a FFS filesystem according to a specification.

### 3.3.2. Manually run file system checker and repair tool.

Importance: 4.1, Frequency: 2.1, Bloom: K,C,A

**Concept:**

Over time, filesystems can become damaged due to physical deterioration or data corruption. 

BSDP candidates should be able to assess whether a corrupted filesystem can be recovered and use the tools available to recover the filesystem and data. 

**Practical:**
fsck(8), fsdb(8), mount(8)

**Estimated Time:**
20 minutes to fix a filesystem according to a specification.

<font color="#A0A0A0">
### 56. Mount a /proc file system.
Importance: 3.0, Frequency: 1.6, Bloom: 

**Concept:** *BSDCG Note: This objective was removed at the 15/5/10 SME session.*

**Practical:**

**Estimated Time:**
</font>

### 3.3.3. Restore system files from single user mode.

Importance: 4.1, Frequency: 1.5, Bloom: K,C,A

**Concept:**

Some files are necessary to the operation of a BSD system. Should a critical system file become corrupted or deleted, it  may render the system inaccessible.

BSDP candidates should be able to boot a system in single user mode and fix or restore the specified system file.

**Practical:**

shutdown(8), mount(8), cp(1), cpio(1), tar(1), dd(1), restore(8)

**Estimated Time:**

15 minutes to recover system files and successfully boot into an operational system.

### 3.3.4. Resolve full filesystem issues.

Importance: 4.2, Frequency: 1.8, Bloom: K,C,A

**Concept:**

Filesystems can become full due to excessive use.  

BSDP candidates should know how to find and remove specified files from a filesystem in order to recover disk space. They should also be able to create symbolic links to help prevent the filesystem from becoming full again.

**Practical:**

rm(1), find(1), rmdir(1), ln(1), df(1), du(1)

**Estimated Time:**

10 minutes to recover disk space according to a specification.

### 3.3.5. Set up filesystem quotas for users.
Importance: 3.4, Frequency: 1.7, Bloom: K,C,A

**Concept:**

Filesystem quotas allow the system administrator to place restrictions on disk usage.  Restrictions may be enforced on a particular user or group, or on all users and groups.

BSDP candidates should understand how quotas are enabled, disabled, edited, and reported.  Candidates
should also be able to configure quotas usage for a given filesystem.

**Practical:**

quotaon(8), quota(1), quotackeck(8), edquota(8), repquota(8), fstab(5) 

**Estimated Time:**

20 minutes to configure quotas for a filesystem according to a specification.

<font color="#A0A0A0">
### 60. Dynamically increase the size of a filesystem.
Importance: 3.4, Frequency: 1.5, Bloom:

**Concept:** *BSDCG Note: This objective was removed at the 15/5/10 SME session. It should be revisited at a later time.*

**Practical:**

**Estimated Time:**
</font>

### 3.3.6. Enable or disable a mounted filesystem's write status.

Importance: 3.5, Frequency: 1.8, Bloom: K,C,A

**Concept:**

Filesystems can be configured as read-only file storage, in which case no writing to
the filesystem is permitted while the file system is mounted.  

BSDP candidates should be
able to mount a filesystem as read-only and change the read-write status of a currently
mounted filesystem.

**Practical:**

mount(8), chflags(1)

**Estimated Time:**

10 minutes to configure a filesystem's read/write status according to a specification.

### 3.3.7. Configure software RAID.

Importance: 3.8, Frequency: 1.6, Bloom: K,C,A

**Concept:**

Redundant Array of Inexpensive Disks (RAID) is used to provide increased storage reliability through redundant disks. Should one disk fail, the data is maintained by other disks within the array.

BSDP candidates should be familiar with basic RAID concepts and understand RAID levels 0, 1, 4, and 5. Candidates should also be able to configure the requested RAID type for their BSD of choice.

**Practical:**

ccd(4), ccdconfig(8)

FreeBSD: vinum(8), gstripe(8), gmirror(8)

OpenBSD, NetBSD: raid(4), raidctl(8)

**Estimated Time:**

30 minutes to configure software RAID according to a specification.

<font color="#A0A0A0">
### 63. Configure hardware RAID.
Importance: 4.0, Frequency: 1.6, Bloom:

@@@jpb: Note: This objective was removed during the July 18, 2010 SME session.

**Practical:**

**Estimated Time:**
</font>

### 3.3.8. Encrypt a file.

Importance: 3.7, Frequency: 2.5, Bloom: K,C,A

**Concept:**

File encryption protects the confidentiality of data within the file.  There are a variety
of ways to encrypt and decrypt a file, depending on user requirements.  

BSDP candidates should be able to use their cryptographic utility of choice to encrypt and decrypt a given file. Candidates should also be familiar with the differences between symmetric and asymmetric encryption.

**Practical:**

software of choice from packages/pkgsrc

openssl(1)

**Estimated Time:**

10 minutes to encrypt or decrypt a file according to a specification.

### 3.3.9. Configure an encrypted disk or partition.

Importance: 3.5, Frequency: 1.7, Bloom: K,C,A

**Concept:**  dru@ reworded so applies to all BSDs

An encrypted disk or partition adds an additional layer of security as a passphrase is
required before the data can be accessed.

BSDP candidates should be able to encrypt the specified disk or partition and verify that the
data is only accessible when the correct passphrase is used.

**Practical:**

software of choice from packages/pkgsrc

FreeBSD: gbde(4), gbde(8), geli(8)

NetBSD: cgd(4), cgdconfig(8)

OpenBSD: vnconfig(8)

**Estimated Time:**

20 minutes to create and test an encrypted disk or partition according to a specification.

### 3.3.10. Create a file system snapshot.

Importance: 3.8, Frequency: 2.5, Bloom: K,C,A

**Concept:** 

Snapshots allow a user to create images of specified filesystems and treat them as files. Snapshots can be used for backup purposes or to study the state of the filesystem at a given point in time.

BSDP candidates should be able to take a snapshot of the specified filesystem on their BSD of choice.

**Practical:**

software of choice from packages/pkgsrc

DragonFly BSD: hammer(8)

FreeBSD: mksnap_ffs(8)

NetBSD: fss(4), fssconfig(8)

**Estimated Time:**

15 minutes to take a snapshot of a filesystem according to a specification.

### 3.3.11. Configure a journaling filesystem.

Importance: 3.8, Frequency: 1.9, Bloom: K,C,A

**Concept:** dru@ objective reworded to apply to all BSDs

A journaling filesystem keeps track of pending changes before committing them. Soft updates use a memory cache to improve performance. In the event of a system crash or power failure, these types of  filesystems are quicker to bring back online and less likely to become corrupted.

BSDP candidates should be able to format a partition with a journaled filesystem or enable soft updates  on a BSD system.

**Practical:**

DragonFly BSD, FreeBSD, NetBSD: tunefs(8)

DragonFly BSD: mountctl(8), ffs(5)

FreeBSD: gjournal(8)

NetBSD: wapbl(4), fstab(5)

OpenBSD: mount(8)

**Estimated Time:**

20 minutes to configure a journaling filesystem or to enable soft updates according to a specification.
