Sec. 18 Filesystem features: Attributes, Creating, Checking, Mounting. Flashcards
extended attributes associate ________ not interpreted directly by the file system with files .
metadata
Four namespaces exist. what are they?
- user
- trusted,
- security
- system
The system namespace is used for __________ _______ _____ ?
Access Control lists
Describe the attibutes of the flag: Append-only
- a file with the append-only attribute/flag set can only be opened in append mode for writing.
- only the superuser can set or clear this attribute
the security namespace is used by________?
SElinux.
Describe the attributes of the flag/attribute: immutable
- a file with the immutable attribute/flag cannot be changed/modified
- even by root
- cannot be deleted or renamed
- no hard link can be created to it
- no data can be written to it.
- Only the superuser can set or clear this attribute/flag.
what command utility would I use to change attributes of a file?
chattr
what is the syntax for chattr ?
chattr [=|-| mode] filename
what command would i use to list/view attributes of a file?
lsattr
Describe the attributes that come with the flag: No-dump
- a file with the no-dump attribute set is ignored when the dump program is run
- this is useful for swap and cache files that you don’t want to waste time backing up .
Describe the attribute set by the flag: no-atime-update
- with the no-atime-update set the file will not modify its atime(access time) record when a file is accessed but not otherwise modifed
- this can increase the performance on some systems because it reduces teh amount of disk I/O on the system.
What command would I use to formatt(making) a filesystem on a partition?
mkfs
When would I use the command mkfs?
When I want to formatt a filesystem
what is the general format for the command mkfs?
mkfs [-t fstype] [options] [device-file]
- # * where [device-file] is usually a
- device name like* /dev/sda3 or /dev/vg/lvm1
Each filesystem type hs its own particular _______ that can be set when formating?
options
filesystem
-
filesystem:
- all accessable files in linux are organized into on large hierarchical tree structure with the head being the root directory.(/)
mount
the mount program allows the attaching at any point in the tree structure.
mount point
the mount point is the directory where the filesystem is attached.
mkdir
mkdir can be used to make a new directory.
what are the results of mounting a filesystem to a directory that is already used?
the information will be hidden not deleted. until after the new filesystem is unmounted .
explain each item in the following example:
$ sudo mount -t ext /dev/sdb4 /home
- mount
- mounts an ext4 filesystem
- -t
- ususlly not nessary to specify the type with the -t option.
- /dev/sdb4
- desginates where the filesystem is located on a specific partition of a hard drive
- . /home
- the filesystem is mounted at the position /home in the current directory tree.
what does the command mount -a execute?
it mounts all the filesystems mention in the /etc/fstab.
-
note:
- this is a good way to see if the filesystem entree you placed in /etc/fstab is was put in correctly.
if were to execute the command mount with no options what would result?
it would generate a list of all the currently mounted filesystems.
what command would i use to unmount a filesystem?
- umount
-
umount syntax:
- umount [device-file | mount-point]
what is a common error that is ecountered when unmount a filesystem?
trying to unmount a filesystem that is currenty in use.
what command would I use to find out which users are using the filesystem that I would like to unmount?
fuser
mount -a ; what does that execute?
mounts all the filesystems in the /etc/fstab file
When mounting w/ mount -a , what is the order of the mounting process?
the order from top to bottom of the /etc/fstab file.
it is bad practice to use the mount -a command for /etc/fstab checking. what should be used instead ?
findmnt –verify
mount -r ; executes what action? what what is the other option that does the same thing?
mounts a filesystem in read only mode. the other option that does the same thing is –read-only
mount -w ; what does that execute?
mounts a filesystem with read and write privilages.
most devices to be mount are identified by file name like….?
/dev/sda1
what command will list filesystem , LABELS, UUID on avaliable block devices ?
$ lsblk -fs
if no options are given to the mount what happens?
a list of the mounted filesystems are printed
if I would like to override the option in /etc/fstab than what option would I use?
-o
does the mount command read /etc/fstab file if both device and directory are given as arguements .
no
If I would like to move a mount point to someplace different, how would I use the mount command?
$ mount –move olddir newdir
*the physical location of the files have not changed .
what command would I use to un-attach a filesystem with?
umount
the file system is used for (what?)
to control how data is stored on the device
the pathname dir refers to (what?) of the filesystem on the block device
root
if only a directory is given for the mount command . ie mount dir . then….?
mount looks for a mount point (if not found a device) in the fstab file
what mount command will list all the mounted filesystems
$ mount -l
*the l option add labels
all files accessible in a unix suystem are setup as on a big ……..?
tree
even though a filesystem may look like one piece th files can be ……?
spread over several devices
what command serves as a tool to attach a filesystem(found on a device) to the big file tree ?
mount