I use /proc/partitions all the time - but stopped recommending it to others
when I was told (can't remember the source) it was deprecated.   I'd be
glad to be wrong here.. as you say - it's quick and easy and no running
through /dev or /sys structures..

Scott Rohling

On Wed, Oct 10, 2012 at 7:02 AM, Rick Troth <[email protected]>wrote:

> On 10/10/2012 09:27 AM, Peter Oberparleiter wrote:
> > # cat /proc/partitions
> > major minor  #blocks  name
> >    8        0   10485760 sda
> >    8        1   10485743 sda1
> >
> > Note: the #blocks is the size in 1k-blocks
>
> Yep.  I was going to suggest exactly what Peter suggested.  It's quick
> and easy.
>
> Note that a disk need not be "partitioned" to show up under
> /proc/partitions.  (I say, since I have a penchant for pointing it
> out.)  In fact, if you're going to use these volumes as "LVM fodder"
> (that is, let them be PVs in a volume group), then you will find it
> better to *not* partition them.  Just stamp the requisite LVM magic on
> "sda" (instead of "sda1") and proceed.
>
>
> --
>
> Rick Troth
> Senior Software Developer
>
> Velocity Software Inc.
> Mountain View, CA 94041
> Main: (877) 964-8867
> Direct: (614) 594-9768
> [email protected] <mailto:[email protected]>
> ------------------------------------------------------------------------
> Signature <http://www.velocitysoftware.com/>
> *Follow us:*
> Facebook
> <http://www.facebook.com/pages/Velocity-Software/356098274460840>
> LinkedIn <http://www.linkedin.com/company/1798379> Twitter
> <http://www.twitter.com/VelocitySoftw> Xing
> <http://www.xing.com/companies/velocitysoftwaregmbh>
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or
> visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to