CEPH filesystem development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Kay Sievers <kay@vrfy.org>
Cc: ceph-devel@vger.kernel.org, systemd-devel@lists.freedesktop.org,
	Sage Weil <sage@inktank.com>
Subject: Re: [PATCH] rules: add by-parttypeuuid rule for GPT labeled partitions
Date: Tue, 13 May 2014 11:53:43 +0200	[thread overview]
Message-ID: <20140513095343.GO8951@x2.net.home> (raw)
In-Reply-To: <CAPXgP10_kwapAMsq8hgsGE3AyOuWd9uBqyb-EkP=RnNRBpeaBg@mail.gmail.com>

On Mon, May 12, 2014 at 05:18:56PM +0200, Kay Sievers wrote:
> > I just looked up libudev and it looks like there is even a pyudev wrapper,
> > so that could indeed work better.  I take it that queries via
> > udev_enumerate for (say) ID_PART_ENTRY_TYPE=x are efficient?
> 
> Sure, filter for "block" devices and this or other GPT properties. The
> libudev API will just find the devices is /sys and read the database
> files in tmpfs /run and, it will not talk to any devices, so it should
> perform pretty well.

 and on command line lsblk(8) reads the info from udev db, so you can
 use:

 $ lsblk -o+PARTTYPE
 NAME   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT PARTTYPE
 sda      8:0    0 149.1G  0 disk
 ├─sda1   8:1    0  1000M  0 part  /boot      c12a7328-f81f-11d2-ba4b-00a0c93ec93b
 ├─sda2   8:2    0     2G  0 part             ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
 ├─sda3   8:3    0   9.7G  0 part  [SWAP]     0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
 ├─sda4   8:4    0  34.2G  0 part  /          ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
 ├─sda5   8:5    0  63.2G  0 part  /home      ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
 └─sda6   8:6    0  39.1G  0 part             ebd0a0a2-b9e5-4433-87c0-68b6b72699c7


(well, this is from git tree, will be in v2.25 :-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

      reply	other threads:[~2014-05-13  9:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 21:31 [PATCH] rules: add by-parttypeuuid rule for GPT labeled partitions Sage Weil
2014-05-09 21:51 ` Kay Sievers
2014-05-09 22:00   ` [systemd-devel] " Sage Weil
2014-05-09 22:17     ` Kay Sievers
2014-05-09 22:34       ` [systemd-devel] " Sage Weil
2014-05-12 15:18         ` Kay Sievers
2014-05-13  9:53           ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140513095343.GO8951@x2.net.home \
    --to=kzak@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=kay@vrfy.org \
    --cc=sage@inktank.com \
    --cc=systemd-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox