R
R
Roman Ratkin2018-05-23 11:45:19
linux
Roman Ratkin, 2018-05-23 11:45:19

Why did partition dm-0 become dm-1?

Good day to all.
There is a mail server on Centos 6.5. I added an HDD to it for storing letters, made a lvm partition. Everything was fine and lsblk showed the following picture:

NAME                            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                               8:0    0   20G  0 disk 
├─sda1                            8:1    0  500M  0 part /boot
└─sda2                            8:2    0 19,5G  0 part 
  ├─VolGroup-lv_root (dm-0)     253:1    0 15,6G  0 lvm  /
  └─VolGroup-lv_swap (dm-1)     253:2    0  3,9G  0 lvm  [SWAP]
sdb                               8:16   0  1,7T  0 disk 
└─sdb1                            8:17   0  1,7T  0 part 
  └─VolGroupMail-lv_mail (dm-2) 253:0    0  1,7T  0 lvm  /var/spool/mail/vmail

For a couple of days, letters were transferred from the old server, yesterday the transfer was successfully completed. Changed the name of the machine, rebooted it and got a kernel panic. It was specified in grub.conf that root=/dev/dm-0, as it was. But, after rebooting, lsblk issued:
NAME                            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                               8:0    0   20G  0 disk 
├─sda1                            8:1    0  500M  0 part /boot
└─sda2                            8:2    0 19,5G  0 part 
  ├─VolGroup-lv_root (dm-1)     253:1    0 15,6G  0 lvm  /
  └─VolGroup-lv_swap (dm-2)     253:2    0  3,9G  0 lvm  [SWAP]
sdb                               8:16   0  1,7T  0 disk 
└─sdb1                            8:17   0  1,7T  0 part 
  └─VolGroupMail-lv_mail (dm-0) 253:0    0  1,7T  0 lvm  /var/spool/mail/vmail

grub.conf corrected as root=/dev/mapper/VolGroup-lv_root, as I understand it, if the dm indexes change again in the future, this will not affect the OS boot. But, I wonder why this happened at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LightAir, 2018-05-23
@LightAir

Similar cases were if I swapped ports. those. for example, the hard with the system hung on sata-2, began to install a new hard, stuck it into a free sata-1.
Or another case, there were 2 hard drives, one on sata-1, an additional one on sata-2, in the process of cleaning the PC and turning off hard drives, I put an additional one on sata-1, the main one on sata-2.
To avoid this in the future, it is better to hook everything up by UUID.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question