Linux Disk Management & Formatting
Linux Disk Management & Formatting
md 2024-01-19
lsblk
Displays information about block devices, their mount points, and sizes.
Creates a volume group named myvg using the physical volume /dev/sdb.
vgs
vgdisplay myvg
1/3
Linux Disk Management & Formatting.md 2024-01-19
Creates a logical volume named mylv with a size of 10GB in the volume group myvg.
lvs
Formats the logical volume /dev/myvg/mylv with the ext4 file system.
The /etc/fstab file contains information about disk drives and partitions. Edit it to automatically mount
partitions at boot.
Example entry:
sudo mount -a
2/3
Linux Disk Management & Formatting.md 2024-01-19
lvdisplay /dev/myvg/mynewlv
[myrepo]
name=My Custom Repository
baseurl=http://example.com/repo
enabled=1
gpgcheck=0
Add more examples with different repository configurations to /etc/yum.repos.d/ based on your specific
needs.
These commands and configurations provide a comprehensive guide for Linux disk management, covering
logical volume management (LVM), file system creation, mounting, and YUM repository configuration. Always
exercise caution when working with disk-related commands to avoid data loss.
3/3