Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1522750

Summary: vdo --logfile should not allow block device
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Krysl <jkrysl>
Component: vdoAssignee: Ken Raeburn <raeburn>
Status: CLOSED ERRATA QA Contact: Jakub Krysl <jkrysl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: awalsh, bjohnsto, jkrysl, limershe, lmiksik, sweettea
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.1.0.100 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 15:48:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Krysl 2017-12-06 11:28:10 UTC
Description of problem:
When using option --logfile with value of block device, logging fails:

# vdo create --device=/dev/sdl --logfile=/dev/sdk --name vdo --verbose
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file vdo, line 774
Creating VDO vdo
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file Logger.py, line 52
    pvcreate -qq --test /dev/sdl
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file Command.py, line 165
vdo: ERROR -   Device /dev/sdl excluded by a filter.
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file vdo, line 822
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file vdo, line 829

# lsblk
NAME                    MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
--snip--
sdk                       8:160  0  5.5T  0 disk
sdl                       8:176  0  5.5T  0 disk


# vdo modify --readCache enabled --logfile /dev/sdk
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file vdo, line 774
vdo: ERROR - Missing required argument '--name'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file vdo, line 822
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 875, in emit
    self.flush()
  File "/usr/lib64/python2.7/logging/__init__.py", line 835, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
Logged from file vdo, line 829


Version-Release number of selected component (if applicable):
vdo-6.1.0.72-12

How reproducible:
100%

Steps to Reproduce:
1. use --logfile $block_device

Actual results:
python IO errors

Expected results:
ERROR: Cannot use block device as logging file

Additional info:

Comment 3 Jakub Krysl 2018-01-02 08:42:08 UTC
# vdo create --device=/dev/mapper/rhel_hp--dl380pg8--09-home --logfile=/dev/mapper/rhel_hp--dl380pg8--09-home --name=vdo_test
usage: vdo create [-h] -n <volume> --device <devicepath>
                  [--activate {disabled,enabled}]
                  [--blockMapCacheSize <megabytes>]
                  [--blockMapPeriod <period>]
                  [--compression {disabled,enabled}]
                  [--deduplication {disabled,enabled}]
                  [--emulate512 {disabled,enabled}] [--force]
                  [--indexMem <gigabytes>] [--readCache {disabled,enabled}]
                  [--readCacheSize <megabytes>]
                  [--sparseIndex {disabled,enabled}]
                  [--vdoAckThreads <threadCount>]
                  [--vdoBioRotationInterval <ioCount>]
                  [--vdoBioThreads <threadCount>]
                  [--vdoCpuThreads <threadCount>]
                  [--vdoHashZoneThreads <threadCount>]
                  [--vdoLogicalSize <megabytes>]
                  [--vdoLogicalThreads <threadCount>]
                  [--vdoLogLevel {critical,error,warning,notice,info,debug}]
                  [--vdoPhysicalThreads <threadCount>]
                  [--vdoSlabSize <megabytes>] [--writePolicy {async,sync}]
                  [-f <file>] [--logfile <pathname>] [--verbose]
vdo create: error: argument --logfile: /dev/mapper/rhel_hp--dl380pg8--09-home is a block device

Comment 6 errata-xmlrpc 2018-04-10 15:48:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0871