1.5.19(0.150/4/2): missing device in /proc/partition after removing USB disk

Loh, Joe joel@pivot3.com
Wed Mar 8 16:15:00 GMT 2006


We first noticed this behavior when working with iSCSI devices.  The
behavior can be easily reproduced with USB flash disk as well.  We use 2
USB flash disk to expose the behavior.

To start with, we have both USB flash disks attached.  Once the system
recognized both USB disks, we "cat" the /proc/partitions, and saw both
disks.  We then did a "dd" on /dev/sdc to demonstrate that the device
can be read.

Then we proceed to removing the first USB disk, i.e. /dev/sdb, using the
the "Safe Removal" method from Windows.  Once that operation completes
we "cat" the /proc/partitions again.  This time, the only disk shown is
/dev/sda, which is the system disk.  The second USB disk was never
removed.  The second "dd" on /dev/sdc proves that the disk is still
accessible eventhough /proc/partitions never shows it.  The sequence of
event is captured in the following text.  We are also attaching the
cygcheck output as well.

Looking at Windows Disk Manager, it shows that physicaldrive2 is still
there, which is the /dev/sdc.

$ cat /proc/partitions
major minor  #blocks  name

    8     0  39070080 sda
    8     1     40131 sda1
    8     2  39021885 sda2
    8    16     62976 sdb
    8    17     62976 sdb1
    8    32     62976 sdc
    8    33     62896 sdc1

joel@astor ~
$ dd if=/dev/sdc count=1 bs=512 | xxd
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.08 seconds, 6.4 kB/s
0000000: fabe 007c bf00 7ab9 0001 fc0e 1f0e 07f3  ...|..z.........
0000010: a5ea 167a 0000 bbbe 7b33 c980 3f80 7506  ...z....{3..?.u.
0000020: fec5 8bf3 eb07 803f 0075 02fe c183 c310  .......?.u......
0000030: 81fb fe7b 72e5 83f9 0474 0b81 f903 0174  ...{r....t.....t
0000040: 0abb a67a eb2c bb87 7aeb 278b 4c02 8b14  ...z.,..z.'.L...
0000050: b801 02bb 007c cd13 7305 bbbe 7aeb 132e  .....|..s...z...
0000060: a1fe 7d3d 55aa 7405 bbbe 7aeb 05ea 007c  ..}=U.t...z....|
0000070: 0000 2e8a 073c 0074 0c53 bb07 00b4 0ecd  .....<.t.S......
0000080: 105b 43eb edeb fe4e 6f20 626f 6f74 6162  .[C....No bootab
0000090: 6c65 2070 6172 7469 7469 6f6e 2069 6e20  le partition in
00000a0: 7461 626c 6500 496e 7661 6c69 6420 5061  table.Invalid Pa
00000b0: 7274 6974 696f 6e20 7461 626c 6500 496e  rtition table.In
00000c0: 7661 6c69 6420 6f72 2064 616d 6167 6564  valid or damaged
00000d0: 2042 6f6f 7461 626c 6520 7061 7274 6974   Bootable partit
00000e0: 696f 6e00 5379 7374 656d 536f 6674 2042  ion.SystemSoft B
00000f0: 6f6f 7420 5061 7274 6974 696f 6e20 5365  oot Partition Se
0000100: 6374 6f72 0000 0000 0000 0000 0000 0000  ctor............
0000110: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000120: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000140: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000150: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000160: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000170: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000180: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000190: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001b0: 0000 0000 0000 0000 0000 0000 0000 0001  ................
00001c0: 0100 0603 e0d6 2000 0000 60eb 0100 0000  ...... ...`.....
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa  ..............U.

joel@astor ~
$ cat /proc/partitions
major minor  #blocks  name

    8     0  39070080 sda
    8     1     40131 sda1
    8     2  39021885 sda2

joel@astor ~
$ dd if=/dev/sdc count=1 bs=512 | xxd
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.07 seconds, 7.3 kB/s
0000000: fabe 007c bf00 7ab9 0001 fc0e 1f0e 07f3  ...|..z.........
0000010: a5ea 167a 0000 bbbe 7b33 c980 3f80 7506  ...z....{3..?.u.
0000020: fec5 8bf3 eb07 803f 0075 02fe c183 c310  .......?.u......
0000030: 81fb fe7b 72e5 83f9 0474 0b81 f903 0174  ...{r....t.....t
0000040: 0abb a67a eb2c bb87 7aeb 278b 4c02 8b14  ...z.,..z.'.L...
0000050: b801 02bb 007c cd13 7305 bbbe 7aeb 132e  .....|..s...z...
0000060: a1fe 7d3d 55aa 7405 bbbe 7aeb 05ea 007c  ..}=U.t...z....|
0000070: 0000 2e8a 073c 0074 0c53 bb07 00b4 0ecd  .....<.t.S......
0000080: 105b 43eb edeb fe4e 6f20 626f 6f74 6162  .[C....No bootab
0000090: 6c65 2070 6172 7469 7469 6f6e 2069 6e20  le partition in
00000a0: 7461 626c 6500 496e 7661 6c69 6420 5061  table.Invalid Pa
00000b0: 7274 6974 696f 6e20 7461 626c 6500 496e  rtition table.In
00000c0: 7661 6c69 6420 6f72 2064 616d 6167 6564  valid or damaged
00000d0: 2042 6f6f 7461 626c 6520 7061 7274 6974   Bootable partit
00000e0: 696f 6e00 5379 7374 656d 536f 6674 2042  ion.SystemSoft B
00000f0: 6f6f 7420 5061 7274 6974 696f 6e20 5365  oot Partition Se
0000100: 6374 6f72 0000 0000 0000 0000 0000 0000  ctor............
0000110: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000120: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000140: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000150: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000160: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000170: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000180: 0000 0000 0000 0000 0000 0000 0000 0000  ................
0000190: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001b0: 0000 0000 0000 0000 0000 0000 0000 0001  ................
00001c0: 0100 0603 e0d6 2000 0000 60eb 0100 0000  ...... ...`.....
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa  ..............U.

joel@astor ~
$ uname -a
CYGWIN_NT-5.1 astor 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin

joel@astor ~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 55347 bytes
Desc: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060308/bf649db0/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list