0

I am currently working on CentOS 6.9 (Kernel Version 2.6.32-696.3.2.el6.x86_64). I have added a supplemental disk to the Virtual Machine and I can see it listed under /dev as sdc (/dev/sdc). When I create a partition on the disk I get /dev/sdc1. This is visible under lsblk as shown:

[root@testvm002 ~]# lsblk
NAME                   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb                      8:16   0   40G  0 disk
└─sdb1                   8:17   0   40G  0 part /mnt/resource
sda                      8:0    0   30G  0 disk
└─sda1                   8:1    0   30G  0 part /
sr0                     11:0    1  628K  0 rom
sdc                      8:32   0   50G  0 disk
└─sdc1                   8:33   0   50G  0 part
sdd                      8:48   0   50G  0 disk
└─vg_data (dm-0) 253:0    0   50G  0 lvm  /data

and for fdisk:

[root@oratest612 ~]# fdisk -l /dev/sdc
Disk /dev/sdc: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eb274

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        6528    52427776   83  Linux

However, sdc1 does not appear under /dev for reasons unknown to me. Therefore, my question is why is not appearing and how do I fix it?

[root@oratest612 ~]# ls -lrt /dev/sd*
brw-rw----. 1 root disk 8,  0 Oct 31 14:00 /dev/sda
brw-rw----. 1 root disk 8,  1 Oct 31 14:00 /dev/sda1
brw-rw----. 1 root disk 8, 16 Oct 31 14:00 /dev/sdb
brw-rw----. 1 root disk 8, 17 Oct 31 14:02 /dev/sdb1
brw-rw----. 1 root disk 8, 32 Oct 31 14:40 /dev/sdc
brw-rw----. 1 root disk 8, 48 Oct 31 14:40 /dev/sdd
  • Have you rebooted the node? – Jaroslav Kucera Oct 31 '17 at 15:41
  • Yeah; rebooted and no difference. It’s still not showing under /dev – automation1002 Oct 31 '17 at 15:50
  • Run this command cat /proc/partitions and edit your question with the output. It shows what the kernel can see. – hschou Oct 31 '17 at 16:25
  • I suspect you don't have devtmpfs in findmnt /dev, so you rely on udev to create device nodes, but it has crashed or something. if this is systemd you could look in the journal for error messags relating to udev. – sourcejedi Oct 31 '17 at 16:26
  • lsblk is presumably looking in /sys, I expect the the /proc interface will show exactly the same. – sourcejedi Oct 31 '17 at 16:27
2

Then create it manually:

# mknod /dev/sdc1 block 8 33
  • That's fine but shouldn't it automatically create /dev/sdc1 when I create the partition as shown in fdisk? My question is geared towards understanding why this hasn't happened automatically and how it can be rectified so it is done automatically. – automation1002 Oct 31 '17 at 16:08
  • Yes, it should. It's probably a bug, fill a bugreport: bugs.centos.org – Ipor Sircer Oct 31 '17 at 16:24

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.