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

PPT
101 2.1 design hard disk layout
PPT
Unix Administration 4
PPT
101 4.1 create partitions and filesystems
PPT
4.1 create partitions and filesystems
PPTX
3 - Disk Partitioning in Red Hat
PDF
Rh202 q&a-demo-cert magic
PDF
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
PPSX
Logical volume manager xfs
101 2.1 design hard disk layout
Unix Administration 4
101 4.1 create partitions and filesystems
4.1 create partitions and filesystems
3 - Disk Partitioning in Red Hat
Rh202 q&a-demo-cert magic
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
Logical volume manager xfs

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

DOCX
EXP_2(20BCA1066 Internet).docx
PPT
Storage Management in Linux OS.ppt
PPTX
11 linux filesystem copy
PDF
RH302 Exam-Red Hat Linux Certification
PDF
RH302 Exam-Red Hat Linux Certification
PPT
101 4.1 create partitions and filesystems
PDF
Inspection and maintenance tools (Linux / OpenStack)
PPTX
Linux Survival Kit for Proof of Concept & Proof of Technology
PPTX
Advanced Level Training on Koha / TLS (ToT)
PPTX
Disk and File System Management in Linux
PDF
Real time systems
PPT
101 2.1 design hard disk layout v2
PDF
lvm logical volume management is a tool in Linux that allows you to manage st...
PDF
Root file system for embedded systems
PPT
2.1 design hard disk layout v2
PPT
Unix 6 en
PPTX
Linux Shell Scripting Presantion
PDF
Manage Basic Storage in RHEL - RHCSA (RH134).pdf
PPT
Linux
PPT
Linux filesystemhierarchy
EXP_2(20BCA1066 Internet).docx
Storage Management in Linux OS.ppt
11 linux filesystem copy
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
101 4.1 create partitions and filesystems
Inspection and maintenance tools (Linux / OpenStack)
Linux Survival Kit for Proof of Concept & Proof of Technology
Advanced Level Training on Koha / TLS (ToT)
Disk and File System Management in Linux
Real time systems
101 2.1 design hard disk layout v2
lvm logical volume management is a tool in Linux that allows you to manage st...
Root file system for embedded systems
2.1 design hard disk layout v2
Unix 6 en
Linux Shell Scripting Presantion
Manage Basic Storage in RHEL - RHCSA (RH134).pdf
Linux
Linux filesystemhierarchy
Ad

Recently uploaded (20)

PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Cell Types and Its function , kingdom of life
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Trump Administration's workforce development strategy
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Lesson notes of climatology university.
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
01-Introduction-to-Information-Management.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Cell Types and Its function , kingdom of life
STATICS OF THE RIGID BODIES Hibbelers.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Final Presentation General Medicine 03-08-2024.pptx
Complications of Minimal Access Surgery at WLH
2.FourierTransform-ShortQuestionswithAnswers.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Orientation - ARALprogram of Deped to the Parents.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Trump Administration's workforce development strategy
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
A systematic review of self-coping strategies used by university students to ...
Pharmacology of Heart Failure /Pharmacotherapy of CHF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Lesson notes of climatology university.
Ad

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