Disk upgrade using LVM Partition

Follow the below steps for upgrading disk on Linux server:

1: Login into the server.

2. List the disk by follwing command - fdisk -l

3. Now partitions both the disks /dev/xvdc and /dev/xvdd using fdisk command as shown.

fdisk /dev/xvdc

fdisk /dev/xvdd

4. Use n to create the partition and enter “p” and select the primary partition.save the changes with w command.

5. After partitioning, use the fdisk -l command to varify the partitions.

6. Create Physical Volume (PV).

pvcreate /dev/xvdc1

pvcreate /dev/xvdd1

7. Create Volume Group (VG).

vgcreate testvg /dev/xvdc1 /dev/xvdd1

8. Now use “vgdisplay” to list all details about the VG’s in the system.

vgdisplay

9. Format the Logical Volums (LV’s) to ext4 format.

10.Finally, mount the file system.

Make sure to create data1 and data2 directories before mounting the filesystem.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 729