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]