SlideShare a Scribd company logo
Configuring Local Storage
& Filesystems
PRINCE BAJAJ 1
Objectives
❖List, create, delete partitions on MBR and GPT disks
❖Create and remove physical volumes
❖Assign physical volumes to volume groups
❖Create and delete logical volumes
❖Configure systems to mount file systems at boot by universally unique ID (UUID) or label
❖Add new partitions and logical volumes, and swap to a system non-destructively
❖Create and configure file systems
❖Create, mount, unmount, and use vfat, ext4, and xfs file systems
❖Mount and unmount network file systems using NFS
❖Extend existing logical volumes
❖Create and configure set-GID directories for collaboration
PRINCE BAJAJ 2
Introducing Standard Partitions and Filesystems
Step1 : Create partition(fdisk)
Step2: Create filesystem(mkfs)
Step3 : Mount filesystem(mount or fstab entry for persistent mount)
PRINCE BAJAJ
Partition1
ext2
Partition2
ext3
Partition3
ext4
Partition3
ext4
Partition1
ext2
Partition2
ext3
Mount Point Directory Dir1
Mount Point Directory Dir3
Mount Point Directory Dir2
Step 1 & 2
Step 3
MBR Partitioning Layout - 15 Partitions (3 Primary, 12 Logical)
GPT Partitioning Layout - 128 Partitions 3
Introducing Logical Volumes (LVM’s)
Step1 – Create physical volume from disks or partitions (pvcreate)
Step2- Create volume group using physical volume(s)(vgcreate)
Step3 – Create logical volume (lvcreate)
Step4- Create filesystem on logical volume (mkfs)
Step5- Mount file system on mount point(mount or fstab entry for persistent mount)
PRINCE BAJAJ
/dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4
Volume Group – VG1 Volume Group- VG2
Logical Vol1 Logical Vol2
Physical Volume1 Physical volume2
4
❑ Create a standard disk partition of 1 GiB size and mount this on /mnt/partition directory.
• Partition should use xfs file system.
• Mount should be persistent.
PRINCE BAJAJ
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n , Second input : e , Two times Enter(To assign remaining
space for Logical partitions) ,Third input : n , Enter (Default First
sector),Fourth input: +1G ,wq (to save and quit)
To create container for extended partition (Container) and to create
logical partition of size 1 Gib
partprobe To inform kernel about this partition
mkdir /mnt/partition To create mount directory
mkfs.xfs /dev/sda5 To create xfs filesystem on partition
mount /dev/sda5 /mnt/partition To test mounting filesystem temporarily
mount To verify mounted filesystem
vim /etc/fstab
/dev/sda5 /mnt/partition xfs defaults 0 0
:wq
To mount filesystem persistently (to persist across reboot)
mount -a To mount through fstab
lsblk To list block devices
5
❑ Create a disk partition of size 1 GiB and mount this for read only access on /mnt/fat directory.
• Use vfat file system for the partition.
• Mount should be persistent.
PRINCE BAJAJ
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n ,Enter(Default First sector), Second input : +1G, Enter ,w (to save and
quit)
To create logical partition of 1 GiB size
partprobe To inform kernel about this partition
mkdir /mnt/fat To create mount point directory
mkfs.vfat /dev/sda6 To create vfat filesystem on partition
mount -o ro /dev/sda6 /mnt/fat To test mounting filesystem
mount To verify mounted filesystem
vim /etc/fstab
/dev/sda6 /mnt/fat vfat ro 0 0
:wq
To mount filesystem persistently
lsblk To list block devices
6
❑Configure and add 1 GiB swap space to your System.
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n ,Enter, Enter (Default First sector), Second input : +1G , Enter, Third
input : t ,Enter ,Enter( for default Partition),Fourth input : 82 ,Enter, w (to save and
quit),Enter
To create logical partition of 1 GiB size of
type Linux swap
partprobe To inform kernel about these changes
mkswap /dev/sda7 To configure partition as swap
vim /etc/fstab
/dev/sda7 swap swap defaults 0 0
:wq
Make entry in fstab file
swapon -a To activate swap as per entry in fstab
free -m To verify added swap memory
7
❑Configure logical volume with name lv_volume which should use 200 MiB from volume group vg_group of size 300 MiB.
• ext4 file system should be used
• Mount this on /mnt/log_vol directory and mount should be persistent.
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n ,Enter,Enter (Default first sector) , Second input :+300M ,Enter, Third input :
t,Enter,Enter( for default Partition),Fourth input : 8e ,Enter,w (to save and quit),Enter
To create logical partition of size 300 MiB with type Linux
LVM
partprobe To inform kernel about this partition
pvcreate /dev/sda8 To create physical volume
vgcreate vg_group /dev/sda8 To create volume group from physical volume
lvcreate -n lv_volume -L 200M vg_group To create logical volume on volume group
mkdir /mnt/log_vol To create mount directory
mkfs -t ext4 /dev/vg_group/lv_volume To create ext4 filesystem on logical volume
mount /dev/vg_group/lv_volume /mnt/log_vol To mount filesystem temporarily using mount
mount To verify mounted filesystem
vim /etc/fstab
/dev/vg_group/lv_volume /mnt/log_vol ext4 defaults 0 0
:wq
Make entry in fstab to mount filesystem persistently
mount -a To mount through fstab
8
❑Configure logical volume with name volume which should use 20 PE’s from volume group named group of size 400 MiB.
• Size of PE should be 16 MiB and file system used must be ext4 file system.
• Mount this on /mnt/volume directory and mount should be persistent.
• Use UUID to mount this.
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n ,Enter,Enter (Default first sector), Second input : +400M ,Enter, Third input : t,
Enter, Enter( for default Partition),Fourth input : 8e ,Enter, w (to save and quit),Enter
To create logical partition
partprobe To inform kernel about changes
pvcreate /dev/sda9 To create physical volume
vgcreate -s 16M group /dev/sda9 To create volume group with PE size of 16 MiB
lvcreate -n volume -l 20 group To create logical volume using 20 PE’s from volume group
mkdir /mnt/volume To create mount point
mkfs.ext4 /dev/group/volume To create ext4 filesystem on logical volume
mount /dev/group/volume /mnt/volume To mount filesystem in runtime
mount To verify mounted filesystem
vim /etc/fstab
UUID =? /mnt/volume ext4 defaults 0 0
:wq
To mount persistently through fstab
mount -a To verify mounted filesystem 9
❑Configure logical volume with name lvm from volume group vgroup of size 512 MiB.
• Logical volume should use complete free space on volume group.
• Create ext4 file system on this volume.
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n Enter,Enter(Default first sector), Second input : +512M ,Enter, Third
input : t ,Enter,Enter (Default partition), Fourth input : 8e,Enter ,w (to save and
quit),Enter
To create logical partition of type Linux LVM
pvcreate /dev/sda10 To create physical volume
vgcreate vgroup /dev/sda10 To create volume group
lvcreate -n lvm -l 100%FREE vgroup To create logical volume using all space of
volume group
mkfs.ext4 /dev/vgroup/lvm To create ext4 filesystem
lvdisplay To display logical volume(s)
vgdisplay To display volume group(s)
pvdisplay To display physical volume(s)
10
❑Resize the lvm lv_volume so that after reboot size should be in between 230MiB to 260 MiB.
• Make sure complete logical volume should be usable.
PRINCE BAJAJ
Command Action/Description
lvdisplay To display logical volumes
lvextend -r -L +45M /dev/vg_group/lv_volume To extent logical volume and resize the filesystem
11
❑Extend size of LVM with name lvm by 256 MiB.
• Create new partition to increase the size of volume group.
• Format the complete volume with ext4 file system.
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n ,Enter, Enter (Default first sector),Second input :
+300M , Enter,Third input : t ,Enter ,Enter(Default partition)
Fourth input : 8e ,Enter, w (to save and quit),Enter
To create logical partition of type Linux LVM
pvcreate /dev/sda11 To create physical volume
vgextend vgroup /dev/sda11 To extend volume group
lvextend -r -L +256M /dev/vgroup/lvm To extend logical volume
lvdisplay To display logical volume(s)
12
❑Create a standard partition of size 100 MiB and format this with ext4 file system.
• Change the file system to xfs and verify same.
PRINCE BAJAJ
Command Action/Description
fdisk /dev/sda
First input : n ,Enter,Enter(To select default first sector),
Second input :+100MiB ,Enter, w (to save and quit),Enter
To create partition (Logical partition) of 100 MiB size
partprobe To inform kernel about partition table changes
mkfs.ext4 /dev/sda12 To create ext4 filesystem on partition
mkfs.xfs -f /dev/sda12 To change the filesystem type to xfs or to create xfs filesystem
blkid To verify changes
13
❑Create a directory /private/home.
• Set the user ownership to lisa and group ownership to group.
• Give full permissions to group group on this directory.
• User riya should have no access on this directory.
• Add user’s bob and harry to group group.
• Files created by user bob and harry under this directory should have group ownership set to group.
PRINCE BAJAJ
Command Action/Description
mkdir -p /private/home Creating directory path /private/home
chown lisa:group /private/home Changing user and group ownership
chmod g+rwx /private/home Configuring full permissions at group level
setfacl -m u:riya:- /private/home Removing all permissions for user riya
usermod -aG group bob & usermod -aG group harry Adding users to group group
chmod g+s /private/home To set GID bit
getfacl /home/private To display configured access control lists
14
❑Discover the NFS share exported by NFS server ipaserver.example.com.
• Mount the share /nfsshare on directory /nfs/share and mount should be persistent.
• NFS version 3 should be used.
PRINCE BAJAJ
Command Action Description
dnf group install “Network File System Client” Installing NFS client
showmount -e ipaserver.example.com Discovering NFS exports
mkdir -p /nfs/share Creating mount point directory
mount -o nfsvers=3 ipaserver.example.com:/nfshare /nfs/share Mounting NFS share in run time
umount /nfs/share Unmounting NFS share
vim /etc/fstab
ipaserver.example.com:/nfsshare /nfs/share nfs _netdev,nfsvers=3 0 0
:wq
Making entry in fstab file for persistent mount
mount -a Mounting through fstab
mount Verifying the mounted filesystem and version
15
❑Discover the samba share and mount share samba on /samba/smb1 directory with smb1 user.
• Use the password password to mount this share.
PRINCE BAJAJ
Command Action/Description
dnf install samba-client cifs-utils Installing Samba client
smbclient -L ipaserver.example.com Listing Samba shares
mkdir -p /samba/smb1 Creating mount point directory
mount -o username=smb1 //ipaserver.example.com/samba /samba/smb1
Enter the Samba user password : *********
Mounting share in runtime
umount /samba/smb1 Unmounting share
vim /etc/fstab
//ipaserver.example.com/samba /samba/smb1 cifs _netdev,username=smb1,password=password
0 0
:wq
Making entry in fstab file for
persistent mount
mount -a Mounting through fstab
mount Verifying mounted share
16

