Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161514 - Permission denied when trying to create filesystem on logical volume
Summary: Permission denied when trying to create filesystem on logical volume
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-23 20:58 UTC by rich turner
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version: old
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-10 17:43:32 UTC


Attachments (Terms of Use)

Description rich turner 2005-06-23 20:58:02 UTC
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 21:03:01 UTC
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 17:43:32 UTC
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.