kernel doesn't recognize partitions on sdb or sdc

Asked by LewG

This is an Asus M4A90GTD mainboard. I have 3 Seagate SATA hard drives, all the same. They are connected to SATA ports 1, 2 and 3.

All are partitioned with fdisk, identically. On boot, '/proc/partitions' contains the 4 partitions on /sda, but only /sdb and /sdc.
The /dev/ info is consistent.

If I run fdisk and merely re-write the partition info for /dev/sdb or /dev/sdc, the partitions appear in '/proc/partitions', but they aren't actually available, as all attempts to create a file system fail with the error that the partition "is apparently in use by the system".

I have this mainboard at home, no such problem, but the disks were formatted and configured before I put them into the new system.

Ideas on the next step would be very welcome.

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gparted Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
LewG (lew-glendenning) said :
#1

Rewriting the partition info with fdisk also creates the devices in /dev/.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

can you ive the output of:

sudo fdisk -l

Thanks

Revision history for this message
LewG (lew-glendenning) said :
#3

:~$ sudo mkfs.ext3 -c /dev/sdb1

mke2fs 1.41.11 (14-Mar-2010)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
~$ sudo fdisk -l

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 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: 0x000c1bbd

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 16710 134223043+ 83 Linux
/dev/sda2 16711 17233 4200997+ 82 Linux swap / Solaris
/dev/sda3 17234 97234 642608032+ fd Linux raid autodetect
/dev/sda4 97235 182401 684103927+ fd Linux raid autodetect

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 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: 0x9dc9c666

   Device Boot Start End Blocks Id System
/dev/sdb1 1 16710 134223043+ 83 Linux
/dev/sdb2 16711 17233 4200997+ 82 Linux swap / Solaris
/dev/sdb3 17234 97234 642608032+ fd Linux raid autodetect
/dev/sdb4 97235 182401 684103927+ fd Linux raid autodetect

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 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: 0x0969fccb

   Device Boot Start End Blocks Id System
/dev/sdc1 1 16710 134223043+ 83 Linux
/dev/sdc2 16711 17233 4200997+ 82 Linux swap / Solaris
/dev/sdc3 17234 97234 642608032+ 83 Linux
/dev/sdc4 97235 182401 684103927+ 83 Linux

~$ ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 2010-08-30 09:10 /dev/sda
brw-rw---- 1 root disk 8, 1 2010-08-30 09:10 /dev/sda1
brw-rw---- 1 root disk 8, 2 2010-08-30 09:10 /dev/sda2
brw-rw---- 1 root disk 8, 3 2010-08-30 09:10 /dev/sda3
brw-rw---- 1 root disk 8, 4 2010-08-30 09:10 /dev/sda4
brw-rw---- 1 root disk 8, 16 2010-08-30 09:12 /dev/sdb
brw-rw---- 1 root disk 8, 17 2010-08-30 09:12 /dev/sdb1
brw-rw---- 1 root disk 8, 18 2010-08-30 09:12 /dev/sdb2
brw-rw---- 1 root disk 8, 19 2010-08-30 09:12 /dev/sdb3
brw-rw---- 1 root disk 8, 20 2010-08-30 09:12 /dev/sdb4
brw-rw---- 1 root disk 8, 32 2010-08-30 09:10 /dev/sdc

Revision history for this message
LewG (lew-glendenning) said :
#4

I should have added that I used fdisk for /dev/sdb, just rewrote the partition. That produced the /dev/sdb* entries, but the attempt to make the file system shows they are defective in some way, from the kernel's POV.

At least nothing I try to do with the partitions on sdb succeeds, all with the error that the partition is in use by the system.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Can you give the output of:

mount

Thanks, we need to see where the device is in use as the oS will not be able to format the partition if it is in use / mounted.

Revision history for this message
LewG (lew-glendenning) said :
#6

Good thought, thanks.

~$ mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/lew/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=lew

Some of this is redundant, but just to prove the system is in the same state as yesterday.

~$ cat /proc/partitions
major minor #blocks name

   8 0 1465138584 sda
   8 1 134223043 sda1
   8 2 4200997 sda2
   8 3 642608032 sda3
   8 4 684103927 sda4
   8 16 1465138584 sdb
   8 17 134223043 sdb1
   8 18 4200997 sdb2
   8 19 642608032 sdb3
   8 20 684103927 sdb4
   8 32 1465138584 sdc
 252 0 1465073024 dm-0
 252 1 134223043 dm-1
 252 2 4200997 dm-2
 252 3 642608032 dm-3

