Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

for some reason one of my disks doesn't show its partitions in /dev/, however when I check it with cfdisk they are there, and writing the partition table to it again makes them reappear.

This is kind of annoying as I want to use it in a raid config, but the raid config can't find it so I have to manually add them on boot causing them to be resynced all over again.

OS: Debian 5.0 amd64 with backport kernel for ext4 support Disks: 2x Samsung Spinpoint F3 HD103SJ, 1x old IDE disk Other info is probably more or less irrelevant, if you need any command output I can supply it.

vmhost:/home/xen# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d6074

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        6079    48829536   fd  Linux raid autodetect
/dev/sda2            6080      121601   927930465   fd  Linux raid autodetect

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000cdeb8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        6079    48829536   fd  Linux raid autodetect
/dev/sdb2            6080      121601   927930465   fd  Linux raid autodetect

Disk /dev/sdc: 250.0 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdba2dba2

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       29164   234259798+  83  Linux
/dev/sdc2           29165       30401     9936202+   5  Extended
/dev/sdc5           29165       30401     9936171   82  Linux swap / Solaris

Disk /dev/md0: 50.0 GB, 50001346560 bytes
2 heads, 4 sectors/track, 12207360 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 950.2 GB, 950200696832 bytes
2 heads, 4 sectors/track, 231982592 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table
share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Stupid me apparently created a software raid superblock on /dev/sda a while ago which caused the software raid tool to mangle the partition data or something.

share|improve this answer
add comment

If you are talking about

Disk /dev/md0 doesn't contain a valid partition table

then it is expected output in any raid device.

In case you mean that devices with name '/dev/sda1', etc. do not exist in '/dev' then try using

partprobe /dev/sda

when the devices are not listed. If this solves the problem, then you can add 'partprobe /dev/sda' to '/etc/rc.d/rc.local' file. This would still cause problem if you try to mount '/dev/sda1' etc. on boot using '/etc/fstab'

share|improve this answer
    
Exactly, in most cases you don't want a partition table on a RAID device, Linux just allows for that and fdisk expects this on block devices it opens. If you want to further split your RAID use LVM. –  Hubert Kario Nov 7 '10 at 9:18
    
The problem was with I think with sda, every time I booted only /dev/sda existed while fdisk (As can be seen above) did detect /dev/sda1 and /dev/sda2. When writing the partition table to the disk again after this they would appear, until I rebooted. –  Xeross Nov 8 '10 at 8:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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