0% found this document useful (0 votes)
14 views

Module 2 - What is File System

System Administration

Uploaded by

Jelle Fuerte
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Module 2 - What is File System

System Administration

Uploaded by

Jelle Fuerte
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

What is File System?

A file is a collection of correlated information which is recorded on secondary or non-


volatile storage like magnetic disks, optical disks, and tapes. It is a method of data
collection that is used as a medium for giving input and receiving output from that
program.

In general, a file is a sequence of bits, bytes, or records whose meaning is defined by


the file creator and user. Every File has a logical location where they are located for
storage and retrieval.

Objective of File management System


Here are the main objectives of the file management system:

 It provides I/O support for a variety of storage device types.


 Minimizes the chances of lost or destroyed data
 Helps OS to standardized I/O interface routines for user processes.
 It provides I/O support for multiple users in a multiuser systems environment.

Properties of a File System


Here, are important properties of a file system:

 Files are stored on disk or other storage and do not disappear when a user logs
off.
 Files have names and are associated with access permission that permits
controlled sharing.
 Files could be arranged or more complex structures to reflect the relationship
between them.

File structure
A File Structure needs to be predefined format in such a way that an operating system
understands. It has an exclusively defined structure, which is based on its type.

Three types of files structure in OS:

 A text file: It is a series of characters that is organized in lines.


 An object file: It is a series of bytes that is organized into blocks.
 A source file: It is a series of functions and processes.
File Attributes
A file has a name and data. Moreover, it also stores meta information like file creation
date and time, current size, last modified date, etc. All this information is called the
attributes of a file system.

Here, are some important File attributes used in OS:

 Name: It is the only information stored in a human-readable form.


 Identifier: Every file is identified by a unique tag number within a file system
known as an identifier.
 Location: Points to file location on device.
 Type: This attribute is required for systems that support various types of files.
 Size. Attribute used to display the current file size.
 Protection. This attribute assigns and controls the access rights of reading,
writing, and executing the file.
 Time, date and security: It is used for protection, security, and also used for
monitoring

File Type
It refers to the ability of the operating system to differentiate various types of files like
text files, binary, and source files. However, Operating systems like MS_DOS and UNIX
has the following type of files:

Character Special File


It is a hardware file that reads or writes data character by character, like mouse, printer,
and more.

Ordinary files

 These types of files stores user information.


 It may be text, executable programs, and databases.
 It allows the user to perform operations like add, delete, and modify.

Directory Files

 Directory contains files and other related information about those files. Its
basically a folder to hold and organize multiple files.
Special Files

 These files are also called device files. It represents physical devices like
printers, disks, networks, flash drive, etc.

Functions of File

 Create file, find space on disk, and make an entry in the directory.
 Write to file, requires positioning within the file
 Read from file involves positioning within the file
 Delete directory entry, regain disk space.
 Reposition: move read/write position.

Commonly used terms in File systems

Field:
This element stores a single value, which can be static or variable length.

DATABASE:
Collection of related data is called a database. Relationships among elements of data
are explicit.

FILES:
Files is the collection of similar record which is treated as a single entity.

RECORD:
A Record type is a complex data type that allows the programmer to create a new data
type with the desired column structure. Its groups one or more columns to form a new
data type. These columns will have their own names and data type.

File Access Methods


File access is a process that determines the way that files are accessed and read into
memory. Generally, a single access method is always supported by operating systems.
Though there are some operating system which also supports multiple access methods.

Three file access methods are:

 Sequential access
 Direct random access
 Index sequential access

Sequential Access
In this type of file access method, records are accessed in a certain pre-defined
sequence. In the sequential access method, information stored in the file is also
processed one by one. Most compilers access files using this access method.

Random Access
The random access method is also called direct random access. This method allow
accessing the record directly. Each record has its own address on which can be directly
accessed for reading and writing.

Sequential Access
This type of accessing method is based on simple sequential access. In this access
method, an index is built for every file, with a direct pointer to different memory blocks.
In this method, the Index is searched sequentially, and its pointer can access the file
directly. Multiple levels of indexing can be used to offer greater efficiency in access. It
also reduces the time needed to access a single record.

Space Allocation
In the Operating system, files are always allocated disk spaces.

Three types of space allocation methods are:

 Linked Allocation
 Indexed Allocation
 Contiguous Allocation

