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.oldmv: cannot move /etc/lvm to /etc/lvm.old: Permission deniedWhat is reason? Why permission denied via root user Thanks in advance
Why don't change lvm directory name under in etc directory
centos
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.