More Related Content

Similar to Configuring+Disks+and+Filsystems-pdf.pdf

EXP_2(20BCA1066 Internet).docx
EXP_2(20BCA1066 Internet).docxEXP_2(20BCA1066 Internet).docx
EXP_2(20BCA1066 Internet).docx
ApkaAmitbro
 
Storage Management in Linux OS.ppt
Storage Management in Linux OS.pptStorage Management in Linux OS.ppt
Storage Management in Linux OS.ppt
Rakesh Kadu
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
Shay Cohen
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
Isabella789
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
Isabella789
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
Acácio Oliveira
 
Inspection and maintenance tools (Linux / OpenStack)
Inspection and maintenance tools (Linux / OpenStack)Inspection and maintenance tools (Linux / OpenStack)
Inspection and maintenance tools (Linux / OpenStack)
Gerard Braad
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
Nugroho Gito
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
Ata Rehman
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
Henry Osborne
 
Real time systems
Real time systemsReal time systems
Real time systems
Said Benaissa
 
101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2
Acácio Oliveira
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
alok pal
 
2.1 design hard disk layout v2
2.1 design hard disk layout v22.1 design hard disk layout v2
2.1 design hard disk layout v2
Acácio Oliveira
 
Linux Shell Scripting Presantion
Linux Shell Scripting PresantionLinux Shell Scripting Presantion
Linux Shell Scripting Presantion
SameerNimkar
 

