Bug 161514 - Permission denied when trying to create filesystem on logical volume
Permission denied when trying to create filesystem on logical volume
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-23 16:58 EDT by rich turner
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version: old
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-10 12:43:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description rich turner 2005-06-23 16:58:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 SUSE/1.0.4-1.1

Description of problem:
after creating a new logical volume, i attempt to create a filesystem on that logical volume and receive the following error message:
mkfs.ext2 /dev/stbackupvg/stbackuplv
mke2fs 1.37 (21-Mar-2005)
Could not stat /dev/testvg/testlv --- Permission denied

if i use the /dev/dm- name for the device (/dev/dm-0 in this case) i am able to create the filesystem. both the /dev/testvg and /dev/dm-0 have the same major/minor numbers. i do notice that they have different selinux policies, so this may be a selinux issue rather than a lvm2 issue.

# ls -lZ /dev/testvg/testlv
brw-rw----  root     disk     root:object_r:device_t           /dev/mapper/stbackupvg-stbackuplv
# ls -lZ /dev/dm-0
brw-r-----  root     disk     system_u:object_r:fixed_disk_device_t /dev/dm-0


Version-Release number of selected component (if applicable):
lvm2-2.01.08-2.1

How reproducible:
Always

Steps to Reproduce:
1.pvcreate -ff -y /dev/hda2
2.vgcreate -s 16M -p 16 -l 32 /dev/testvg /dev/hda2
3.vgchange -ay testvg
4.lvcreate -l 2383 -n testlv testvg /dev/hda2
5.mkfs.ext2 /dev/testvg/testlv
  

Actual Results:  mkfs.ext2 /dev/stbackupvg/stbackuplv
mke2fs 1.37 (21-Mar-2005)
Could not stat /dev/testvg/testlv --- Permission denied

Expected Results:  i would have expected it to create the filesystem on the device

Additional info:

i had no problems creating the filesystem on /dev/testvg/testlv when i rebooted the system with selinux=0
Comment 1 rich turner 2005-06-23 17:03:01 EDT
you will see some inconsistencies in device naming as i copied and pasted them
into the bug report. stbackupvg can be replaced with testvg, and stbackuplv can
be replaced with testlv. sorry for not reviewing it before submitting it.
Comment 2 Alasdair Kergon 2007-01-10 12:43:32 EST
I believe this got fixed - there were several similar reports.

Note You need to log in before you can comment on or make changes to this bug.