You have added several new hard disks to your system. After partitioning and formatting, you have modified a configuration file to mount these new file systems automatically. You want to document the change you made.
Which of the following configuration files would you document?
a. /etc/crontab
b. /etc/inittab
c. /etc/modules.conf
d. /etc/fstab
what is
d. /etc/fstab
Explanation
You want to document the changes you made in /etc/fstab.
/etc/inittab defines the initial processes on boot-up. /etc/modules.conf defines kernel loadable modules. /etc/crontab defines jobs that run at particular dates and times.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
A number of new file systems have been added to the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?
a. init q
b. mount -a
c. mount -r
d. mount -t
what is
b. mount -a
Explanation
The command mount -a forces a re-read of the entries in the /etc/fstab file and makes the settings active.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
You want to mount a number of file systems each time the system is brought up. Which configuration file should hold the configuration information for the file systems to be mounted?
a. /etc/fstab
b. /etc/inittab
c. /etc/profile
d. /etc/mount
what is
a. /etc/fstab
Explanation
/etc/fstab holds the file system table configuration of all filesystems to be mounted during normal operations.
/etc/profile stores system-wide configuration commands and is used primarily to set environment variables. /etc/inittab determines the default runlevel for the system and starts the appropriate daemons for that runlevel. /etc/mount is not defined to show mounted file systems.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks?
a. /mount
b. /media
c. /mnt
what is
b. /media
Explanation
/media is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks.
/mnt is often used for temporarily mounted filesystems. / represents the root directory of the Linux system and is not recommended as a mount point for removable media. /mount is not specified in the Filesystem Hierarchy Standard (FHS).
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
A user is trying to access a file system mounted at /mnt/sdb1, but receives an error that states No such file or directory. Which commands can you use to see the current mount points? (Select TWO).
a. mount
b. mounts
c. mntchk
d. mntfs
e. df
what is
a. mount
e. df
Explanation
Use the mount command with no arguments to show all the current mount points. df will also show which file systems are mounted to what points.
The command fsck is used to check file systems but does not show the mount points. There are no commands called mounts, mntchk, or mntfs.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
Yesterday, you created a new swap area for your system. Today, after rebooting the system, you find that the swap area is not mounted. What should you do to ensure that the swap area is mounted each time the system boots?
a. Run the mount --auto command and identify the swap area partition.
b. Remount the swap area. Then run export mount to make the change persistent.
c. Edit /etc/mtab and add the swap partition.
d. Edit /etc/fstab and add the swap partition.
what is
d. Edit /etc/fstab and add the swap partition.
Explanation
To mount the swap area each time the system boots, edit the /etc/fstab file and add the swap area with the auto keyword.
/etc/mtab shows currently mounted volumes. /etc/inittab determines the default runlevel for the system and starts the appropriate daemons for that runlevel.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
You need to mount the CD-ROM device to the /media/cdrom directory. What command should you enter at the command prompt?
a. /mount
b. /root
c. mount /dev/cdrom /media/cdrom
what is
c. mount /dev/cdrom /media/cdrom
Explanation
Use mount /dev/cdrom /media/cdrom to mount the CD-ROM device to the /media/cdrom mount point. The /dev/cdrom device file name is just a symbolic link to the actual device (sr0), so mount /dev/sr0 /media/cdrom will also work.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use? (Select TWO).
a. umount /mnt/temp
b. umount /dev/sdb2
c. dismount /dev/sdb2
what is
a. umount /mnt/temp
b. umount /dev/sdb2
Explanation
Use umount to unmount a device. You can specify the device, /dev/sdb2, or the mount point, /mnt/temp.
There are no utilities called unmount or dismount in Linux.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
Which file shows the currently mounted volumes?
a. /etc/fstab
b. /etc/mtab
c. /etc/mount.conf
d. /etc/mount
what is
b. /etc/mtab
Explanation
The /etc/mtab file shows the currently mounted volumes.
/etc/fstab controls which volumes are mounted at boot. /etc/mount and /etc/mount.conf are not defined by FHS to show mounted filesystems.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
You have partitioned and formatted a new hard drive, sdc. You want to mount the first partition on sdc to directory /mnt/newdisk. Which command will perform the mount correctly?
a. mount /sdc1 /mnt/newdisk
b. mount /dev/sdc /mnt/newdisk
c. mount /dev/sdc1 /mnt/newdisk
what is
c. mount /dev/sdc1 /mnt/newdisk
Explanation
When mounting a device and partition, you specify the /dev directory and the device and partition you want to mount and then the mount point to mount the device to.
The correct format for mount is mount item and mount point. Devices are always in the /dev directory. There is no /dsk directory. Partitions on hard drives are numbered.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
You are preparing to mount a device local to your system. Which directory holds the device files?
a. /dev
b. /opt/dev
c. /local/devwhat is
a. /dev
Explanation
The files for devices are always stored in /dev according to the FHS.
The FHS does not define the directories /local/dev, /opt/dev or /devices for storing device files.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
Which of the following commands initializes a physical volume?
a. pvcreate
b. pvscan
c. lvcreate
d. vgcreate
what is
a. pvcreate
Explanation
The pvcreate command initializes physical volumes for later use by the Logical Volume Manager (LVM). LVM provides an alternative method to manage partitions on a Linux system. LVM gives a system administrator more flexibility in allocating storage on a system.
The pvscan command scans all disks for physical volumes and displays the result.
The vgcreate command creates a new volume group.
The lvcreate command creates a new logical volume in a volume group.
References
TestOut Linux Pro 5.0 - 8.3 Logical Volume Manager
You attempt to unmount a volume using the umount /dev/sdd3 command, but you receive a device is busy error message.
Which of the following strategies will be MOST likely to allow you to unmount the file system? (Select TWO).
a. Find and close any open files on the file system, and try to unmount again.
b. Make sure your current working directory is not on the file system and try to unmount again.
c. Perform a backup of the sdd3 device and try to unmount again.
what is
a. Find and close any open files on the file system, and try to unmount again.
b. Make sure your current working directory is not on the file system and try to unmount again.
Explanation
Some file systems will not allow you to unmount a file system if your current working directory is in that file system. The command lsof lists open files, and the pid that has the files open. This will allow you to close the file, or at least kill the process that has the file open.
There is no command called fscls. Editing /etc/fstab will not help to unmount a filesystem during the current session. A backup will not close a file that is open.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you add to the /etc/fstab file?
a. /dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto
b. /dev/cdrom /media/cdrom -t iso9660 ro,users,noauto
c. /dev/cdrom /media/cdrom -t iso9660 ro
what is
a. /dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto
Use /dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto to allow only the root user account to mount the CD-ROM device. -t iso9660 specifies the type as filesystem structure used on CD-ROMs. Be aware of the following mount options:
nouser allows only the root user to mount the volume.
noauto prevents the volume from being mounted automatically. Use this option for removable media.
ro mounts the volume read only.
user identifies a specific user who can mount the volume.
users allows any user to mount the volume.
rw mounts the volume read/write.
suid allows the SUID bit to be set on files in the volume. (nosuid disables this function.)
defaults uses the following default settings: rw, suid, dev, exec, auto, nouser, and async.
References
TestOut Linux Pro 5.0 - 8.5 Mounting File Systems
Which of the following commands creates a volume group named backup and initializes it by adding the third disk in a Linux system to the volume group?
a. pvcreate /dev/sdc backup
b. vgextend /dev/sdc backup
c. vgcreate backup /dev/sdc
d. lvcreate backup /dev/sdc
e. vgcreate /dev/sdc backup
what is
c. vgcreate backup /dev/sdc
Explanation
The vgcreate backup /dev/sdc command creates a volume group named backup on the third disk in the system. vgcreate is a Logical Volume Manager (LVM) command that creates volume groups. LVM provides an alternative method for managing partitions on a Linux system. LVM gives a system administrator more flexibility in allocating storage on a system.
The pvcreate command initializes physical volumes for later use by the Logical Volume Manager (LVM).
The pvscan command scans all disks for physical volumes and displays the result.
The lvcreate command creates a new logical volume in a volume group.
The vgextend command adds one or more initialized physical volumes to an existing volume group to extend its size.
References
TestOut Linux Pro 5.0 - 8.3 Logical Volume Manager