Contiguous Allocation
In this method,

 Every file users a contiguous address space on memory.


 Here, the OS assigns disk address is in linear order.
 In the contiguous allocation method, external fragmentation is the biggest issue.

Linked Allocation
In this method,

 Every file includes a list of links.


 The directory contains a link or pointer in the first block of a file.
 With this method, there is no external fragmentation
 This File allocation method is used for sequential access files.
 This method is not ideal for a direct access file.

Indexed Allocation
In this method,

 Directory comprises the addresses of index blocks of the specific files.


 An index block is created, having all the pointers for specific files.
 All files should have individual index blocks to store the addresses for disk space.

File Directories
A single directory may or may not contain multiple files. It can also have sub-directories
inside the main directory. Information about files is maintained by Directories. In
Windows OS, it is called folders.

Host

Client 1 Client 2 Client 3

Following is the information which is maintained in a directory:

 Name The name which is displayed to the user.


 Type: Type of the directory.
 Position: Current next-read/write pointers.
 Location: Location on the device where the file header is stored.
 Size : Number of bytes, block, and words in the file.
 Protection: Access control on read/write/execute/delete.
 Usage: Time of creation, access, modification
File types- name, extension
File Type Usual extension Function
Executable exe, com, bin or none ready-to-run machine- language program
Object obj, o complied, machine language, not linked
Source code c. p, pas, 177, asm, a source code in various languages
Batch bat, sh Series of commands to be executed
Text txt, doc textual data documents
Word
doc,docs, tex, rrf, etc. various word-processor formats
processor
Library lib, h libraries of routines
Archive arc, zip, tar related files grouped into one file, sometimes compressed.
Configuring file systems

Create a file system

Before you begin


Make sure there is a NAS server configured to support the NFS file system type, and
that a pool exists with enough available storage space.

Procedure
1. Under Storage, select File > File Systems.
2. Select the Add icon.
3. On the Protocol window, select the Linux/Unix Shares (NFS). Then select the
associated NAS server.
4. Continue following the steps in the wizard while noting the following:
o On the Storage page, the Thin checkbox is selected by default. If you do
not want to create a thin file system, remove the checkmark from
the Thin checkbox. Removing the checkmark also disables the Data
Reduction option.
o On the Storage page, select the Data Reduction checkbox to enable
data reduction on the file system. Data reduction is applied on all new
incoming writes. Data that already exists on the file system does not have
data reduction applied. Data reduction can be enabled only on thin file
systems that reside in All-Flash pools, and only for thin file systems
created on Unity systems running OE version 4.2.x or later.
o On the Shares page, optionally, configure the initial share for the file
system.
o You can configure host access and a snapshot schedule for the file
system when you create the file system, or you can do this at a later time.

Change file system properties

If the associated NAS server is a replication destination, many configuration options


cannot be changed.

Procedure
1. Under Storage, select File > File Systems.
2. Select the relevant file system, and then select the Edit icon.
3. On the General tab:
o You can change the description of the file system and the file system
size.
o You can view the file system capacity, including used space and free
space, on this tab.
o If a thin file system was created on a Unity system running OE version
4.1, you can also change the minimum allocation size. You cannot reduce
the storage size lower than the current allocation.
o You can enable data reduction for thin file systems created on a Unity
system running OE version 4.2.x or later. As data reduction is applied to
all new incoming writes to a file system, data reduction statistics (such as
data reduction ratio) display on the Properties page.
If data reduction is enabled and then subsequently disabled, existing data
in the file system will remain as is, but newly-written data will not have
data reduction applied.

o If data reduction is enabled, you can also enable Advanced


Deduplication, which provides the ability to reduce the amount of data
storage needed by eliminating redundant data from the system. Once
enabled, all incoming writes to the system will have advanced
deduplication applied.
Advanced deduplication is available only on:

 Dynamic or Traditional pools in Unity 380F, 480F, 680F, and 880F


systems
 Dynamic pools in Unity All-Flash 450F, 550F, and 650F systems
 All-Flash pools in Unity Hybrid 380, 480, 680, and 880 systems
o You can change capacity alarm threshold settings for when Info, Warning,
and Error alert messages are generated.
4. On the Snapshots tab, manage the file system's snapshots or configure a
snapshot schedule for the file system.
5. On the FAST VP tab, change the file system tiering policy and view the data
distribution per tier.
6. On the Advanced tab, optionally enable Events Publishing for a file system.
7. On the Quota tab, configure or change settings for file system quotas and quota
trees.
8. On the Replication tab, configure or change the file system replication settings
Configuring file system shares

