Displaying 20 results from an estimated 81 matches for "list_partition".
Did you mean:
list_partitions
2018 Jan 25
0
[PATCH v2 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...directory under /sys/block/<device> and
+ * look for entries starting with <device>, eg. /sys/block/sda/sda1
+ *)
+ let parts = Array.to_list (Sys.readdir dir) in
+ List.exists (fun part -> String.is_prefix part device) parts
+ with Sys_error (_) -> false
+
let rec list_partitions () =
let partitions = map_block_devices ~return_md:true add_partitions in
let partitions = List.flatten partitions in
diff --git a/daemon/devsparts.mli b/daemon/devsparts.mli
index 7b669c2..d3224a1 100644
--- a/daemon/devsparts.mli
+++ b/daemon/devsparts.mli
@@ -21,5 +21,6 @@ val list_partit...
2014 Jun 14
3
Script to read systemd journal of a guest to find its IP address
...--------------------------------------------
image = "/var/lib/libvirt/images/ostack-controller.qcow2"
root_filesystem = "/dev/fedora/root"
import os
import sys
import re
import guestfs
g = guestfs.GuestFS ()
g.add_drive (image, format='qcow2')
g.launch ()
#print g.list_partitions()
# Set trace
#g.set_trace (1)
g.mount_options ("ro", root_filesystem, "/")
# Open the journal
g.journal_open ("/var/log/journal")
# Loop over the journal to find a specific string
count = 0
prog = re.compile("dhclient.*bound")
while g.journal_next():...
2017 Jul 14
0
[PATCH 05/27] daemon: Reimplement several devsparts APIs in OCaml.
The reimplemented APIs are:
* list_devices
* list_partitions
* part_to_dev
* part_to_partnum
* is_whole_device
---
daemon/Makefile.am | 2 +
daemon/daemon.h | 3 -
daemon/devsparts.c | 257 ----------------------------------------------
daemon/devsparts.ml | 109 ++++++++++++++++++++
daemon/devsparts.mli | 25 +++++...
2018 Jan 22
0
[RFC PATCH v1 2/3] daemon: devsparts: add is_partitioned_device function
...et parts = Sys.readdir ("/sys/block/" ^ device) in
+ let parts = Array.to_list parts in
+
+ (* Look in /sys/block/<device>/ for entries starting with
+ * <device>, eg. /sys/block/sda/sda1.
+ *)
+ List.exists (fun part -> String.is_prefix part device) parts
+
let rec list_partitions () =
let partitions = map_block_devices ~return_md:true add_partitions in
let partitions = List.flatten partitions in
diff --git a/daemon/devsparts.mli b/daemon/devsparts.mli
index 7b669c2..d3224a1 100644
--- a/daemon/devsparts.mli
+++ b/daemon/devsparts.mli
@@ -21,5 +21,6 @@ val list_partit...
2009 Aug 05
1
[PATCH] Fix swapon_label test
The swapon label test has a side-effect, in that it creates a new partition.
This causes the later failure of the list_partitions test.
This change causes the swapon_label test to scrub /dev/sdb after the test, and
then re-read the partition table.
---
src/generator.ml | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/generator.ml b/src/generator.ml
index 9ef99bd..fe538a6 100755
--- a/src/gene...
2018 Jan 23
2
Re: [RFC PATCH v1 3/3] daemon: list-filesystems: Don't list partitioned md devices
...4f5 100644
> --- a/daemon/listfs.ml
> +++ b/daemon/listfs.ml
> @@ -24,24 +24,20 @@ let rec list_filesystems () =
> let has_lvm2 = Lvm.available () in
> let has_ldm = Ldm.available () in
>
> - let devices = Devsparts.list_devices () in
> let partitions = Devsparts.list_partitions () in
> - let mds = Md.list_md_devices () in
>
> (* Look to see if any devices directly contain filesystems
> - * (RHBZ#590167). However vfs-type will fail to tell us anything
> + * (RHBZ#590167). However vfs-type will fail to tell us anything
This whitespace change is w...
2018 Jun 01
0
[PATCH v8 1/6] daemon: Changing the way that we detect if a device contains partitions.
...5bce 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -24,31 +24,15 @@ let rec list_filesystems () =
let has_lvm2 = Optgroups.lvm2_available () in
let has_ldm = Optgroups.ldm_available () in
+ (* Devices. *)
let devices = Devsparts.list_devices () in
- let partitions = Devsparts.list_partitions () in
- let mds = Md.list_md_devices () in
-
- (* Look to see if any devices directly contain filesystems
- * (RHBZ#590167). However vfs-type will fail to tell us anything
- * useful about devices which just contain partitions, so we also
- * get the list of partitions and exclude the cor...
2018 May 01
0
[PATCH v6 2/7] daemon: Changing the way that we detect if a device contains partitions.
...8e9c 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -24,31 +24,15 @@ let rec list_filesystems () =
let has_lvm2 = Optgroups.lvm2_available () in
let has_ldm = Optgroups.ldm_available () in
+ (* Devices. *)
let devices = Devsparts.list_devices () in
- let partitions = Devsparts.list_partitions () in
- let mds = Md.list_md_devices () in
-
- (* Look to see if any devices directly contain filesystems
- * (RHBZ#590167). However vfs-type will fail to tell us anything
- * useful about devices which just contain partitions, so we also
- * get the list of partitions and exclude the cor...
2013 Sep 06
1
答复: python-guestfs
...uestfs: trace: list_devices
libguestfs: trace: list_devices = ["/dev/vda"]
libguestfs: trace: vfs_type "/dev/vda"
libguestfs: trace: vfs_type = ""
libguestfs: trace: mount_ro "/dev/vda" "/"
libguestfs: trace: mount_ro = -1 (error)
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/vda1", "/dev/vda2"]
libguestfs: trace: vfs_type "/dev/vda1"
libguestfs: trace: vfs_type = "ntfs"
libguestfs: trace: mount_ro "/dev/vda1" "/"
libguestfs: trace: mount_ro = -1 (error)
libguestfs:...
2018 Jan 28
9
guestfs_list_filesystems: skip block devices which cannot hold file system
Initial discussion is here: https://www.redhat.com/archives/libguestfs/2018-January/msg00188.html.
v2 was posted here: https://www.redhat.com/archives/libguestfs/2018-January/msg00246.html.
v3 comparing to v2 is just a rebase with slightly changed commits comments.
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
Instead of parsing 'parted' output OCaml implementation relies on the following facts:
1. The function is applicable for MBR partitions only (as noted in documentation and as function name suggests).
2. An attempt to call the function for non-MBR partition fails with "part_get_mbr_part_type can only be used on MBR Partitions" error and NULL is returned.
3. MBR partition table
2018 May 02
6
[PATCH v7 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
This patch series addresses comments after v6 series review.
Mykola Ivanets (6):
daemon: Changing the way that we detect if a device contains
partitions.
daemon: list-filesystems: Ignore partitioned MD devices.
tests: list-filesystems command ignores partitioned MD devices.
daemon: list-filesystems: Change the way we filter out LDM partitions.
daemon: list-filesystems: Filter out
2018 Jan 22
8
[RFC] Inconsistent output of guestfs_list_filesystems
Before I rush to change something I request your comments on the subject.
Let me know what do you think and if it does make sense.
The issue: guesfs_list_filesystems is inconsistent in its output.
For, example, it filters out partitioned physical devices but doesn't do the same for MD devices.
More over, according to its name and API documentation guestfs_list_filesystem should return
2013 Sep 04
2
python-guestfs
I use python-guestfs to mount windows image it have some problems .Here is my code:
[root@mfsdata1 ~]# python
Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> sheepfs_dir="/tmp/sheepfs"
2018 Jun 01
7
[PATCH v8 0/6] daemon: list_filesystems: filter out block devices which cannot hold filesystem.
v8: - Rebased on top of master.
v7: - Addresses comments after v6 series review.
v6: - Addresses comments after v5 series review.
- Large commit is splitted to more granular commits for better code review.
v5: - Addresses comments after v4 series review (part_get_mbr_part_type doesn't break original implementation in C).
- Rebased on top of master and little bit refactored for
2011 Dec 07
2
failure converting Linux ESX guest to KVM hypervisor
...t; "/"
libguestfs: trace: mount_ro = -1 (error)
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: mount_ro "/dev/sdb" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/sda1", "/dev/sda2",
"/dev/sda3"]
libguestfs: trace: pvs
libguestfs: trace: pvs = [""]
libguestfs: trace: available "lvm2"
libguestfs: trace: available = 0
libguestfs: trace: lvs
libguestfs: trace: lvs = [...
2018 Apr 27
0
[PATCH v5 2/3] daemon: list-filesystems: Don't list partitions which cannot hold file system.
...--git a/daemon/listfs.ml b/daemon/listfs.ml
index 56ebadeda..5499bacb2 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -25,39 +25,18 @@ let rec list_filesystems () =
let has_ldm = Optgroups.ldm_available () in
let devices = Devsparts.list_devices () in
- let partitions = Devsparts.list_partitions () in
+ let devices = List.filter check_device devices in
let mds = Md.list_md_devices () in
-
- (* Look to see if any devices directly contain filesystems
- * (RHBZ#590167). However vfs-type will fail to tell us anything
- * useful about devices which just contain partitions, so we also...
2018 May 01
9
[PATCH v6 0/7] daemon: list_filesystems: filter out block devices which cannot hold filesystem
This patch series:
1. Addresses comments from v5 series review
2. Large commit is splitted to more granular commits for better code review.
Mykola Ivanets (6):
daemon: Changing the way that we detect if a device contains
partitions.
daemon: list-filesystems: Ignore partitioned MD devices.
tests: list-filesystems command ignores partitioned MD devices.
daemon: list-filesystems: Change
2014 Jan 14
2
Re: Libguestfs can't launch with one of the disk images in the RHEV cluster
...ot;copyright", "credits" or "license" for more information.
>>> import guestfs
>>> g = guestfs.GuestFS()
>>> g.add_drive_opts("/dev/dm-19",readonly=1)
>>> g.launch()
>>> g.lvs()
[]
>>> g.pvs()
[]
>>> g.list_partitions()
['/dev/vda1', '/dev/vda2']
>>> g.inspect_os()
['/dev/vda1']
Now I’m a little bit confused with the results of my research. I found that VM with the only disk attached has at least two block devices mapped to the hypervisor’s file system in fact – I mean /dev/d...
2016 Feb 05
2
[PATCHv2] inspect: get windows drive letters for GPT disks.
...6 byte binary GUID.
---
changes since v1:
* applied style changes from review
* use guestfs_list_partitions instead of guestfs_list_filesystems
* do the GUID endianness conversion correctly
* check all API calls for errors
* do not call guestfs_canonical_device_name to prevent from changing
* block device names, i.e /dev/vda1 as i...