CA3

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

CA3

1) Project 1:Creating and Managing Logical Volumes with LVM As the


system administrator, you have received a request from a user
Ans:
Step 1: Creating Physical Disks
Virtual box -> settings -> storage
Add Physical disk of size (1GB, 3GB and 4GB )
Total physical disk size is = 1GB+3Gb+4GB
Verify using lsblk
Sdj,sdk,sdl are the physical disk added
Step 2 : Create physical volume (pv)
#pvcreate /dev/sdj /dev/sdk /dev/sdl
Step 3: Create Volume Group
# vgcreate AD /dev/sdj
# vgcreate AD /dev/sdk
# vgcreate AD /dev/sdl
Step4: Create Logical Volume
# lvcreate -n JOHN -L 5G AD
Step 5: Formate
# mkfs.xfs /dev/AD/JOHN
Step 6: mkdir mydisk
Step 7: nano /etc/fstaba
Step 8: add ( /dev/AD/JOHN /root/ROBIN xfs defaults 0 0 )
Step 9: Verify using mount -a
Step 10: lvresize +L 7G AD
Project 2: Setting Up Autofs for File Sharing between Server and
Client
Ans :
Step 1 : Server Side
Install nfs using { yum install nfs-utils}
Step 2: mkdir /share
Step 3: chown -R John:john /share
Step 4 : chmod -R 755 /share
Step 5: cd /share
Step 6: nano /share/textfile.txt
“This is a test file on the server”
Step 7: nano /etc/exports
/share clinetip(rw,sync)
Step 8: systemctl start nfs-server
Step 9: systemctl enable nfs-server

Client Side

Step 1 : apt-get install nfs-common


Step 2 : mkdir /mnt/share
Step 3: mount server_ip:/share /mnt/share
Step 4: ls /mnt/share
Step 5: nano /etc/fstab
Step 6 :server_ip:/share /mnt/share nfs defaults 0 0
Project 3: Managing Access Control for Linux Directory
Step1 : mkdir Linux
Step 2 : groupadd Section
Step 3 : setfacl -m g:Section:rwx Linux
Step 4: verify Getfacl Linux
Step 5 : groupadd Class
Step 6: setfacl -m g:Class:rwx Linux
Step 7 : useradd -m -G Class Manoj
Step 8: useradd -m -G Section Student
Step 9: set passwd
Step 10 : setfacl -m u:Manoj:0 Linux
Step11 : setfacl -d -m g:Class:rwx Linux
Step 12 : chmod -R g+rwz Linux
Step 13 : chmod -R o-rwx Linux

You might also like