Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Project 5-1

In this hands-on project, you view and create device files.

1 {check}

Boot your Fedora Linux virtual machine. After your Linux system has loaded, switch to a command-line
terminal (tty5) by pressing Ctrl+Alt+F5. Log in to the terminal using the user name of root and the
password of LINUXrocks!.

2 This is a character device file, Because there is a C in front of the Chmod sequence. The major number is 4 and
the minor number is 6

At the command prompt, type ls –l /dev/tty6 and press Enter. What device does /dev/tty6
represent? Is this file a block or character device file? Why? What are the major and minor numbers for
this file?

3 No, it was not removed. Permission was denied.


At the command prompt, type rm –f /dev/tty6 and press Enter. Next, type ls –l /dev/tty6 at
the command prompt and press Enter. Was the file removed successfully?

4 Yes, I was able to successfully log-in

Switch to tty6 by pressing Ctrl+Alt+F6 and attempt to log in to the terminal using the user name of root
and the password of LINUXrocks!. Were you successful?

5 This command let me know that the file exist. Yes, the file was recreated successfully.

Switch back to tty5 by pressing Ctrl+Alt+F5, type the command mknod /dev/tty6 c 4 6 at the
command prompt, and press Enter. What did this command do? Next, type ls –l /dev/tty6 at the
command prompt and press Enter. Was the file re-created successfully?

6 Because I log in previously.

Switch back to tty6 by pressing Ctrl+Alt+F6 and log in to the terminal using the user name of root and
the password of LINUXrocks!. Why were you successful?

7 The major is similar for all these files. The major is the same. The minor is different for each file. The reason for
it being different is so that we can differentiate which files belong where.

At the command prompt, type ls –l /dev/tty? and press Enter. What is similar about all of these
files? Is the major number different for each file? Is the minor number different for each file? Why?

8 Yes, there is many files. The size was stated as 0.

At the command prompt, type find /dev and press Enter to list all of the filenames under the /dev
directory. Are there many files? Next, type du –s /dev at the command prompt and press Enter. How
large in kilobytes are all files within the /dev directory? Why?

This study source was downloaded by 100000849283388 from CourseHero.com on 06-30-2022 22:38:47 GMT -05:00

https://www.coursehero.com/file/56834372/Project-5-bdocx/
9 Major number 4: /dev/vc/0 & tty. Major number 5: /dev/tty , /dev/console & /dev/ptmx are present on my
system. Tty has a major number 4. The major for steps 2 is the same.

At the command prompt, type less /proc/devices and press Enter. Which devices and major
numbers are present on your system? What character devices have a major number of 4? How does this
compare with what you observed in Step 2? Press q to exit the less utility when finished.

10 check
Type exit and press Enter to log out of your shell.

[BONUS] Project 5-5


In this hands-on project, you view disk usage and check filesystems for errors.

1 check

Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user
name of root and the password of LINUXrocks!.

2 I don’t see any swap partition.

At the command prompt, type df -hT and press Enter. What nonvirtual filesystems are displayed? Can
you see the swap partition? Why?

3 The terminal state: couldn’t find valid filesystem

At the command prompt, type dumpe2fs –h /dev/vg00/newdata | more and press Enter. How
many inodes are available to this filesystem? How many inodes are free to be used? Why?

4 Possibly non-existent device was displayed.


At the command prompt, type fsck /dev/vg00/newdata and press

Enter. What error message do you receive and why?

5 The file check was quick.

At the command prompt, type umount /newdata and press Enter. Next, type fsck
/dev/vg00/newdata and press Enter. How long did the filesystem check take and why?

6 The check was quick.


At the command prompt, type fsck –f /dev/vg00/newdata and

press Enter. How long did the filesystem check take and why?

7 It display less info than the previous entry.

At the command prompt, type e2fsck –c /dev/vg00/newdata and press Enter. What does this
command do?

8 Still can’t find any valid filesystem. Not sure if this is a good idea.

This study source was downloaded by 100000849283388 from CourseHero.com on 06-30-2022 22:38:47 GMT -05:00

