fdisk -l fdisk /dev/sdc
In fdisk
c p (print the partition table to make sure the disk is not in use) n (new partition) p (primary partition) 1 (give it a number 1-4, then set start and end sectors) w (write table to disk and exit)
Now create a physical volume, add it to the VG, extend the LV and then the file system.
pvcreate /dev/sdc1 vgextend VG_NAME /dev/sdc1 lvextend -L+5G LV_PATH (i.e.: /dev/VG_NAME/LV_NAME) resize2fs LV_PATH (OR if using xfs: xfs_grow LV_PATH)
Done.
Other useful commands when working with disks include:
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom sda 8:0 0 501.1M 0 disk └─sda1 8:1 0 500M 0 part /boot sdb 8:16 0 29.5G 0 disk └─sdb1 8:17 0 29.5G 0 part ├─vg_name-lv_root (dm-0) 253:0 0 40.6G 0 lvm / └─vg_name-lv_swap (dm-1) 253:1 0 3.7G 0 lvm [SWAP] sdc 8:32 0 20G 0 disk
The lsblk
will list all block devices. Above it is an easy way to see disks, disk usage and LVM affiliations. Of course if you just want the block device names this will work too:
ls /sys/block/* | grep block | grep sd