Storage Management in linux
Add new disk to Linux:(Disk Management)
1.Traditionl fdisk
2. LVM
Start reading those 4 blogs to cover all topics:
Create partitions: here
Extend partitions: here
Delete partitions: here
Logical volume manager: here
dditional points I would like to add in lvm are:
- If you create partions using method one, then you need to pass option of parttions in pvcreate
- Eg: pvcreate /dev/sdb1 /dev/sdc1(Instead of /dev/sdb and /dev/sdc)
- If you follow method 1 for creating partitions, don't forget to use 'partprobe' command after creating partions using fdisk, because kernel shoud know the partions created.
Extending LVMs: here
1.Traditionl fdisk
Clear video: here and clear notes here and very imp notes here(Creating logical partions using extended partitions)
- In MBR partition scheme it allows us to create a maximum of 4 partitions only, in order to create more partition we have to choose the extended partition, from this extended partition we can create more logical partitions.(max 15 Logical partitions we can create).
- You cannot create a file system on the extended partition because it cannot be used to hold the data, Logical partitions are used to store the data, so we have to format the logical partitions with the supported filesystem type.
- You cannot install os on extended partion.It should be installed on primary partition only.
- After, adding harddisk to vm, kernel doesn't recognize it in most cases.So you need to reboot or follow instructions followed in this blog
lsblklists all mass storage devices and partitions on them, including mounted file systems, unmounted file systems and devices without any file system.df'reports file system disk space usage', which means that it lists mounted file systems and also file systems in RAM.
2. LVM
Differernces:
Traditional partioning using fdisk vs lvm, nice redhat article here
Comments
Post a Comment