From: Nikolay Ivanets
This patch adds '--blocksize' command line option for virt-make-fs
tool. This option allows specifying disk sector size as described in
'guestfs_add_drive_opts' libguestfs API.
---
make-fs/make-fs.c| 30 --
make-fs/test-virt-make-fs.
From: Nikolay Ivanets
This patch adds '--blocksize' command line option for virt-make-fs
tool. This option allows specifying disk sector size as described in
'guestfs_add_drive_opts' libguestfs API.
---
make-fs/make-fs.c| 28 ++--
make-fs/test-virt-make-fs.sh
From: Nikolay Ivanets
This patch adds 4096 bytes sector size for output disk.
Side notes:
While working on this patch I reveal long standing issue: virt-make-fs can fail
if source directory/archive contains certain amount of really small or empty
files or wide tree of directories. That is beca
From: Nikolay Ivanets
This patch adds '--blocksize' command line option for virt-get-kernel
tool. This option allows specifying disk sector size as described in
'guestfs_add_drive_opts' libguestfs API.
---
get-kernel/get_kernel.ml | 22 --
get-kernel/virt-get-kernel.po
From: Nikolay Ivanets
This patch depends on changes in 'common' sub-module posted here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00150.html
v3 fixes issue found during code review:
- options now appear in alphabetical order
v2:
Almost the same as v1 except '--blocksize' optio
From: Nikolay Ivanets
This patch adds '--blocksize' command line option for guestfish and
other C-based tools. This option allows specifying disk sector size.
---
align/Makefile.am | 1 +
align/scan.c | 8
align/virt-alignment-scan.pod | 2 ++
cat/Makefile.
From: Nikolay Ivanets
This patch adds '--blocksize' command line option parsing and handling
for guestfish and other C-based tools which share the same code from
this sub-module.
'--blocksize' will be a common for almost all libguestfs-based tools and
thus parameter description will be repeated
From: Nikolay Ivanets
v4 fixes issues found during code review:
- whitespace-change-only hunks are removed
- options are alphabetically orderred now
v3 is just a spelling correction spotted by Eric Blake
https://www.redhat.com/archives/libguestfs/2020-February/msg00111.html
In v2 I've moved '--
From: Nikolay Ivanets
This patch adds '--blocksize' command line option parsing and handling
for guestfish and other C-based tools which share the same code from
this sub-module.
'--blocksize' will be a common for almost all libguestfs-based tools and
thus parameter description will be repeated
From: Nikolay Ivanets
v3 is just a spelling correction spotted by Eric Blake
In v2 I've moved '--blocksize' parameter description into the separate
file called blocksize-option.pod so we can include it everywhere we need
similar to key-option.pod.
https://www.redhat.com/archives/libguestfs/2020-
From: Nikolay Ivanets
This patch adds '--blocksize' command line option for guestfish and
other C-based tools. This option allows specifying disk sector size.
---
align/Makefile.am | 1 +
align/scan.c | 8
align/virt-alignment-scan.pod | 2 ++
cat/Makefile.
From: Nikolay Ivanets
This patch depends on changes in 'common' sub-module posted here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00099.html
v2:
Almost the same as v1 except '--blocksize' option description is moved
into a common submodule (similar to key-option.pod).
v1 was h
From: Nikolay Ivanets
In v2 I've moved '--blocksize' parameter description into the separate
file called blocksize-option.pod so we can include it everywhere we need
similar to key-option.pod.
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html
Nikolay Ivanets (1
From: Nikolay Ivanets
This patch adds '--blocksize' command line option parsing and handling
for guestfish and other C-based tools which share the same code from
this sub-module.
'--blocksize' will be a common for almost all libguestfs-based tools and
thus parameter description will be repeated
From: Nikolay Ivanets
This patch depends on changes in 'common' sub-module posted here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html
Nikolay Ivanets (1):
tools: add '--blocksize' option for C-based tools
align/scan.c | 8
align/virt-alignm
From: Nikolay Ivanets
This patch adds '--blocksize' command line option for guestfish and
other C-based tools. This option allows specifying disk sector size.
---
align/scan.c | 8
align/virt-alignment-scan.pod | 12
cat/cat.c | 8 +++
From: Nikolay Ivanets
This patch adds '--blocksize' command line option parsing and handling
for guestfish and other C-based tools which share the same code.
---
options/options.c | 13 -
options/options.h | 125 +++---
2 files changed, 86 insertions(
From: Nikolay Ivanets
Nowadays there are hard drives and operating systems which support
"4K native" sector size. In this mode physical and logical block size
exposed to the operating system is equal to 4096 bytes.
GPT partition table (as a known example) being created in this mode will
place G
From: Nikolay Ivanets
Nowadays there are hard drives and operating systems which support
"4K native" sector size. In this mode physical and logical block size
exposed to the operating system is equal to 4096 bytes.
GPT partition table (as a known example) being created in this mode will
place G
From: Nikolay Ivanets
I faced with situation where libguestfs cannot recognize partitions on a
disk image which was partitioned on a system with "4K native" sector
size support.
In order to fix the issue we need to allow users to specify desired
physical and/or logical block size per drive basis
From: Nikolay Ivanets
nbdkit_parse_size() uses strtoumax() function to parse input strings
which states:
"if there was a leading minus sign, the negation of the result of the
conversion represented as an unsigned value, unless the original
(nonnegated) value would overflow."
Later validation do
From: Nikolay Ivanets
nbdkit_parse_size() uses strtoumax() function to parse input strings
which states:
"if there was a leading minus sign, the negation of the result of the
conversion represented as an unsigned value, unless the original
(nonnegated) value would overflow."
Later validation do
From: Nikolay Ivanets
Inspection code checks /etc/mdadm.conf to map MD device paths listed in
mdadm.conf to MD device paths in the guestfs appliance. However on some
operating systems (e.g. Ubuntu) mdadm.conf has alternative location:
/etc/mdadm/mdadm.conf.
This patch consider an alternative loc
I saw several Windows disk images which contains strange registry entry
for mapped drives:
"\\DosDevices\\Y:"=hex(3):00,00,00,00,00,00,00,00,00,00,00,00
Which is decoded something like diskID = 0x0, partition starts at 0
bytes offset from the start of the disk. In addition to a Windows disk
imag
1. Now we use GPT partition type to filter out LDM partitions.
2. We also check for filesystems on LDM volumes because LDM partitions
doesn't contain filesystems (list_ldm_partitions is not called anymore).
3. Obvious repetitive comments are moved to a function description.
---
daemon/listfs.ml |
Instead of using part_to_dev to find such devices we open the device's
directory under /sys/block/ and look for entries starting with
, eg. /sys/block/sda/sda1.
---
daemon/listfs.ml | 41 ++---
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/daem
Test guestfish list-filesystems command finds file system on partitioned md
device and doesn't take into account md device itself (similar to as physical
devices are filtered out if they are partitioned).
---
tests/md/Makefile.am| 3 +-
tests/md/test-partitioned-md-devices.s
Extended MBR partitions cannot hold filesystems - filter them out.
---
daemon/listfs.ml | 37 -
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 57f2f622d..908e59cc4 100644
--- a/daemon/listfs.ml
+++ b/dae
stems:
- partitioned MD devices;
- LDM partitions (only LDM volume can hold filesystem);
- Windows Logical Disk Manager data partition;
- Microsoft Reserved Partition;
- Windows Snapshot Partition;
- MBR extended partition.
Mykola Ivanets (6):
daemon: Changing the way that we detect if a device con
Ignore partitioned MD devices the same way we ignore regular partitioned
devices because they cannot contain filesystems as well.
---
daemon/listfs.ml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index eced55bce..10b1a8594 100644
--- a/d
Filter out Microsoft Reserved Partition and Windows Snapshot Partition.
---
daemon/listfs.ml | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index a1ee38de3..57f2f622d 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -35,
I have several Windows disk images which contains strange registry entry
for mapped drives:
"\\DosDevices\\Y:"=hex(3):00,00,00,00,00,00,00,00,00,00,00,00
Which is decoded something like diskID = 0x0, partition starts at
0 bytes from the start of the disk. In addition of Windows disk image
I have
Don't make unnecessary function calls in show_ functions family
until we find requested object (volume, partition etc.). Also make sure
the functions return correct result.
---
src/ldmtool.c | 48 +---
1 file changed, 25 insertions(+), 23 deletions(-)
New API method is introduced - ldm_volume_dm_get_device(...) which
returns device mapper device after it have been created or NULL
otherwise.
ldmtool "show volume" command displays "device" field if corresponding
device mapper device have been created for the specified volume. Field
is omitted ot
libdevmapper provides dm_tree_find_node_by_uuid function which we can
use to find device in a tree and get rid of our own implementation.
---
src/ldm.c | 52
1 file changed, 12 insertions(+), 40 deletions(-)
diff --git a/src/ldm.c b/src/ldm.c
i
Searching for device node in device mapper tree is used twice. So let's
extract this functionality into a separate reusable function.
---
src/ldm.c | 62 +--
1 file changed, 46 insertions(+), 16 deletions(-)
diff --git a/src/ldm.c b/src/ldm.c
i
Custom device mapper logging is initialized during libdm library
initialization in one place.
---
src/ldm.c | 87 +--
1 file changed, 40 insertions(+), 47 deletions(-)
diff --git a/src/ldm.c b/src/ldm.c
index f31a0aa..16934d6 100644
--- a/src/ld
Device mapper device UUID (alongside with device name) is an unique
characteristic of device. However libldm didn't set device UUID. Also
"dmsetup" user space tool has "mangle" command which issue a warning if
device doesn't have UUID. Let's set UUID for created devices to be
consistent with DM
New API method is introduced - ldm_partition_dm_get_device(...) which
returns device mapper device after it have been created or NULL
otherwise.
ldmtool "show partition" command displays "device" field if
corresponding device mapper device have been created for the specified
partition. Field is o
libdevmapper v1.02 is available for more then 13 years already and it
provides newer API which will allow to simplify code base.
---
configure.ac | 2 +-
ldm-1.0.pc.in | 2 +-
libldm.spec.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index
Emphasis that returned name is unmangled.
---
src/ldm.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ldm.h b/src/ldm.h
index 280fbfb..cdc5817 100644
--- a/src/ldm.h
+++ b/src/ldm.h
@@ -443,7 +443,8 @@ guint64 ldm_volume_get_chunk_size(const LDMVolume *o);
* @o: An #L
libdevmapper limits allowed characters for device name. Character
whitelist: 0-9, A-Z, a-z, #+-.:=@_. LDM partition name is composed of
disk group name and partition name. Disk group is named after the
machine, with a "DgN" suffix; partition name is a disk name with a
numerical suffix - partitio
. Any comments
re welcomed.
--
Mykola Ivanets
Mykola Ivanets (12):
Requires libdevmapper v1.02.
Change the way we sanitise LDM partition name.
Clarify ldm_volume_dm_get_name function documentation.
Set UUID for device mapper devices (partitions and volumes).
Fix potential memory leak
Get path to a device mapper directory calling "dm_dir" function from
devmapper library instead of using hard-coded value "/dev/mapper".
---
src/ldm.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/ldm.c b/src/ldm.c
index ac6bae8..f31a0aa 100644
--- a/src/ldm.c
+++
Potential memory leak in ldm_volume_dm_create and ldm_volume_dm_remove
functions is fixed. Leak was possible if the caller doesn't want to get
back created or remove device name, passing NULL as a second argument.
---
src/ldm.c | 20 +---
1 file changed, 17 insertions(+), 3 deleti
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-May/msg00058.html
v2:
- more correct explanation of a crash reason.
Mykola Ivanets (1):
Fix crash while creating mapper for a volume which lacks of
partitions.
src/ldm.c | 6 +++---
1 file changed, 3 insertions(+), 3
How to reproduce:
1. Extract test images from test/data/ldm-data.tar.xz
2. losetup --show -f test/data/ldm-2003r2-simple-1.img
Let's assume image file was associated with /dev/loop0
3. ldmtool -d /dev/loop0 create all
Result: One LDM volume which contains all required components on the
associat
All files generted after running "make check" are added into .gitignore.
---
test/.gitignore | 39 ---
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/test/.gitignore b/test/.gitignore
index 8ee133a..7e62d30 100644
--- a/test/.gitignore
+++ b/tes
ows to overcome this shortcoming.
Mykola Ivanets (3):
Make libldm to parse and return volume GUID.
gtk-doc: update documentation.
Make git to ignore all test output files.
docs/reference/ldmtool/ldmtool.xml | 7 ++
src/ldm.c | 29 +
gtk-doc is updated to reflect presence of new volume GUID field.
---
docs/reference/ldmtool/ldmtool.xml | 7 +++
1 file changed, 7 insertions(+)
diff --git a/docs/reference/ldmtool/ldmtool.xml
b/docs/reference/ldmtool/ldmtool.xml
index 0f2b934..ec52633 100644
--- a/docs/reference/ldmtool/ldm
LDM volume GUID is a significant piece of information about LDM volume
analogously to GPT disk/partition GUID. Windows use volume GUID to
keeptrack of assigned drive letters, for example.
We extract volume GUID while parsing volume VBLK in _parse_vblk_vol
function. "show volume" ldmtool command
How to reproduce:
1. Extract test images from test/data/ldm-data.tar.xz
2. losetup --show -f test/data/ldm-2003r2-simple-1.img
Let's assume image file was associated with /dev/loop0
3. ldmtool -d /dev/loop0 create all
Result: One LDM volume which contains all required components on the
associat
e letter assigned by Windows to corresponding volume. But
it is not reliable source of information. More over, in multiboot
environment it will be unclear which drive letter belongs to which
operating system. Volume GUID allows to overcome this shortcoming.
Mykola Ivanets (2):
Make libldm to par
LDM volume GUID is a significant piece of information about LDM volume
analogously to GPT disk/partition GUID. Windows use volume GUID to
keeptrack of assigned drive letters, for example.
We extract volume GUID while parsing volume VBLK in _parse_vblk_vol
function. "show volume" ldmtool command
All files generted after running "make check" are added into .gitignore.
---
test/.gitignore | 39 ---
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/test/.gitignore b/test/.gitignore
index 8ee133a..7e62d30 100644
--- a/test/.gitignore
+++ b/tes
LDM volume GUID is a significant piece of information about LDM volume
analogously to GPT disk/partition GUID. Windows use volume GUID to
keeptrack of assigned drive letters, for example.
We extract volume GUID while parsing volume VBLK in _parse_vblk_vol
function. "show volume" ldmtool command
lume. But
it is not reliable source of information. More over, in multiboot
environment it will be unclear which drive letter belongs to which
operating system. Volume GUID allows to overcome this shortcoming.
Mykola Ivanets (1):
Make libldm to parse and return volume GUID.
src/ldm.c | 6 --
multiboot
environment it is unclear which drive letter belongs to which operating
system. Volume GUID allows to overcome this shortcomming.
Mykola Ivanets (1):
libldm: Make libldm to parse and return volume GUID.
src/ldm.c | 6 --
src/ldm.h | 10 ++
src/ldmtool.c | 3 ++
LDM volume GUID is a significant piece of information about LDM volume
analogously to GPT disk/partition GUID. Windows use volume GUID to keep track
of assigned drive letters, for example.
We extract volume GUID while parsing volume VBLK in _parse_vblk_vol function.
"show volume" ldmtool comma
Ignore partitioned MD devices the same way we ignore regular partitioned
devices because they cannot contain filesystems as well.
---
daemon/listfs.ml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index eced55bce..10b1a8594 100644
--- a/d
1. Now we use GPT partition type to filter out LDM partitions.
2. We also check for filesystems on LDM volumes because LDM partitions
doesn't contain filesystems (list_ldm_partitions is not called anymore).
3. Obvious repetitive comments are moved to a function description.
---
daemon/listfs.ml |
Instead of using part_to_dev to find such devices we open the device's
directory under /sys/block/ and look for entries starting with
, eg. /sys/block/sda/sda1.
---
daemon/listfs.ml | 41 ++---
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/daem
Extended MBR partitions cannot hold filesystems - filter them out.
---
daemon/listfs.ml | 37 -
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 57f2f622d..908e59cc4 100644
--- a/daemon/listfs.ml
+++ b/dae
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
Test guestfish list-filesystems command finds file system on partitioned md
device and doesn't take into account md device itself (similar to as physical
devices are filtered out if they are partitioned).
---
tests/md/Makefile.am| 3 +-
tests/md/test-partitioned-md-devices.s
Filter out Microsoft Reserved Partition and Windows Snapshot Partition.
---
daemon/listfs.ml | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index a1ee38de3..57f2f622d 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -35,
"localmountpoint" parameter is allocated in JNI before calling
mount_local and freed afterward. But guestfs handle keeps reference
to passed "localmountpoint" parameter and will try to access it in
umount_local and free after mount_local_run caller thread ends
which leads to a crash (an attempt to
"localmountpoint" parameter is allocated in JNI before calling
mount_local and freed afterward. But guestfs handle keeps reference
to passed "localmountpoint" argument and will try to use and free it
in umount_local which leads to a crash because an attempt to access
already freed memory region.
I
From: Nikolay Ivanets
Instead of parsing 'parted' output OCaml implementation relies on the following
facts:
1. MBR partition table can hold up to 4 "primary" partitions.
2. Partition with number greater then 4 is "logical" partition.
3. Partition with number less then or equal to 4 with MBR ID
Ignore partitioned MD devices the same way we ignore regular partitioned
devices because they cannot contain filesystems as well.
---
daemon/listfs.ml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 55ace8e9c..4014e3fe9 100644
--- a/d
Filter out Microsoft Reserved Partition and Windows Snapshot Partition.
---
daemon/listfs.ml | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 0d71a39db..fa7813378 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -35,
Extended MBR partitions cannot hold filesystems - filter them out.
---
daemon/listfs.ml | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index fa7813378..2ed7da6e3 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -83,7 +83,7
Instead of using part_to_dev to find such devices we open the device's
directory under /sys/block/ and look for entries starting with
, eg. /sys/block/sda/sda1.
---
daemon/listfs.ml | 40 +---
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/daemo
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
Test guestfish list-filesystems command finds file system on partitioned md
device and doesn't take into account md device itself (similar to as physical
devices are filtered out if they are partitioned).
---
tests/md/Makefile.am| 3 +-
tests/md/test-partitioned-md-devices.s
1. Now we use GPT partition type to filter out LDM partitions.
2. We also check for filesystems on LDM volumes because LDM partitions
doesn't contain filesystems (list_ldm_partitions is not called anymore).
3. Obvious repetitive comments are moved to a function description.
---
daemon/listfs.ml |
This patch series:
1. Addresses comments from last review:
part_get_mbr_part_type doesn't break original implementation in C.
2. Rebased on top of master and little bit refactored for readability.
Mykola Ivanets (1):
tests: md: Test guestfish list-filesystems command skips partit
From: Nikolay Ivanets
The following partitions are filtered out:
1. Partitioned md devices (just as partitioned physical devices are filtered
out).
2. Extended MBR partitions.
3. LDM Partitions (MBR and GPT partitions used by Windows Logical Disk Manager).
4. Microsoft Reserved Partitions (GUID
Test guestfish list-filesystems command finds file system on partitioned md
device and doesn't take into account md device itself (similar to as physical
devices are filtered out if they are partitioned).
---
tests/md/Makefile.am| 3 +-
tests/md/test-partitioned-md-devices.s
From: Nikolay Ivanets
Instead of parsing 'parted' output OCaml implementation relies on the following
facts:
1. MBR partition table can hold up to 4 "primary" partitions.
2. Partition with number greater then 4 is "logical" partition.
3. Partition with number less then or equal to 4 with MBR ID
The commit fixes the bug in the code which inspects partition table
entries in order to find LDM Metadata partion:
_read_privhead_gpt function in ldm.c always calls gpt_get_pte
function with 0 (zero) as a second argument which causes the
described bug.
---
src/ldm.c | 2 +-
1 file changed, 1 inse
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
Rebased.
The only thing left unclear is: "Would you like to document behavior for
non-MBR partitions
more clearly or keep previous implementation despite MBR partition type doesn't
make sense
for non-MBR partitions at all?"
___
Libguestfs mailing list
The following partitions are filtered out:
1. Partitioned md devices (just as partitioned physical devices are filtered
out).
2. Extended MBR partitions.
3. LDM partitions (MBR and GPT partitions used by Windows Logical Disk Manager).
4. Microsoft Reserved Partitions (GUID E3C9E316-0B5C-4DB8-817D-
Test guestfish list-filesystems command finds file system on partitioned md
device and doesn't take into account md device itself (similar to as physical
devices are filtered out if they are partitioned).
---
tests/md/Makefile.am| 3 +-
tests/md/test-partitioned-md-devices.s
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
The following partitions are filtered out:
1. Partitioned md devices (just as partitioned physical devices are filtered
out).
2. Extended MBR partitions.
3. LDM partitions (MBR and GPT partitions used by Windows Logical Disk Manager).
4. Microsoft Reserved Partitions (GUID E3C9E316-0B5C-4DB8-817D-
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.
_
Test guestfish list-filesystems command finds file system on partitioned md
device and doesn't take into account md device itself (similar to as physical
devices are filtered out if they are partitioned).
---
tests/md/Makefile.am| 3 +-
tests/md/test-partitioned-md-devices.s
Test guestfish list-filesystems command finds file system on partitioned md
device and doesn't take into account md device itself (similar to as physical
devices are filtered out if they are partitioned).
---
tests/md/Makefile.am| 3 +-
tests/md/test-partitioned-md-devices.s
Filter out:
1. Partitioned md devices (as we do this for physial devices).
2. Extended MBR partitions.
3. LDM partitions (MBR and GPT partitions used by Windows Logical Disk Manager)
4. Microsoft Reseved Partitions.
---
daemon/devsparts.ml | 13 +++
daemon/devsparts.mli | 1 +
daemon/listf
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
guestfs_list_filesystems uses mount/umount to discover btrfs sub-volumes and
since 1.37 it generates random mountpoint so it will longer affect already
mounted filesystems if either.
---
generator/actions_core.ml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/generator/act
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.
M
Test guestfish list-filesystems command finds file system on partitioned md
device and does't take into account md device itself (similar to as physical
devices are skipped if they are partitioned)
---
tests/md/Makefile.am | 1 +
tests/md/test-list-filesystems2.sh | 79 +++
The function takes one argument - device path (e.g. /dev/sda) and returns true
if device contains partition(s) or false otherwise. The function look in
/sys/block// for entries starting with , eg.
/sys/block/sda/sda1.
---
daemon/devsparts.ml | 14 ++
daemon/devsparts.mli | 1 +
2
Filter partitioned md devices out the same way as partitioned physical devices
are filtered out
---
daemon/listfs.ml | 22 +-
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 370ffb4..dc424f5 100644
--- a/daemon/listfs.ml
Test guestfish finds:
1. md device created from physical block device and LV,
2. md device created from LVs
3. LV created on md device
raid0 is used for md device because it is inoperable if one of its components
is inaccessible so it is easy observable that md device is missing (raid1 in
this c
It is a second version of the earlier sent patch.
I've added more clear explanation what does it fix and why the issue happened
in first place.
Also I split the patch (the patch itself and two independent tests):
[PATCH v2 1/3] appliance: init: Avoid running degraded md devices
[PATCH v2 2/3] tes
The issue:
- raid1 will be in degraded state if one of its components is logical volume
(LV)
- raid0 will be inoperable at all (inacessible from within appliance) if one of
its component is LV
- raidN: you can expect the same issue for any raid level depends on how many
components are inaccessib
1 - 100 of 103 matches
Mail list logo