~$ ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 2010-08-30 09:10 /dev/sda
brw-rw---- 1 root disk 8, 1 2010-08-30 09:10 /dev/sda1
brw-rw---- 1 root disk 8, 2 2010-08-30 09:10 /dev/sda2
brw-rw---- 1 root disk 8, 3 2010-08-31 04:40 /dev/sda3
brw-rw---- 1 root disk 8, 4 2010-08-30 09:10 /dev/sda4
brw-rw---- 1 root disk 8, 16 2010-08-30 09:12 /dev/sdb
brw-rw---- 1 root disk 8, 17 2010-08-30 09:12 /dev/sdb1
brw-rw---- 1 root disk 8, 18 2010-08-30 09:12 /dev/sdb2
brw-rw---- 1 root disk 8, 19 2010-08-30 09:12 /dev/sdb3
brw-rw---- 1 root disk 8, 20 2010-08-30 09:12 /dev/sdb4
brw-rw---- 1 root disk 8, 32 2010-08-30 09:10 /dev/sdc

sudo mkfs.ext3 -c -c /dev/sdb1

mke2fs 1.41.11 (14-Mar-2010)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!

I appreciate your help.

Revision history for this message
LewG (lew-glendenning) said :
#7

This is dmesg output, contains everything having to do with the hard drives. I have added an external SATA hard drive, it is fine.

So far as I can interpret this, the kernel sees all of the partitions, and there aren't any errors except the initial reset?

UDEV doesn't create the device files, however, and /proc/partitions show that the partitions somehow got lost between the initial detection and actually being attached to a driver?