Similar to Configuring+Disks+and+Filsystems-pdf.pdf (20)

EXP_2(20BCA1066 Internet).docx
EXP_2(20BCA1066 Internet).docxEXP_2(20BCA1066 Internet).docx
EXP_2(20BCA1066 Internet).docx
 
Storage Management in Linux OS.ppt
Storage Management in Linux OS.pptStorage Management in Linux OS.ppt
Storage Management in Linux OS.ppt
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
 
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
 
Inspection and maintenance tools (Linux / OpenStack)
Inspection and maintenance tools (Linux / OpenStack)Inspection and maintenance tools (Linux / OpenStack)
Inspection and maintenance tools (Linux / OpenStack)
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
Real time systems
Real time systemsReal time systems
Real time systems
 
101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 
2.1 design hard disk layout v2
2.1 design hard disk layout v22.1 design hard disk layout v2
2.1 design hard disk layout v2
 
Unix 6 en
Unix 6 enUnix 6 en
Unix 6 en
 
Linux Shell Scripting Presantion
Linux Shell Scripting PresantionLinux Shell Scripting Presantion
Linux Shell Scripting Presantion
 
Linux
Linux Linux
Linux
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Ch12 system administration
Ch12 system administration Ch12 system administration
Ch12 system administration
 
Ch12
Ch12Ch12
Ch12
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 

