| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a linear LV with a dm-integrity layer added
above it. The dm-integrity layer stores checksums
of the data written to the LV, and returns an error
if data read from the LV does not match the previously
saved checksum.
lvcreate --type integrity --integrity String [options]
The --integrity String specifies if the dm-integrity
metadata (checksums) should be interleaved with data
blocks, or written to a separate external LV:
--integrity external (default)
Store integrity metadata on a separate LV.
Allows removing integrity from the LV later.
--integrity internal
Store integrity metadata interleaved with data
on the same LV. Around 1% of the LV size will
be used for integrity metadata.
--integrity y
Enable default integrity settings (external).
Command variations:
lvcreate --type integrity -n Name -L Size VG
[Uses integrity external, the default.]
lvcreate --integrity external -n Name -L Size VG
[Uses type integrity, which is implied.]
lvcreate --integrity y -n Name -L Size VG
[Uses integrity external, the default, and
uses type integrity, which is implied.]
lvcreate --integrity internal -n Name -L Size VG
[Uses type integrity, which is implied.]
lvconvert --integrity none|n LV
[Removes external integrity.]
Options:
--integritymetadata LV
Use the specified LV for external metadata.
Allows specific device placement of metadata.
Without this option, the command creates a
hidden LV (with an _imeta suffix) to hold the
metadata.
--integritysettings String
set dm-integrity parameters, e.g. to use a journal
instead of bitmap, --integritysettings "mode=J".
Example:
$ lvcreate --integrity external -n lvex -L1G vg
$ lvs -a vg
LV VG Attr LSize Origin
lvex vg -wi-a----- 1.00g [lvex_iorig]
[lvex_imeta] vg -wi-ao---- 12.00m
[lvex_iorig] vg -wi-ao---- 1.00g
$ lvcreate --integrity internal -n lvin -L1G vg
$ lvs -a vg
LV VG Attr LSize Origin
lvin vg -wi-a----- 1.00g [lvin_iorig]
[lvin_iorig] vg -wi-ao---- 1.00g
Zeroing:
After a new integrity LV is created, zeroes are written to
the entire LV to initialize integrity metadata (checksums).
Without this initialization, the LV will return read errors
for any unwritten (and uninitialized) data.
A large LV may take a long time to zero. The -Zn option can
be used to disable the whole-LV zeroing, or the lvcreate
command can be canceled while zeroing the new LV. In either
case, the user may write to the entire LV to initialize the
integrity metadata themselves.
|
| |
|
|
|
|
| |
Since we reduced created LV to 4M - dd also just 4M.
|
|
|
|
|
|
| |
This reverts commit cbabdf2fca6131660cfb5525ed9edb3f7a41525a.
and add extra comment why this code may look unused, but
in runtime is necessary.
|
|
|
|
| |
This reverts commit 70fb31b5d6863248b5adfb2581b706cbb158b30e.
|
|
|
|
| |
This reverts commit e92d3bd1f75d335fba5303c433516ea4ebe5cab1.
|
| |
|
| |
|
|
|
|
| |
strncpy will zero buffer itself.
|
|
|
|
| |
free() itself checks for NULL.
|
|
|
|
| |
Instead of malloc() memset() -> zalloc()
|
|
|
|
| |
We don't need to check for any error result codes here.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Since we fixed linking of proper version of 'libdevmapper' with
linking lvm2 plugin correctly - we already have correct function
available linked with internal lvm library.
So drop unneeded include of parsing function.
|
|
|
|
|
|
| |
Embed function into the code, since the function is actually
simpler written this as there are no memleak troubles
with failing allocation error path.
|
|
|
|
| |
Exit when !_touch_hints().
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Avoid mem leaking hint on every loop continue and
allocate hint only when it's going to be added into list.
Switch to use 'dm_strncpy()' and validate sizes.
|
| |
|
|
|
|
| |
Don't use garbage value for later computations.
|
|
|
|
|
| |
Free allocated buffer on function's exit.
Also check for fwrite() results.
|
|
|
|
| |
When 'str1' would be NULL, there is no point to run 2nd. strstr().
|
| |
|
|
|
|
|
|
| |
For dev_in_device_list() != 0 allocated 'devl' was
actually leaking - so instead allocate 'devl' only
when !dev_in_device_list() and indent code around.
|
|
|
|
|
|
|
|
|
|
|
| |
Since we check for NULL pointers earlier we need
to be consistent across function - since the NULL
would applies across whole function.
When dropping 'mda' check - we are actually
already dereferencing it before - so it can't
be NULL at that places (and it's validated
before entering _read_mda_header_and_metadata).
|
|
|
|
| |
Update code with simpler form and check for fclose().
|
|
|
|
|
| |
Reapply 23cc7ddc50e2800a6dc248de897a4c88c1514160 to internal version
of libdm.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dev_unset_last_byte() must be called while the fd is still valid.
After a write error, dev_unset_last_byte() must be called before
closing the dev and resetting the fd.
In the write error path, dev_unset_last_byte() was being called
after label_scan_invalidate() which meant that it would not unset
the last_byte values.
After a write error, dev_unset_last_byte() is now called in
dev_write_bytes() before label_scan_invalidate(), instead of by
the caller of dev_write_bytes().
In the common case of a successful write, the sequence is still:
dev_set_last_byte(); dev_write_bytes(); dev_unset_last_byte();
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When resizing 2 volumes like thin-pool and it's metadata and they
would be of a different type - command would be actually expecting
both LVs being of a same segtype - and would throw an error in
case they are different.
This patch fixes is by setting a new segtype from last segment of
2nd. extented device.
Also it fixes the possible 'percentage' extension setup that
might have been used for 'primary' volume - while the 'secondary'
LV always goes with direct size - as we do not support 'percentage'
setup for them
This affects maily usage of thin-pool where the extension of
thin-pool data size may also lead to extension of metadata size.
|
|
|
|
|
| |
To avoid removing, while 'add' might not have been processed yet.
(when emulating reboot in pvmove-restart)
|
|
|
|
| |
If 'remove' was succesful - we can break loop immediatelly.
|
|
|
|
| |
Do not call pthread_join if thread_id would be 0.
|
|
|
|
|
| |
Report errors for open in better order.
Ensure descriptors are not leaked.
|
|
|
|
| |
Make sure read_ahead pointer is not NULL when quering for RA.
|
|
|
|
| |
Check for sigprocmask errors
|
|
|
|
| |
dev_name is global in device.h
|
| |
|
| |
|
|
|
|
|
|
| |
Thin metadata evolve between kernel version, so it's not always
precisely predictible its usage - so let's met test happy,
when it gets bellow 90%.
|
| |
|
|
|
|
| |
Slowdown 'delay' more.
|
|
|
|
| |
We can 'cache' only exclusively active LV in cluster.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running cluster test with clvmd, the actual 'monitoring'
happens in cluster - so the 'already monitored' message
is also logged within clvmd code and the command cannot
see such effect.
clvmd was incapable to report this information back to command
so it cannot be displayed this way.
Add 'lvs -o+seg_monitor' validation which also works in clustered mode.
|
| |
|
|
|
|
|
| |
Seems this function has been removed long time ago with:
3e781ea446bb7ddc9a494cbba6b6104dd51c3910
|