- Home
- Server Administration
- LPIC-2 Linux Engineer 201
26.
You've just repartitioned a non - boot disk, added a swap partition to it ( /dev/sdb7 ), created
swap space on the partition, and added a suitable entry to /etc/fstab for the new swap
partition. How can you activate the new swap partition? (Select all that apply.)
- A.mount /dev/sdb7
- B.mkswap /dev/sdb7
- C.swapon /dev/sdb7
- D.swapon - a
- Answer & Explanation
- Report
Answer : [C, D]
Explanation :
Explanation :
The swapon command is the usual way to activate swap space. Option C's use of the command activates a single swap partition, /dev/sdb7 , and so satisfies the question's requirements. Option D's use of swapon activates all the swap spaces that are defined in /etc/fstab . Since the question specifies that such an entry has been created, option D will also work. Option A's mount command is used to mount filesystems; it's useless with swap space, and so is incorrect. Option B's mkswap command creates swap space, which the question specifies has already been done. Therefore, this option is unnecessary, and since it doesn't activate the swap space, it's incorrect. |
27.
What is the purpose of the /etc/mtab file?
- A.It describes the filesystems that are currently mounted, using syntax similar to that of /etc/fstab .
- B.It controls the filesystems that the automounter mounts in response to attempts to access empty subdirectories.
- C.It provides information on the UUID values and filesystem types contained in all partitions.
- D.It summarizes the filesystems currently available to the Linux kernel — that is, those you can mount.
- Answer & Explanation
- Report
Answer : [A]
Explanation :
Explanation :
Option A correctly describes the purpose of /etc/mtab . Option B describes the purpose of /etc/auto.master and other autofs configuration files, so this option is incorrect. Option C describes information that can be obtained from the blkid utility, but /etc/mtab will contain, at best, partial information of this type (it will specify filesystems used on mounted partitions, not all of them, and it won't have UUID information). Thus, option C is incorrect. Option D doesn't describe information contained in any Linux configuration file; however, typing lsmod will show loaded kernel filesystem modules (among other modules). In any event, option D is incorrect. |
28.
A network file server has become unavailable while your Linux computer was accessing
it at /mnt/remote . Now you want to unmount that share, but because the server has
disappeared, umount complains. Which of the following commands is most likely to
successfully unmount this unresponsive mount?
- A.umount - f /mnt/remote
- B.umount - a
- C.mount - o remount,ro /mnt/remote
- D.umount - - kill /mnt/remote
- Answer & Explanation
- Report
Answer : [A]
Explanation :
Explanation :
The - f option to umount forces an unmount operation when a remote server is inaccessible, so it's the appropriate response to the condition described in the question. Option B's command will unmount all filesystems in /etc/fstab , but it's no more likely to work at unmounting /mnt/remote than umount /mnt/remote . Unmounting all filesystems is also likely to have undesirable side effects. Option C's command will remount the network filesystem in read - only mode. If successful, this might be better than leaving it as - is, but it won't unmount the filesystem. Option D is fictitious; there is no - - kill option to umount. |
29.
What does the following command accomplish?
# mkfs.ext2 /dev/sda4
# mkfs.ext2 /dev/sda4
- A.It sets the partition table type code for /dev/sda4 to ext2 .
- B.It converts a FAT partition into an ext2fs partition without damaging the partition's existing files.
- C.It creates a new ext2 filesystem on /dev/sda4 , overwriting any existing filesystem and data.
- D.It checks the ext2 filesystem on /dev/sda4 for errors, correcting any that it finds.
- Answer & Explanation
- Report
Answer : [C]
Explanation :
Explanation :
The mkfs command creates a new filesystem, overwriting any existing data and therefore making existing files inaccessible. This command doesn't set the partition type code in the partition table. The fsck utility and its helpers check filesystems for errors. |
30.
Which of the following options is used with fsck to force it to use a particular filesystem
type?
- A.-A
- B.-N
- C.-t
- D.-C
- Answer & Explanation
- Report
Answer : [C]
Explanation :
Explanation :
The – t option is used to tell fsck what filesystem to use. Normally, fsck determines the filesystem type automatically. The – A option causes fsck to check all the filesystems marked to be checked in /etc/fstab . The – N option tells fsck to take no action and to display what it would normally do without doing it. The – C option displays a text - mode progress indicator of the check process. |