Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I need help in Linux. The following are the questions. With what I have the most problems is writting the commands. Project 5-4 In

Hello, I need help in Linux. The following are the questions. With what I have the most problems is writting the commands.

Project 5-4

In this hands-on project, you configure the LVM to host two logical volumes using the space within. Next, you will format these logical volumes and mount them to the directory tree, as well as edit the /etc/fstab file to ensure that they are mounted at boot time.

At the terminal, become root by typing su - and press enter and provide LNXrocks! as the password.

At the command prompt, type pvdisplay and press Enter. You should see /dev/sda2 physical volume and the associated fedora VG (volume group).

At the command prompt, type pvcreate /dev/sda3 and press Enter. We just added a new PV (physical volume) for use with LVM (Logical Volume Manager).

At the command prompt, type pvdisplay and press Enter. You should see /dev/sda3 added as a new physical volume. Note the PV size and that it is not associated with any VG.

At the command prompt, type vgdisplay and press Enter. You will see the fedora VG that was associated with /dev/sda2 in step 2.

At the command prompt, type vgcreate vg00 /dev/sda3 and press Enter. We have now created a new volume group named vg00. We could have also added /dev/sda3 to the existing fedora VG by using the vgextend command.

At the command prompt, type vgdisplay and press Enter. You should see the new vg00 with 4GB of space available.

At the command prompt, type lvdisplay and press Enter. You will see the output for /, /home/ and swap LV (logical volume).

At the command prompt, type lvcreate -L 2GB -n volume1 vg00 and press Enter to create a 2GB logical volume called volume1 from the vg00 volume group.

At the command prompt, type lvcreate -l 100%FREE -n volume2 vg00 and press Enter to create a logical volume called volume2 from the vg00 volume group with the rest of the available space.

At the command prompt, type lvdisplay and press Enter. You should see the new volumes created in the vg00 volume group.

12.Provide screenshot(s) of steps 2 through 11.

At the command prompt, type mkfs.ext4 /dev/vg00/volume1 and press Enter to format the volume1 logical volume using the ext4 filesystem. Next, type mkfs.ext4 /dev/vg00/volume2 and press Enter to format the volume2 logical volume using the ext4 filesystem.

Create a directory named /volume1 to create a mount point for the volume1 logical volume. Next, create the directory /volume2 to create a mount point for the volume2 logical volume.

At the command prompt, type mount -t ext4 /dev/vg00/volume1 /volume1 and press Enter to mount the volume1 logical volume to the /volume1 mount point directory. Next, type mount -t ext4 /dev/vg00/volume2 /volume2 and press Enter to mount the volume2 logical volume to the /volume2 mount point directory.

Verify the directories are mounted using the mount command and grepfor string: volume. Verify both volumes are mounted.

17.Provide screenshot(s) of steps 13 through 16.

Usevimto modify /etc/fstab. Add the following lines to the bottom of the file, as shown below, to ensure that the volume1 and volume2 logical volumes are mounted at boot time:

/dev/vg00/volume1 /volume1 ext4 defaults 0 0

/dev/vg00/volume2 /volume2 ext4 defaults 0 0

Save your changes and quit the vim editor.

At the command prompt, type umount /volume1 /volume2and press Enter. Next type mount -a to read the /etc/fstab file and mount any directories that are not mounted (volume1 and volume2).

Verify the directories are mounted using the mount command and grepfor string: volume. Verify both volumes are mounted.

21.Provide screenshot

Project 5-5

In this hands-on project, you utilize features ofLVM to reduce a logical volume and add that space to another logical volume while the system is in use. You will utilize the df and du commands to see storage availability and directory sizes. Lastly, you will update the /etc/fstab file to ensure we remove the necessary logical volume.

At the terminal, become root by typing su - and press enter and provide LNXrocks! as the password.

At the command prompt, type lvdisplay and press Enter. You should see the volume1 and volume2 LVs. Lets say you wish you utilized all 4GB for /volume1 rather than splitting it with volume2. We can remove this LV and add the remaining space to /volume1.