Share local paths and export paths

The following table describes the path settings for shares:

Setting Description

Local The path to the file system storage resource on the storage system. This path
path specifies the unique location of the share on the storage system.
NFS shares
 Each NFS share must have a unique local path. Unisphere automatically
assigns this path to the initial share created within a new file system. The local
path name is based on the file system name.
 Before you can create additional shares within an NFS file system, you must
create a directory to share from a Linux/UNIX host that is connected to the file
system. Then, you can create a share from Unisphere and set access
permissions accordingly.
Export The path used by the host to connect to the share. Unisphere creates the share
path export path based on the name of the share and the name of the file system where it
resides. Hosts use either the file name or the export path to mount or map to the
share from a network host.
This behavior is enabled by using NFS aliases for shares.

Create an NFS share

Before you begin


The file system or snapshot you choose as the share's source must be associated with
a NAS server that supports the NFS protocol.

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system for which you want to add a share, and then select More
Actions > Create an NFS share (NFS export).
3. On the File System page, specify whether the share is for the selected file
system or for a snapshot of the selected file system.
4. On the Name & Path page, enter the relevant information, noting the following:
o The value specified in the Share Name field, along with the NAS server
name, constitutes the alias by which hosts can access the share.
o Share names must be unique at the NAS server level per protocol.
However, you can specify the same name for an SMB and NFS share.
o Local Path must correspond to an existing folder name within the file
system that was created from the host-side.
Note: A given file system path can only be shared once using the NFS protocol.

o By default, users can set bit s in the execute portion of the owner or group
permissions of a file. Users can then set the setuid and setgid Unix
permission bits. This allows users to run the executable with the privileges
of the file's owner (such as root). De-select Allow SUID if you do not want
users to have this ability.
o Optionally change the default anonymous UID and GID for the share. If
the permission of a host is read-only or read-write (without allowing root
access), and the UID of the client is 0 (which is typically the UID of the
root account), then the UID is mapped to the anonymous UID on the NAS
server. By default, the values of the anonymous UID and anonymous GID
are 4294967294, which is typically associated with the nobody user.
5. On the Access page, optionally specify the name of the hosts that can access
the share, along with their access privileges. In the Default Access field, select
the access setting you want all hosts to have for the share. In the Customize
access for the following hosts section do either of the following:
o Change the access privileges for existing hosts.
o Add new hosts and specify individual access privileges for those hosts.

Change NFS share properties

Procedure
1. Under Storage, select File > NFS Shares.
2. Select the relevant NFS share, and then click the Edit icon.
3. On the General tab, change the share description.
4. On the Host Access tab, configure or add host access to the NFS share.
Managing quotas

About file system quotas

You can track and limit drive space consumption by configuring quotas for file systems
at the file system or directory level. You can enable or disable quotas at any time, but it
is recommended that you enable or disable them during non-peak production hours to
avoid impacting file system operations.

Note: You cannot create quotas for read-only file systems.

Quota configurations
The storage system supports three types of quota configurations:

Quota Description
configuration

User quota on a file Limits the amount of storage consumed by an individual user storing data
system on the file system.

Quota on a Limits the total amount of storage consumed on the directory. You can use
directory (called a quota trees to:
quota tree once a
 Set storage limits on a project basis. For example, you can
quota is applied)
establish quota trees for a project directory that has multiple users
sharing and creating files in it.
 Track directory usage by setting the tree quota's hard and soft
limits to 0 (zero).
Note: If you change the limits for a quota tree, the
changes take effect immediately, without disrupting file
system operations.

User quota on a Limits the amount of storage consumed by an individual user storing data
quota tree on the quota tree.
Soft and hard limits
A quota can have a soft limit, hard limit, or both.

 A soft limit is a preferred limit on storage usage. The system issues a warning
when a soft limit is reached.
You can set a grace period for a file system or a quota tree, which counts down
time once the soft limit is met. If the grace period expires, users cannot write to
the file system or quota tree until more space becomes available, even if the hard
limit has not been met.

Note: If you update the grace period value, the new value affects only the quota or
quotas which will exceed the soft limit after the update is performed. Any existing
quotas which have been counting down using the older grace period value will not be
affected.

 A hard limit is an absolute limit on storage usage.