https://www.coursehero.com/file/56834372/Project-5-bdocx/
At the command prompt, type tune2fs –i 0 /dev/vg00/newdata and press Enter to change the
interval for forced checks such that they are avoided. Is this a good idea for the ext4 filesystem? Why?

9 I don’t see the filesystem mounted correctly.

At the command prompt, type mount /dev/vg00/newdata and press Enter. Next, type the df -hT
command and press Enter to verify that the filesystem was mounted correctly. Why did the mount
command work even though you didn’t specify the mount point directory?

10 check
Type exit and press Enter to log out of your shell.

Discovery Excercise

1. Answer the following questions regarding your system using the commands listed in this chapter. For
each question, write the command you used to obtain the answer. If there are multiple commands that
can be used to obtain the answer, list all of the commands available.

a) What are the total number of inodes in the root filesystem? How many are currently utilized?
How many are available for use?

b) What filesystems are currently mounted on your system?

c) What filesystems are available to be mounted on your system?

d) What filesystems will be automatically mounted at boot time?

Answer: (a) Those file system command as given below:

Dumpe2fs -h /root dumpe2fs /root dumpe2fs -h /dev/sda1

(b) These are currently mounted on my system:

Mount/etc/mtab & cat /etc/mtab

(c) These are available to be mounted on my system:

Cat /etc/fstab

(d) These filesystems will be automatically mounted at boot time:

Cat /etc/fstab

3.Provided that your virtualization software allows for USB device pass-through, connect a USB flash
memory drive to your system. Use the appropriate commands to locate the device file used by the device,
mount the filesystem to a directory of your choice, and check the filesystem for errors. Finally, add a line to
/etc/fstab to ensure that the filesystem can be easily mounted in the future (this line should not automount
the filesystem at boot time).

This study source was downloaded by 100000849283388 from CourseHero.com on 06-30-2022 22:38:47 GMT -05:00

https://www.coursehero.com/file/56834372/Project-5-bdocx/
Step 1) First I found the mounted flash drive detail by typing ls -l /dev/s* . Now I found the flash
drive with sdc1. I added cat to the /etc/fstab line. cat /etc/fstab.

Step 2) The system stated “no mount point define so auto mount will not be done during boot
time.

4.Provided that your virtualization software supports the creation of NVMe SSDs, attach an NVMe
controller and SSD to your virtual machine and create a partition within the first namespace that is
formatted using XFS. Next, create a mount point directory for it called /SSD and mount your new
filesystem to this directory, ensuring that it is mounted automatically by UUID at boot time from the
appropriate entry within /etc/fstab. Note that Oracle VirtualBox requires that you first download and install
the Oracle VirtualBox Extension Pack in order to obtain NVMe support.

5.Use the Internet to gather information on four filesystems compatible with Linux. For each filesystem, list
the situations for which the filesystem was designed and the key features that the filesystem provides.

Filesytems compatible with linux Situations for which filesystems Key features that the filesystem
was designed provides.

Ext 4 Was developed as the It provides features for large


successor of ext3 filesystems, performance,
increased limits, and reliability.

Oracle Cluster Filesystem Designed specifically for Oracle It eliminates the requirement for
Real Application Cluster. Oracle database files to be
linked to logical drivers.

This study source was downloaded by 100000849283388 from CourseHero.com on 06-30-2022 22:38:47 GMT -05:00

https://www.coursehero.com/file/56834372/Project-5-bdocx/
XFS Designed for high scalability Provides near native I/O
performance even when the file
system spans multiple storage
devices.

Design as the next generation general-purpose file system that


Ocfs2 of the Oracle Cluster File can be used for shared Oracle
System for Linux. home installations making
management of Oracle Real
Application Cluster (RAC)
installations even easier.

This study source was downloaded by 100000849283388 from CourseHero.com on 06-30-2022 22:38:47 GMT -05:00

https://www.coursehero.com/file/56834372/Project-5-bdocx/
Powered by TCPDF (www.tcpdf.org)

You might also like