At the command prompt, type df -h to see the mounted filesystems along with the relevant space output. Review the full size of the volume, the space used, and the remaining space left, and each mount point directory.

At the command prompt, type umount /volume2 and press Enter. Next type lvremove /dev/vg00/volume2 which is the LV path from step 2 (this would destroy anything on this LV). Next type vgdisplay and review the allocated PE size and the Free PE size. We now have 2GB freed up to add to /volume1.

At the command prompt, type lvextend -l +100%FREE /dev/vg00/volume1to extend the /volume1 LV with the 2GB we have free. Next type df -h /volume1 to review the size of the filesystem.Notice that the size is still 2GB. In order to utilize the added 2GB, we need to inform the partition that the ext4 filesystem grew. We do this with the following command: resize2fs /dev/mapper/vg00-volume1 and then run df -h again to verify the new size of the filesystem is 4GB.

Verify the VG output and the LV output with the vgdisplayandlvdisplay commands.

Use vimto modify /etc/fstab. Remove the line referring to /volume2 or comment it out with a #.

To review the available inodes on a filesystem (we can run out of inodes just as we can run out of free space on a filesystem) run df -i and review the output of max number, used, and free inodes.

To review the file size of all the top level directories under / run the following: du -hs /* and review the output.

10.Provide screenshot of step 2 through 9.

For 5-4, some Screenshots, for alot of them I got like an error or file does not exsist.

image text in transcribed

image text in transcribed

For 5-5 snapshots:

image text in transcribed

image text in transcribed

Fle Edit View Search Terminal Help gortegaogortegal -1$ su Password: root@gortegal - pvdisplay Physical volume dev/sdaz fedora gortegal 23.9 GiB / not usable 4.0 MiB yes (but full) 4.00 MiB 5888 PV Nan Pv Size Allocatable PE S12e Total PE Free PE Allocated PE PV UUID FVv62j-cu3F-Cvef-reGJ-0e56-DM2b-kglhJ5 [root@gortegal pvcreate /dev/sda3 Device /dev/sda3 not found (or ignored by filtering) [root@gortega1 -I# pvdisplay Physical volume PV Name VG Name PV 512e Allocatable PE Size Total PE Free PE Allocated PE PV UUIO dev/sda2 fedora gortegal 23.9 G1B / not usable 4.00 MiB yes (but full) 4.88 MiB 5888 5888 FVv62j cu3F Cvef reG]-0e56 DM2b kglhJ5 vgdisplay [root@gortega1-1# Volume group VG Nane System ID Fornat Metadata Areas Metadata Sequence No 4 fedora _gortegal l vm2 Fle Edit View Search Terminal Help gortegaogortegal -1$ su Password: root@gortegal - pvdisplay Physical volume dev/sdaz fedora gortegal 23.9 GiB / not usable 4.0 MiB yes (but full) 4.00 MiB 5888 PV Nan Pv Size Allocatable PE S12e Total PE Free PE Allocated PE PV UUID FVv62j-cu3F-Cvef-reGJ-0e56-DM2b-kglhJ5 [root@gortegal pvcreate /dev/sda3 Device /dev/sda3 not found (or ignored by filtering) [root@gortega1 -I# pvdisplay Physical volume PV Name VG Name PV 512e Allocatable PE Size Total PE Free PE Allocated PE PV UUIO dev/sda2 fedora gortegal 23.9 G1B / not usable 4.00 MiB yes (but full) 4.88 MiB 5888 5888 FVv62j cu3F Cvef reG]-0e56 DM2b kglhJ5 vgdisplay [root@gortega1-1# Volume group VG Nane System ID Fornat Metadata Areas Metadata Sequence No 4 fedora _gortegal l vm2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

=+b) Is this an example of the Law of Large Numbers? Explain.

Answered: 1 week ago

Question

=+15. Did you create a campaign that would create buzz?

Answered: 1 week ago

Question

=+9. Did you answer the consumer's question Why buy?

Answered: 1 week ago