If a hard limit is reached for a user quota on a file system or quota tree, the user
will not be able to write data to the file system or tree until more space becomes
available. If a hard limit is reached for a quota tree, no user will be able to write
data to the tree until more space becomes available.

Recommended approach for configuring quotas

It is recommended that you configure quotas before the storage system becomes active
in a production environment, and that you follow this basic procedure:

1. Create a file system.


2. Determine which quota policy best suits the file system's environment, and select
that policy. The default policy is File Size, which calculates drive usage in terms
of logical file sizes, and ignores the size of directories and symbolic links.
3. Enable the enforcement of user quotas at the file system level, and define default
limits for those quotas. If default limits are not specified, the system sets no drive
usage limits for users, unless explicit user limits are defined for each individual
user. Set default quotas in an environment where you want the same set of limits
applied to many users.
4. Specify the grace period for which users of the file system can remain over the
soft limit before it becomes the hard limit.
Note: If you update the grace period value, the new value affects only the quota or
quotas which will exceed the soft limit after the update is performed. Any existing
quotas which have been counting down using the older grace period value will not be
affected.
5. Define explicit quotas for individual users at the file-system level, if the
environment requires this type of usage-control granularity. The explicit quotas
you define supersede the default quota definitions.
6. Create quota trees for each directory or subdirectory for which you want to have
quotas.
7. For each quota tree, optionally change the default limits for users at the quota
tree level. These limits are inherited from file system settings when a quota trees
is created. If default limits are not set, the quotas feature sets no drive usage
limits for quota tree users, unless explicit user limits are defined for each
individual user. Set default limits in an environment where you want the same set
of limits applied to many users.
8. For each quota tree, define explicit quotas for users if the environment requires
this type of individual-usage-control granularity.

Quota policies

Before enabling and defining quotas, ensure that the file system is configured to use the
quota policy that best suits the client environment:

 File Size policy (default): Calculates drive usage in terms of logical file sizes, and
ignores the size of directories and symbolic links. Use this policy where file sizes
are critical to quotas, such as where user usage is based on the size of the files
created, and exceeding the size limit is unacceptable.
 Blocks policy: Calculates drive usage in terms of file system blocks (8 KB units),
and includes drive usage by directories and symbolic links in the calculations.
With this policy, any operation resulting in allocating or removing blocks, such as
creating, expanding, or deleting a directory; writing or deleting files; or creating or
deleting symbolic links changes block usage. Block usage depends solely on the
number of bytes added to or removed from the file.
Note: When using the Blocks policy, a user can create a sparse file whose size is
larger than the file size, but that uses fewer blocks on the drive.

The policy and grace period to use depend on which behavior (of the two described
above) is preferred or the number of each type of client in your environment. If the grace
period is set to 0, warnings will be generated when soft quotas are reached, but neither
client will get quota exceeded errors until the hard limit is exceeded. If the use of default
soft quotas is required, set the specific grace periods you desire, or keep the default
grace period of one week.

Note: If you update a grace period value, the new value affects only the quota or quotas
which will exceed the soft limit after the update is performed. Any existing quotas which
have been counting down using the older grace period value will not be affected.

Enable or disable the enforcement of user quotas on a quota tree


Enabling or disabling the enforcement of user quotas on a quota tree impacts system
performance, but does not disrupt file system operations. It is recommended that you
perform these operations only during non-peak production hours. Once user quota
enforcement is enabled, you can change quota settings without impacting performance.

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then select the Edit icon.
3. On the Quota tab, select the Quota Tree sub-tab.
4. Do either of the following:
o To enforce user quotas, locate the quota tree, and select the No link in
the Enforce User Quotas column. Then select Enforce User Quotas.
o To disable the enforcement of user quotas, locate the quota tree, and
select the Yes link in the Enforce User Quotas column. Then
clear Enforce User Quotas.

Enable or disable the enforcement of user quotas on a file system

Enabling or disabling the enforcement of user quotas on a file system impacts system
performance, but does not disrupt file system operations. It is recommended that you
perform these operations only during non-peak production hours. Once user quota
enforcement is enabled, you can change quota settings without impacting performance.

Note: When you enable user quotas, you can also set default user quota limits and a
default grace period. Explicit user quotas will override these defaults.

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then select the Edit icon.
3. On the Quota tab, select the File System sub-tab.
4. Select Manage Quota Settings.
5. Select or clear Enforce User Quotas.
6. If you are enabling user quotas, optionally do the following:
o Change the quota policy for the file system.
o Change the default quota limits and grace period. These limits apply to all
file system users who do not have explicit user quotas defined. A value of
0 indicates no limit.

