[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

101 on real world lv pv and disk alocation.

Posted on 2011-05-04
2
Medium Priority
?
580 Views
Last Modified: 2012-05-11
How do I determine if there is enought disk space for a  new pv ?

How do I determine if there is enough space for a new lv on a pv ?

how hard it it so shrink a lv on a running system?   Reboot ?  

what are the tools to "look" at what I have   lv pv.  

examples are good also :)  

Redhat 4 / 5  :)

0
Comment
Question by:TIMFOX123
2 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 2000 total points
ID: 35689376
How do I determine if there is enought disk space for a  new pv ?
If you have a partition left on the system not yet used by a PV.
To see all partitions (devices ) on the system issue this command
lshal | grep 'block.device'

Issue this command to see all partitions.
fdisk -l

How do I determine if there is enough space for a new lv on a pv ?
Keep sequence in your mind.  PV--> VG--> LV
You need to see your LV is based on which VG and that VG is based on which PV.

how hard it it so shrink a lv on a running system?   Reboot ?
No reboot.  You need to shrink the file system first (resize2fs) and then reduce lv (lvresize)

Partitioning tools:
fdisk
parted

LVM -PV/VG/LV Viewing commands
pvdisplay
pvs
pvscan
vgdisplay
vgs
vgscan
lvdisplay
lvs
lvscan
lvmdiskscan

Filesystem resize:
On RHEL4
ext2online
On RHEL5/6
resize2fs

RESIZING
pvresize
vgreduce
vgextend
lvresize
0
 

Author Closing Comment

by:TIMFOX123
ID: 35697543
thanks

works
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question