0

Now I have met strange problem in Linux Centos 7.

I would like to test "recreate the device files for LVM volumes". In this case, you can be system crash and lost devices file for lVM. For that, I deleted any volume group device file under /dev/mapper/ directory. And I wanted to rename lvm directory name under /etc directory in which I want to observe again create this directory or no when I wrote "vgmknodes" commands. In this time It gave me Permission denied that I was in system with root user.

mv /etc/lvm /etc/lvm.old

mv: cannot move ‘/etc/lvm’ to ‘/etc/lvm.old’: Permission denied

What is reason? Why permission denied via root user

Thanks in advance

0

You don't actually need to test that. Those device files are created dynamically as the system runs; typically by udev.

Go to /etc/udev/rules.d and you'll probably see a file named something like 11-dm-lvm.rules. That file is used by udev to create device files such as /dev/VG/LV.

Even better, boot another Linux system and then mount, root filesystem somewhere (such as /mnt) and take a look at it's /dev. It will have very few files in it, if anything at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.