Create a user quota on a file system

Create a user quota on a file system to limit or track the amount of storage space that
individual users consume on that file system. When you create or modify user quotas,
you have the option to use default hard and soft limits that are set at the file-system
level.
Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then select the Edit icon.
3. On the Quota tab, select the File System sub-tab.
4. Select the Add icon.
5. In the Create User Quota wizard, select the Add icon, and then provide the
requested information. To track space consumption without setting limits,
set Soft Limit and Hard Limit to 0, which indicates no limit.

Create a quota tree on a file system

Create a quota tree at the directory level of a file system to limit or track the total
storage space consumed for that directory.

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then select the Edit icon.
3. On the Quota tab, select the Quota Tree sub-tab.
4. Select the Add icon.
5. Follow the steps in the wizard. To track space consumption without setting limits,
set the Soft Limit and Hard Limit fields to 0, which indicates no limit.

Create a user quota on a quota tree

Create a user quota on a quota tree to limit or track the amount of storage space that
individual users consume on that tree. When you create user quotas, you have the
option to use the default hard and soft limits that are set at the quota-tree level.

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then select the Edit icon.
3. On the Quota tab, select the Quota Tree sub-tab.
4. Select the quota tree, and then select the Edit icon.
5. On the User Quotas tab, be sure that Enforce User Quotas is selected, and
provide the limits information. To track space consumption without setting limits,
set the Soft Limit and Hard Limit fields to 0, which indicates no limit.

View file system storage space usage by user

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then click the Edit icon.
3. Select the Quota tab to view the User Quota Report.
View quota tree storage space usage

You can view total quota tree storage space usage or quota tree space usage by user.

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then click the Edit icon.
3. On the Quota tab, select the Quota Tree sub-tab.
The system displays the total storage space usage by quota tree.
4. To view quota tree storage space usage by user, select the quota tree, select
the Edit icon, and then select the User Quotas tab.

Change quota properties for a file system

Procedure
1. Under Storage, select File > File Systems.
2. Select the relevant file system, and then select the Edit icon.
3. On the Quota tab, select the File System sub-tab.
4. Change the limit settings for a user quota by selecting the quota and then
selecting the Edit icon.
5. Select Manage Quota Settings, and do any of the following:
o Change the quota policy for the file system.
o Enforce user quotas on the file system.
o Change the default soft limit, hard limit, and grace period for new user
quotas on the file system. You can change these values for individual user
quotas when you create them or when you modify their properties.
Note: If you update the grace period value, the new value affects only the quota o
quotas which will exceed the soft limit after the update is performed. Any existing
quotas which have been counting down using the older grace period value will not
be affected.

Change properties for a quota tree

Procedure
1. Under Storage, select File > File Systems.
2. Select the relevant file system, and then select the Edit icon.
3. On the Quota tab, select the Quota Tree sub-tab.
4. Select the relevant quota tree, and then select the Edit icon.
5. On the General tab, do any of the following:
o Select Use Default Limits to keep the file system's default limits and
grace period on the quota tree.
o Clear Use Default Limits to override the file system's default limits and
grace period.
o Change the hard limit, soft limit, and grace period settings for the quota
tree.
o
Note: If you update the grace period value, the new value affects only the quota or
quotas which will exceed the soft limit after the update is performed. Any existing
quotas which have been counting down using the older grace period value will not
be affected.

6. On the User Quotas tab, do any of the following:


o Select or clear Enforce User Quotas to enable or disable the
enforcement of user quotas on the quota tree.
These actions impact system performance, but do not disrupt file system
operations. It is recommended that you perform these operations only
during non-peak production hours. You can change other quota settings
without impacting performance.

o If you enable the enforcement of user quotas on the quota tree, you can
specify the soft and hard limits for those quotas. (You can override these
values when you create individual quotas.)
o Create a new user quota on the quota tree.
o Edit properties for existing user quotas.

Change the quota policy for a file system

Changing the quota policy for a file system can impact system performance, because it
causes a system rescan. Therefore, it is recommended that you perform this action
during off-peak hours.

Procedure
1. Under Storage, select File > File Systems.
2. Select the file system, and then select the Edit icon.
3. On the Quota tab, select Manage Quota Settings.
4. Change the quota policy, as desired.

You might also like