[ 2.487496] Freeing unused kernel memory: 876k freed
[ 2.487645] Write protecting the kernel read-only data: 7680k
[ 2.502927] udev: starting version 151
[ 2.512197] xor: automatically using best checksumming function: generic_sse
[ 2.524444] ahci 0000:00:11.0: version 3.0
[ 2.524444] ahci 0000:00:11.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 2.524444] alloc irq_desc for 27 on node 0
[ 2.524444] alloc kstat_irqs on node 0
[ 2.524444] ahci 0000:00:11.0: irq 27 for MSI/MSI-X
[ 2.524444] ahci 0000:00:11.0: AHCI 0001.0200 32 slots 6 ports 6 Gbps 0x3f impl SATA mode
[ 2.524444] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part
[ 2.525121] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 2.525121] r8169 0000:05:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 2.525121] r8169 0000:05:00.0: setting latency timer to 64
[ 2.525121] r8169 0000:05:00.0: unknown MAC, using family default
[ 2.525121] alloc irq_desc for 28 on node 0
[ 2.525121] alloc kstat_irqs on node 0
[ 2.525121] r8169 0000:05:00.0: irq 28 for MSI/MSI-X
[ 2.525319] eth0: RTL8168b/8111b at 0xffffc90000c76000, 20:cf:30:19:bf:f1, XID 0c100000 IRQ 28
[ 2.528188] scsi0 : ahci
[ 2.531819] scsi1 : ahci
[ 2.535584] scsi2 : ahci
[ 2.536263] scsi3 : ahci
[ 2.537623] scsi4 : ahci
[ 2.537623] scsi5 : ahci
[ 2.537623] ata1: SATA max UDMA/133 abar m1024@0xfe4ffc00 port 0xfe4ffd00 irq 27
[ 2.537623] ata2: SATA max UDMA/133 abar m1024@0xfe4ffc00 port 0xfe4ffd80 irq 27
[ 2.537623] ata3: SATA max UDMA/133 abar m1024@0xfe4ffc00 port 0xfe4ffe00 irq 27
[ 2.537623] ata4: SATA max UDMA/133 abar m1024@0xfe4ffc00 port 0xfe4ffe80 irq 27
[ 2.537623] ata5: SATA max UDMA/133 abar m1024@0xfe4ffc00 port 0xfe4fff00 irq 27
[ 2.537623] ata6: SATA max UDMA/133 abar m1024@0xfe4ffc00 port 0xfe4fff80 irq 27
[ 2.539559] ahci 0000:03:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 2.539600] ahci 0000:03:00.0: JMB361 has only one port, port_map 0x3 -> 0x1
[ 2.541456] alloc irq_desc for 22 on node 0
[ 2.541458] alloc kstat_irqs on node 0
[ 2.541467] ohci1394 0000:04:07.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 2.550087] ahci 0000:03:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x1 impl SATA mode
[ 2.550090] ahci 0000:03:00.0: flags: 64bit ncq pm led clo pmp pio slum part
[ 2.550094] ahci 0000:03:00.0: setting latency timer to 64
[ 2.550202] scsi6 : ahci
[ 2.550292] scsi7 : ahci
[ 2.550358] ata7: SATA max UDMA/133 abar m8192@0xfe8fe000 port 0xfe8fe100 irq 18
[ 2.550360] ata8: DUMMY
[ 2.550489] pata_jmicron 0000:03:00.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 2.550515] pata_jmicron 0000:03:00.1: setting latency timer to 64
[ 2.550571] scsi8 : pata_jmicron
[ 2.550621] scsi9 : pata_jmicron
[ 2.551081] ata9: PATA max UDMA/100 cmd 0xcc00 ctl 0xc880 bmdma 0xc400 irq 19
[ 2.551083] ata10: PATA max UDMA/100 cmd 0xc800 ctl 0xc480 bmdma 0xc408 irq 19
[ 2.559111] generic_sse: 9931.600 MB/sec
[ 2.559113] xor: using function: generic_sse (9931.600 MB/sec)
[ 2.601942] ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[22] MMIO=[fe9fb800-fe9fbfff] Max Packet=[2048] IR/IT contexts=[4/8]
[ 2.850102] usb 4-1: new low speed USB device using ohci_hcd and address 2
[ 2.880134] ata4: SATA link down (SStatus 0 SControl 300)
[ 2.880156] ata5: SATA link down (SStatus 0 SControl 300)
[ 3.043326] usb 4-1: configuration #1 chosen from 1 choice
[ 3.060111] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 3.060131] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3.060146] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3.060160] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3.062121] ata6.00: ATAPI: Optiarc DVD RW AD-7260S, 1.01, max UDMA/100, ATAPI AN
[ 3.064590] ata6.00: configured for UDMA/100
[ 3.080111] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3.088889] ata1.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[ 3.088894] ata3.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[ 3.088896] ata1.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 3.088902] ata2.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[ 3.088905] ata2.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 3.088907] ata3.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 3.108854] ata7.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[ 3.108856] ata7.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 3.130905] ata1.00: configured for UDMA/133
[ 3.130907] ata3.00: configured for UDMA/133
[ 3.130952] ata2.00: configured for UDMA/133
[ 3.150177] scsi 0:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
[ 3.150306] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 3.150367] sd 0:0:0:0: [sda] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 3.150406] sd 0:0:0:0: [sda] Write Protect is off
[ 3.150408] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 3.150421] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.150507] sda:
[ 3.150804] ata7.00: configured for UDMA/133
[ 3.151841] scsi 1:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
[ 3.151948] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 3.151967] sd 1:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 3.151996] sd 1:0:0:0: [sdb] Write Protect is off
[ 3.151998] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 3.152020] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.152073] scsi 2:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
[ 3.152113] sdb:
[ 3.152186] sd 2:0:0:0: Attached scsi generic sg2 type 0
[ 3.152213] sd 2:0:0:0: [sdc] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 3.152252] sd 2:0:0:0: [sdc] Write Protect is off
[ 3.152254] sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[ 3.152268] sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.152365] sdc:
[ 3.153678] scsi 5:0:0:0: CD-ROM Optiarc DVD RW AD-7260S 1.01 PQ: 0 ANSI: 5
[ 3.158529] sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[ 3.158532] Uniform CD-ROM driver Revision: 3.20
[ 3.158603] sr 5:0:0:0: Attached scsi CD-ROM sr0
[ 3.158635] sr 5:0:0:0: Attached scsi generic sg3 type 5
[ 3.168411] sda1 sda2 sda3 sda4
[ 3.169983] sdc1 sdc2 sdc3 sdc4
[ 3.171790] sdb1 sdb2 sdb3 sdb4
[ 3.180161] scsi 6:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
[ 3.180288] sd 6:0:0:0: [sdd] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 3.180282] sd 6:0:0:0: Attached scsi generic sg4 type 0
[ 3.180334] sd 6:0:0:0: [sdd] Write Protect is off
[ 3.180334] sd 6:0:0:0: [sdd] Mode Sense: 00 3a 00 00
[ 3.180360] sd 6:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.180438] sdd:
[ 3.182553] sd 0:0:0:0: [sda] Attached SCSI disk
[ 3.184247] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 3.185184] sd 2:0:0:0: [sdc] Attached SCSI disk
[ 3.191860] sdd1 sdd2 sdd3
[ 3.192073] sd 6:0:0:0: [sdd] Attached SCSI disk
[ 3.278351] ata7.00: exception Emask 0x10 SAct 0x1 SErr 0x780100 action 0x6
[ 3.278354] ata7.00: irq_stat 0x08000000
[ 3.278357] ata7: SError: { UnrecovData 10B8B Dispar BadCRC Handshk }
[ 3.278359] ata7.00: failed command: READ FPDMA QUEUED
[ 3.278363] ata7.00: cmd 60/08:00:28:7b:a8/00:00:ae:00:00/40 tag 0 ncq 4096 in
[ 3.278364] res 40/00:00:28:7b:a8/00:00:ae:00:00/40 Emask 0x10 (ATA bus error)
[ 3.278366] ata7.00: status: { DRDY }
[ 3.278369] ata7: hard resetting link
[ 3.345640] device-mapper: dm-raid45: initialized v0.2594b
<usb stuff removed >
[ 3.790118] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3.860462] ata7.00: configured for UDMA/133
[ 3.860470] ata7: EH complete
[ 3.900507] ata7.00: exception Emask 0x10 SAct 0x2 SErr 0x780100 action 0x6
[ 3.900510] ata7.00: irq_stat 0x08000000
[ 3.900512] ata7: SError: { UnrecovData 10B8B Dispar BadCRC Handshk }
[ 3.900514] ata7.00: failed command: READ FPDMA QUEUED
[ 3.900518] ata7.00: cmd 60/08:08:20:7b:a8/00:00:ae:00:00/40 tag 1 ncq 4096 in
[ 3.900519] res 40/00:08:20:7b:a8/00:00:ae:00:00/40 Emask 0x10 (ATA bus error)
[ 3.900521] ata7.00: status: { DRDY }
[ 3.900524] ata7: hard resetting link
[ 3.940164] ieee1394: Host added: ID:BUS[0-00:1023] GUID[001e8c0000db6dba]
<usb stuff removed >
[ 4.430108] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4.500503] ata7.00: configured for UDMA/133
[ 4.500509] ata7: EH complete
[ 4.527134] ata7.00: exception Emask 0x10 SAct 0x1 SErr 0x780100 action 0x6
[ 4.527136] ata7.00: irq_stat 0x08000000
[ 4.527138] ata7: SError: { UnrecovData 10B8B Dispar BadCRC Handshk }
[ 4.527140] ata7.00: failed command: READ FPDMA QUEUED
[ 4.527144] ata7.00: cmd 60/08:00:20:7b:a8/00:00:ae:00:00/40 tag 0 ncq 4096 in
[ 4.527145] res 40/00:00:20:7b:a8/00:00:ae:00:00/40 Emask 0x10 (ATA bus error)
[ 4.527146] ata7.00: status: { DRDY }
[ 4.527149] ata7: hard resetting link
[ 5.050115] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 5.120551] ata7.00: configured for UDMA/133
[ 5.120557] ata7: EH complete
[ 5.128521] ata7: limiting SATA link speed to 1.5 Gbps
[ 5.128524] ata7.00: exception Emask 0x10 SAct 0x1 SErr 0x780100 action 0x6
[ 5.128525] ata7.00: irq_stat 0x08000000
[ 5.128527] ata7: SError: { UnrecovData 10B8B Dispar BadCRC Handshk }
[ 5.128529] ata7.00: failed command: READ FPDMA QUEUED
[ 5.128533] ata7.00: cmd 60/08:00:30:7a:a8/00:00:ae:00:00/40 tag 0 ncq 4096 in
[ 5.128534] res 40/00:00:30:7a:a8/00:00:ae:00:00/40 Emask 0x10 (ATA bus error)
[ 5.128535] ata7.00: status: { DRDY }
[ 5.128538] ata7: hard resetting link
[ 5.650110] ata7: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 5.720619] ata7.00: configured for UDMA/133
[ 5.720625] ata7: EH complete
[ 12.013346] EXT3-fs: INFO: recovery required on readonly filesystem.
[ 12.013348] EXT3-fs: write access will be enabled during recovery.
[ 12.042087] kjournald starting. Commit interval 5 seconds
[ 12.042094] EXT3-fs: recovery complete.
[ 12.043208] EXT3-fs: mounted filesystem with ordered data mode.

[ 169.702493] EXT4-fs (sdd1): mounted filesystem with ordered data mode
[ 179.739411] EXT4-fs (sdd2): mounted filesystem with ordered data mode

Can you help with this problem?

Provide an answer of your own, or ask LewG for more information if necessary.

To post a message you must log in.