Book Image

CentOS 7 Server Deployment Cookbook

By : Timothy Boronczyk, IRAKLI NADAREISHVILI
Book Image

CentOS 7 Server Deployment Cookbook

By: Timothy Boronczyk, IRAKLI NADAREISHVILI

Overview of this book

CentOS is derived from Red Hat Enterprise Linux (RHEL) sources and is widely used as a Linux server. This book will help you to better configure and manage Linux servers in varying scenarios and business requirements. Starting with installing CentOS, this book will walk you through the networking aspects of CentOS. You will then learn how to manage users and their permissions, software installs, disks, filesystems, and so on. You’ll then see how to secure connection to remotely access a desktop and work with databases. Toward the end, you will find out how to manage DNS, e-mails, web servers, and more. You will also learn to detect threats by monitoring network intrusion. Finally, the book will cover virtualization techniques that will help you make the most of CentOS.
Table of Contents (18 chapters)
CentOS 7 Server Deployment Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Adding storage and growing an LVM volume


The size of logical volumes doesn't need to be fixed and we're free to allocate more storage for one from its volume group. This recipe teaches us how to add more storage to the group and then grow the size of the logical volume to take advantage of it.

Getting ready

This recipe requires a CentOS system with administrative privileges provided by logging in with the root account or using sudo. It assumes that a new disk has been installed and partitioned (identified as /dev/sdd1) and a logical group and volume have been configured as described in previous recipes.

How to do it...

Follow these steps to add storage and increase the size of an LVM volume:

  1. Register the new partition as a physical volume:

    pvcreate /dev/sdd1
    
  2. Review the output of pvs to confirm that the volume was registered:

    pvs
    
  3. Use vgextend to add the physical volume to the desired volume group:

    vgextend vg0 /dev/sdd1
    
  4. Review the output of vgs to confirm that the volume was added to the group...