[buug] IDE drive recognition

Bill Honeycutt wfhoney at pacbell.net
Fri Nov 5 10:53:41 PST 2004


First, I moved the disk drive in question into a box with a warmer, 
fuzzier 2.6 kernel Sarge installation.  I physically attached this to 
ide0 as a slave and it shows up as /dev/hdb[1-5].

To cut to the chase, look at this line in the output from strace...

------------------------ snip --------------------
wfh:/proc# strace -o mount.log mount -t ext2 /dev/hdb1 /data
...
lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
stat64("/sbin/mount.ext2", 0xbffffb00)  = -1 ENOENT (No such file or 
directory)
rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN], NULL, 8) = 0
mount("/dev/hdb1", "/data", "ext2", 0xc0ed0000, 0) = -1 EBUSY (Device or 
resource busy)
rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN], NULL, 8) = 0
write(2, "mount: /dev/hdb1 already mounted"..., 47) = 47
umask(077)                              = 033
open("/etc/mtab", O_RDONLY|O_LARGEFILE) = 3
...
------------------------ snap --------------------

I'm focusing on the line that says, "stat64("/sbin/mount.ext2", 
0xbffffb00)  = -1 ENOENT (No such file or directory)".

As per your suggestion, here's the output from /proc/partitions along 
with other output in the warm-fuzzy environment:

------------------------ snip --------------------
wfh:/proc# cat partitions
major minor  #blocks  name

   3     0   19551168 hda
   3     1      56196 hda1
   3     2    9767520 hda2
   3     3    9727357 hda3
   3    64   40021632 hdb
   3    65   25598128 hdb1
   3    66     204120 hdb2
   3    67     771120 hdb3
   3    68          1 hdb4
   3    69   13441648 hdb5
 254     0   25598128 dm-0
 254     1     204120 dm-1
 254     2     771120 dm-2
 254     3   13441648 dm-3
------------------------ snap --------------------

All partitions on this old drive are showing up.

------------------------ snip --------------------
wfh:/# mount
/dev/hda2 on / type ext2 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /boot type ext2 (rw)
/dev/hda3 on /usr type ext2 (rw)
usbfs on /proc/bus/usb type usbfs (rw)

wfh:/proc# cat mounts
rootfs / rootfs rw 0 0
/dev2/root2 / ext2 rw 0 0
proc /proc proc rw,nodiratime 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/hda1 /boot ext2 rw 0 0
/dev/hda3 /usr ext2 rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0

wfh:/proc# dmesg | grep hd
Kernel command line: root=/dev/hda2 ro
    ide0: BM-DMA at 0x2460-0x2467, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0x2468-0x246f, BIOS settings: hdc:pio, hdd:pio
hda: WDC WD200BB-75CLB0, ATA DISK drive
hdb: Maxtor 4D040H2, ATA DISK drive
hda: max request size: 128KiB
hda: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=38792/16/63, UDMA(100)
hdb: max request size: 128KiB
hdb: 80043264 sectors (40982 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)
ext3: No journal on filesystem on hda2

wfh:/proc# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda2       /               ext2    defaults,errors=remount-ro 0       1
/dev/hda1       /boot           ext2    defaults        0       2
/dev/hda3       /usr            ext2    defaults        0       2
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
------------------------ snap --------------------



Michael Paoli wrote:

>Some things to try/examine ...
>
>What if you drop the trailing slash (/) on the directory
>mount point on the mount(8) command and/or make it consistent
>between mount(8) command and /etc/fstab.
>
>Do you get the same results if the mount(8) command gives
>the filesystem device, but not the mount point? ... or
>the mount point (with or without the trailing slash) without the
>filesystem device?
>  
>

I tried with and without the trailing slash.  Also, I tried it by 
mounting with an fstab description and with 'mount -t ext3 /dev/hdc1 
/mnt/hdc1' with the same result.



More information about the buug mailing list