[rhelv6-list] LVM and "unpartioned space"

Bryan J Smith b.j.smith at ieee.org
Mon May 13 04:33:35 UTC 2013


On Sun, May 12, 2013 at 7:38 PM, Marco Shaw <marco.shaw at gmail.com> wrote:

> I actually prefer CLI, but I'm researching this for a mainly Windows OS
> admin audience.
>

As a _current_ MCITP/MCSE/MCSA, I have a pair of Stanek reference books [1]
[2] on my desk right here.  Why?  Because you can only do some things from
the CLI in NT now, and even the newer 70-41x exams for 2012 _test_ for
them.  Why?  They are no longer "optional," especially since the emphasis
is on "Core," no longer GUI.

And unlike GNU, with its command-line standards, NT is _not_ as strong
(having been passed through many outsourcing and team losses through the
years).  CLI partitioning in NT is painful, and Logical Disk Manager (LDM)
is really painful, at the CLI.  Even NT 6.1 and 6.2 Server versions, 2008
and 2012 respectively, have completely _different_ deployment models that
require _different_ CLI tools.  It's why I'm waiting for a good reference
on 2012, which may be Stanek as well [3], although I was hopeful a the 3rd
Edition of his CL Ref. [1]

With that said ...


> I'll try again, I'm pretty sure the LVM GUI
>

The system-config-lvm command is _deprecated_ in RHEL6. [4]  Use
gnome-disk-utility (palimpsest) instead.  It combines many features into
one.  It's features may be limited in RHEL6 compared to newer Fedora
versions (I'm on F17 here).  But it is deprecated on RHEL6 too, with the
gnome-disk-utility (palimpsest) or the CLI tools recommended.

E.g., previously you would have had to use separate programs for:
 - Disk Labels/Slicing (Partition Tables/Partitions):  gparted (GUI Parted)
 - LVM Management:  system-config-lvm

The latter will only make use of slices (partitions) that have been
created, and ideally, set with type 8E hex (LVM).


>  wasn't allowing me to expand the volume group in my particular example.
>

That's because it's not always best to do so.  The Slice (Partition) is in
use, and the DeviceMapper is mapping the boundaries, along with the kernel
holding the Disk Label (MBR Partition Table format) entries.  One can
manually change the Label, and then tell the kernel to reload.  After that,
one can then resize the Physical Volume (PV).  Since the Volume Group (VG)
is just made up of that one (1), existing PV, it would then change.

But it's easier to add the Slice (Partition) as a new PV, and then add the
new PV to the VG.  That would do the same, and be "cleaner," because
DeviceMapper doesn't have to change the address mappings for the existing
Slice and PV.  It just adds another Slice and a new PV.  If you're using
the legacy "system-config-lvm" tool, it doesn't slice.  You need to use
"gparted" to do such.

The disk is already initialized, so it seems it isn't possible to do
> anything with the
>
extra space as a result.
>

Has _nothing_ to do with "disk initialization."  That phrase just means a
Disk Label is now on the disk, typically MBR Partition Table or GUID
Partition Table (GPT) format, on the PC.  The former is the legacy 16-bit
BIOS/DOS format.  When Linux doesn't detect any Disk Label on the disk
(including non-PC Disk Labels), it offers to "initialize."  NT/Windows has
a similar phrase.

If you change the underlying disk sizing in your HyperVisor, in addition to
redetecting (such as with a SCSI command), you may need to run "partprobe"
and/or "kpartx."  You should always do so after adding any slices
(partitions).  That almost always works, adding the new slices (partitions).

If you "extend" the geometry on a slice (partition), then things get
trickier.  The geometry has changed on an existing slice (partition) in
use.  The "kpartx" command may work with select options for the specific
slice.

And ... again ... system-config-lvm does _not_ provide this functionality
at all.  It only modifies LVM components, like adding Physical Volumes to
Volume Groups, creating Logical Volumes in Volume Groups, etc...


>   Again, from the LVM GUI only...
>

Which does _not_ manage slices (partitions).

What you're seeing under "uninitialized" are just unformated slices
(partitions) or free space.  LVM doesn't like to mess with the "raw" slices
(partitions), or modify the Disk Label (Partition Table) itself.

Use the newer gnome-disk-utility (palimpsest).  It's even more featured in
newer Fedora versions, but should be capable of such under RHEL6.  If not,
there is always "gparted."

But learning the base LVM set of tools (pvs, vgs, lvs, pvcreate,
vgcreate/vgextend, lvcreate/lvextend) is really ideal.  They should learn
how PV -> VG -> LV come together, let alone how Disk Labels (Partition
Tables) work.  After all, that would be good for NT/Windows administration
as well.

But then again, 99% of Windows admins ask me to architect their Storage,
Networking Services and ... my favorite ... "AD Migrations" for them.  They
have never seen an LDIF file, and are much less familiar with LDIFDE.EXE.
 Several try to get "smart" with me, and tell me to use PowerShell.  But in
reality, writing an implementation-script doesn't interest me, when LDIF
(even if some attributes are clearly AD-only) is far more portable and
re-usable.

That's before we look at the fact that PowerShell is like running Java as
your shell interpreter (.NET, same rules, inheritance, etc...).  It's not a
good replacement for good CLI and editing.  It's better utilized when you
don't already have a solid, industry-standard format like LDIF already.
 Like things we previously used Perl::Win32 for because Microsoft did _not_
have a good scripting language prior to PowerShell.  It's bad enough the NT
CLI and PowerShell already disagree enough.  ;)

-- bjs

[1] Stanek, Windows Command-Line Administrator's Pocket Consultant, 2nd
Edition, MS Press
 - http://www.amazon.com/dp/0735622620/

[2] Stanek, Windows PowerShell(TM) 2.0 Administrator's Pocket Consultant,
MS Press
 - http://www.amazon.com/dp/0735625956/

[3] Stanek, Windows Server 2012 Pocket Consultant, MS Press
 - http://www.amazon.com/dp/B0096E1HLW/

[4] RHEL 6 Migration Planning Guide
 -
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/Migration_Planning_Guide/

"system-config-lvm
The system-config-lvm tool has been deprecated. Management of logical
volumes can be performed via the gnome-disk-util or the lvm tools."

--
Bryan J Smith - Professional, Technical Annoyance
b.j.smith at ieee.org - http://www.linkedin.com/in/bjsmith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20130513/a3d78119/attachment.htm>


More information about the rhelv6-list mailing list