Recently uploaded (20)

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 

Configuring+Disks+and+Filsystems-pdf.pdf

  • 1. Configuring Local Storage & Filesystems PRINCE BAJAJ 1
  • 2. Objectives ❖List, create, delete partitions on MBR and GPT disks ❖Create and remove physical volumes ❖Assign physical volumes to volume groups ❖Create and delete logical volumes ❖Configure systems to mount file systems at boot by universally unique ID (UUID) or label ❖Add new partitions and logical volumes, and swap to a system non-destructively ❖Create and configure file systems ❖Create, mount, unmount, and use vfat, ext4, and xfs file systems ❖Mount and unmount network file systems using NFS ❖Extend existing logical volumes ❖Create and configure set-GID directories for collaboration PRINCE BAJAJ 2
  • 3. Introducing Standard Partitions and Filesystems Step1 : Create partition(fdisk) Step2: Create filesystem(mkfs) Step3 : Mount filesystem(mount or fstab entry for persistent mount) PRINCE BAJAJ Partition1 ext2 Partition2 ext3 Partition3 ext4 Partition3 ext4 Partition1 ext2 Partition2 ext3 Mount Point Directory Dir1 Mount Point Directory Dir3 Mount Point Directory Dir2 Step 1 & 2 Step 3 MBR Partitioning Layout - 15 Partitions (3 Primary, 12 Logical) GPT Partitioning Layout - 128 Partitions 3
  • 4. Introducing Logical Volumes (LVM’s) Step1 – Create physical volume from disks or partitions (pvcreate) Step2- Create volume group using physical volume(s)(vgcreate) Step3 – Create logical volume (lvcreate) Step4- Create filesystem on logical volume (mkfs) Step5- Mount file system on mount point(mount or fstab entry for persistent mount) PRINCE BAJAJ /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 Volume Group – VG1 Volume Group- VG2 Logical Vol1 Logical Vol2 Physical Volume1 Physical volume2 4
  • 5. ❑ Create a standard disk partition of 1 GiB size and mount this on /mnt/partition directory. • Partition should use xfs file system. • Mount should be persistent. PRINCE BAJAJ PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n , Second input : e , Two times Enter(To assign remaining space for Logical partitions) ,Third input : n , Enter (Default First sector),Fourth input: +1G ,wq (to save and quit) To create container for extended partition (Container) and to create logical partition of size 1 Gib partprobe To inform kernel about this partition mkdir /mnt/partition To create mount directory mkfs.xfs /dev/sda5 To create xfs filesystem on partition mount /dev/sda5 /mnt/partition To test mounting filesystem temporarily mount To verify mounted filesystem vim /etc/fstab /dev/sda5 /mnt/partition xfs defaults 0 0 :wq To mount filesystem persistently (to persist across reboot) mount -a To mount through fstab lsblk To list block devices 5
  • 6. ❑ Create a disk partition of size 1 GiB and mount this for read only access on /mnt/fat directory. • Use vfat file system for the partition. • Mount should be persistent. PRINCE BAJAJ PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n ,Enter(Default First sector), Second input : +1G, Enter ,w (to save and quit) To create logical partition of 1 GiB size partprobe To inform kernel about this partition mkdir /mnt/fat To create mount point directory mkfs.vfat /dev/sda6 To create vfat filesystem on partition mount -o ro /dev/sda6 /mnt/fat To test mounting filesystem mount To verify mounted filesystem vim /etc/fstab /dev/sda6 /mnt/fat vfat ro 0 0 :wq To mount filesystem persistently lsblk To list block devices 6
  • 7. ❑Configure and add 1 GiB swap space to your System. PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n ,Enter, Enter (Default First sector), Second input : +1G , Enter, Third input : t ,Enter ,Enter( for default Partition),Fourth input : 82 ,Enter, w (to save and quit),Enter To create logical partition of 1 GiB size of type Linux swap partprobe To inform kernel about these changes mkswap /dev/sda7 To configure partition as swap vim /etc/fstab /dev/sda7 swap swap defaults 0 0 :wq Make entry in fstab file swapon -a To activate swap as per entry in fstab free -m To verify added swap memory 7
  • 8. ❑Configure logical volume with name lv_volume which should use 200 MiB from volume group vg_group of size 300 MiB. • ext4 file system should be used • Mount this on /mnt/log_vol directory and mount should be persistent. PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n ,Enter,Enter (Default first sector) , Second input :+300M ,Enter, Third input : t,Enter,Enter( for default Partition),Fourth input : 8e ,Enter,w (to save and quit),Enter To create logical partition of size 300 MiB with type Linux LVM partprobe To inform kernel about this partition pvcreate /dev/sda8 To create physical volume vgcreate vg_group /dev/sda8 To create volume group from physical volume lvcreate -n lv_volume -L 200M vg_group To create logical volume on volume group mkdir /mnt/log_vol To create mount directory mkfs -t ext4 /dev/vg_group/lv_volume To create ext4 filesystem on logical volume mount /dev/vg_group/lv_volume /mnt/log_vol To mount filesystem temporarily using mount mount To verify mounted filesystem vim /etc/fstab /dev/vg_group/lv_volume /mnt/log_vol ext4 defaults 0 0 :wq Make entry in fstab to mount filesystem persistently mount -a To mount through fstab 8
  • 9. ❑Configure logical volume with name volume which should use 20 PE’s from volume group named group of size 400 MiB. • Size of PE should be 16 MiB and file system used must be ext4 file system. • Mount this on /mnt/volume directory and mount should be persistent. • Use UUID to mount this. PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n ,Enter,Enter (Default first sector), Second input : +400M ,Enter, Third input : t, Enter, Enter( for default Partition),Fourth input : 8e ,Enter, w (to save and quit),Enter To create logical partition partprobe To inform kernel about changes pvcreate /dev/sda9 To create physical volume vgcreate -s 16M group /dev/sda9 To create volume group with PE size of 16 MiB lvcreate -n volume -l 20 group To create logical volume using 20 PE’s from volume group mkdir /mnt/volume To create mount point mkfs.ext4 /dev/group/volume To create ext4 filesystem on logical volume mount /dev/group/volume /mnt/volume To mount filesystem in runtime mount To verify mounted filesystem vim /etc/fstab UUID =? /mnt/volume ext4 defaults 0 0 :wq To mount persistently through fstab mount -a To verify mounted filesystem 9
  • 10. ❑Configure logical volume with name lvm from volume group vgroup of size 512 MiB. • Logical volume should use complete free space on volume group. • Create ext4 file system on this volume. PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n Enter,Enter(Default first sector), Second input : +512M ,Enter, Third input : t ,Enter,Enter (Default partition), Fourth input : 8e,Enter ,w (to save and quit),Enter To create logical partition of type Linux LVM pvcreate /dev/sda10 To create physical volume vgcreate vgroup /dev/sda10 To create volume group lvcreate -n lvm -l 100%FREE vgroup To create logical volume using all space of volume group mkfs.ext4 /dev/vgroup/lvm To create ext4 filesystem lvdisplay To display logical volume(s) vgdisplay To display volume group(s) pvdisplay To display physical volume(s) 10
  • 11. ❑Resize the lvm lv_volume so that after reboot size should be in between 230MiB to 260 MiB. • Make sure complete logical volume should be usable. PRINCE BAJAJ Command Action/Description lvdisplay To display logical volumes lvextend -r -L +45M /dev/vg_group/lv_volume To extent logical volume and resize the filesystem 11
  • 12. ❑Extend size of LVM with name lvm by 256 MiB. • Create new partition to increase the size of volume group. • Format the complete volume with ext4 file system. PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n ,Enter, Enter (Default first sector),Second input : +300M , Enter,Third input : t ,Enter ,Enter(Default partition) Fourth input : 8e ,Enter, w (to save and quit),Enter To create logical partition of type Linux LVM pvcreate /dev/sda11 To create physical volume vgextend vgroup /dev/sda11 To extend volume group lvextend -r -L +256M /dev/vgroup/lvm To extend logical volume lvdisplay To display logical volume(s) 12
  • 13. ❑Create a standard partition of size 100 MiB and format this with ext4 file system. • Change the file system to xfs and verify same. PRINCE BAJAJ Command Action/Description fdisk /dev/sda First input : n ,Enter,Enter(To select default first sector), Second input :+100MiB ,Enter, w (to save and quit),Enter To create partition (Logical partition) of 100 MiB size partprobe To inform kernel about partition table changes mkfs.ext4 /dev/sda12 To create ext4 filesystem on partition mkfs.xfs -f /dev/sda12 To change the filesystem type to xfs or to create xfs filesystem blkid To verify changes 13
  • 14. ❑Create a directory /private/home. • Set the user ownership to lisa and group ownership to group. • Give full permissions to group group on this directory. • User riya should have no access on this directory. • Add user’s bob and harry to group group. • Files created by user bob and harry under this directory should have group ownership set to group. PRINCE BAJAJ Command Action/Description mkdir -p /private/home Creating directory path /private/home chown lisa:group /private/home Changing user and group ownership chmod g+rwx /private/home Configuring full permissions at group level setfacl -m u:riya:- /private/home Removing all permissions for user riya usermod -aG group bob & usermod -aG group harry Adding users to group group chmod g+s /private/home To set GID bit getfacl /home/private To display configured access control lists 14
  • 15. ❑Discover the NFS share exported by NFS server ipaserver.example.com. • Mount the share /nfsshare on directory /nfs/share and mount should be persistent. • NFS version 3 should be used. PRINCE BAJAJ Command Action Description dnf group install “Network File System Client” Installing NFS client showmount -e ipaserver.example.com Discovering NFS exports mkdir -p /nfs/share Creating mount point directory mount -o nfsvers=3 ipaserver.example.com:/nfshare /nfs/share Mounting NFS share in run time umount /nfs/share Unmounting NFS share vim /etc/fstab ipaserver.example.com:/nfsshare /nfs/share nfs _netdev,nfsvers=3 0 0 :wq Making entry in fstab file for persistent mount mount -a Mounting through fstab mount Verifying the mounted filesystem and version 15
  • 16. ❑Discover the samba share and mount share samba on /samba/smb1 directory with smb1 user. • Use the password password to mount this share. PRINCE BAJAJ Command Action/Description dnf install samba-client cifs-utils Installing Samba client smbclient -L ipaserver.example.com Listing Samba shares mkdir -p /samba/smb1 Creating mount point directory mount -o username=smb1 //ipaserver.example.com/samba /samba/smb1 Enter the Samba user password : ********* Mounting share in runtime umount /samba/smb1 Unmounting share vim /etc/fstab //ipaserver.example.com/samba /samba/smb1 cifs _netdev,username=smb1,password=password 0 0 :wq Making entry in fstab file for persistent mount mount -a Mounting through fstab mount Verifying mounted share 16