2013-01-15 06:02:14

by Prashant Shah

[permalink] [raw]
Subject: debuge2fs not displaying /dev folder

Hi,

When using debuge2fs on a ext3 partition the /dev partition does not
show any entries at all. While running it on a ext4 partition only
part of entries are shown for /dev.

Below is the list of files and folder within /dev folder residing on a
ext4 partition. Using "debugfs" shows around 92 entries while "ls"
shows around 217 entries. A block level dump also shows the same
folders as "debugfs".

--------------------- debugfs --------------------
3014659 (12) . 2 (12) .. 3014663 (12) fd 3014664 (16) mapper
3014665 (12) pts 3014666 (12) shm 3014667 (16) agpgart
3014668 (16) audio 3014669 (16) audio1 3014670 (16) audio2
3014671 (16) audio3 3014672 (16) audioctl 3014673 (16) console
3014674 (12) core 3014675 (12) dsp 3014676 (12) dsp1
3014677 (12) dsp2 3014678 (12) dsp3 3014679 (12) full
3014680 (12) fuse 3014681 (12) kmem 3014682 (16) loop0
3014683 (16) loop1 3014684 (16) loop2 3014685 (16) loop3
3014686 (16) loop4 3014687 (16) loop5 3014688 (16) loop6
3014689 (16) loop7 3014690 (12) mem 3014691 (16) midi0
3014692 (16) midi00 3014693 (16) midi01 3014694 (16) midi02
3014695 (16) midi03 3014696 (16) midi1 3014697 (16) midi2
3014698 (16) midi3 3014699 (16) mixer 3014700 (16) mixer1
3014701 (16) mixer2 3014702 (16) mixer3 3014703 (20) mpu401data
3014704 (20) mpu401stat 3014705 (12) null 3014706 (12) port
3014707 (12) ptmx 3014708 (12) ram 3014709 (12) ram0
3014710 (12) ram1 3014711 (16) ram10 3014712 (16) ram11
3014713 (16) ram12 3014714 (16) ram13 3014715 (16) ram14
3014716 (16) ram15 3014717 (16) ram16 3014718 (12) ram2
3014719 (12) ram3 3014720 (12) ram4 3014721 (12) ram5
3014722 (12) ram6 3014723 (12) ram7 3014724 (12) ram8
3014725 (12) ram9 3014726 (16) random 3014727 (16) rmidi0
3014728 (16) rmidi1 3014729 (16) rmidi2 3014730 (16) rmidi3
3014731 (20) sequencer 3014732 (16) smpte0 3014733 (16) smpte1
3014734 (16) smpte2 3014735 (16) smpte3 3014736 (16) sndstat
3014737 (16) stderr 3014738 (16) stdin 3014739 (16) stdout
3014740 (12) tty 3014741 (12) tty0 3014742 (12) tty1
3014743 (12) tty2 3014744 (12) tty3 3014745 (12) tty4
3014746 (12) tty5 3014747 (12) tty6 3014748 (12) tty7
3014749 (12) tty8 3014750 (12) tty9 3014751 (16) urandom
3014752 (2784) zero

--------- from ls -----------
autofs ecryptfs loop6 pts random sr0
tty2 tty35 tty50 tty9 ttyS22 uinput vcsa2
block fb0 loop7 ram0 rfkill stderr
tty20 tty36 tty51 ttyprintk ttyS23 urandom vcsa3
bsg fd loop-control ram1 rtc stdin
tty21 tty37 tty52 ttyS0 ttyS24 usbmon0 vcsa4
btrfs-control full lp0 ram10 rtc0 stdout
tty22 tty38 tty53 ttyS1 ttyS25 usbmon1 vcsa5
bus fuse mapper ram11 sda tty
tty23 tty39 tty54 ttyS10 ttyS26 usbmon2 vcsa6
cdrom hidraw0 mcelog ram12 sda1 tty0
tty24 tty4 tty55 ttyS11 ttyS27 vboxdrv vg
cdrw hpet mem ram13 sda2 tty1
tty25 tty40 tty56 ttyS12 ttyS28 vboxnetctl vga_arbiter
char input net ram14 sda3 tty10
tty26 tty41 tty57 ttyS13 ttyS29 vboxusb zero
console kmsg network_latency ram15 sda4 tty11
tty27 tty42 tty58 ttyS14 ttyS3 vcs
core kvm network_throughput ram2 sda5 tty12
tty28 tty43 tty59 ttyS15 ttyS30 vcs1
cpu log null ram3 sda6 tty13
tty29 tty44 tty6 ttyS16 ttyS31 vcs2
cpu_dma_latency loop0 oldmem ram4 sda7 tty14
tty3 tty45 tty60 ttyS17 ttyS4 vcs3
disk loop1 parport0 ram5 sg0 tty15
tty30 tty46 tty61 ttyS18 ttyS5 vcs4
dm-0 loop2 port ram6 sg1 tty16
tty31 tty47 tty62 ttyS19 ttyS6 vcs5
dri loop3 ppp ram7 shm tty17
tty32 tty48 tty63 ttyS2 ttyS7 vcs6
dvd loop4 psaux ram8 snapshot tty18
tty33 tty49 tty7 ttyS20 ttyS8 vcsa
dvdrw loop5 ptmx ram9 snd tty19
tty34 tty5 tty8 ttyS21 ttyS9 vcsa1

Regards.


2013-01-15 17:45:06

by Andreas Dilger

[permalink] [raw]
Subject: Re: debuge2fs not displaying /dev folder


On 2013-01-14, at 11:01 PM, Prashant Shah wrote:
> When using debuge2fs on a ext3 partition the /dev partition does not
> show any entries at all. While running it on a ext4 partition only
> part of entries are shown for /dev.
>
> Below is the list of files and folder within /dev folder residing on
> a ext4 partition. Using "debugfs" shows around 92 entries while "ls"
> shows around 217 entries. A block level dump also shows the same
> folders as "debugfs".

The first and most important question is whether "/dev" is a real
filesystem, or if it is a virtual (e.g. "tmpfs" type) filesystem
on your machine?

> --------------------- debugfs --------------------
> 3014659 (12) . 2 (12) .. 3014663 (12) fd 3014664 (16) mapper
> 3014665 (12) pts 3014666 (12) shm 3014667 (16) agpgart
>
>
> --------- from ls -----------
> autofs ecryptfs loop6 pts random sr0
> tty2 tty35 tty50 tty9 ttyS22 uinput vcsa2
> block fb0 loop7 ram0 rfkill stderr

It would be useful to show "ls -li" information for some of the
entries that appear via debugfs (e.g. "fd", "pts", and "shm" above),
and also some of the entries that do not appear in debugfs.

Cheers, Andreas






2013-01-15 18:05:41

by Prashant Shah

[permalink] [raw]
Subject: Re: debuge2fs not displaying /dev folder

Hi,

On Tue, Jan 15, 2013 at 11:13 PM, Andreas Dilger <[email protected]> wrote:
>
>
> The first and most important question is whether "/dev" is a real
> filesystem, or if it is a virtual (e.g. "tmpfs" type) filesystem
> on your machine?

Its "devtmpfs"

> It would be useful to show "ls -li" information for some of the
> entries that appear via debugfs (e.g. "fd", "pts", and "shm" above),
> and also some of the entries that do not appear in debugfs.
>
> Cheers, Andreas

shows in debugfs :
6742 brw-rw---- 1 root disk 7, 0 Jan 15 21:45 loop0
6725 brw-rw---- 1 root disk 1, 0 Jan 15 21:45 ram0
1057 crw--w---- 1 root tty 4, 9 Jan 15 21:45 tty9

doesnt show in debugfs :
6753 crw------- 1 root root 251, 0 Jan 15 21:45 usbmon0
1866 crw-rw---- 1 root tty 7, 6 Jan 15 21:45 vcs6
1217 brw-rw---- 1 root disk 8, 0 Jan 15 21:45 sda

Regards.

2013-01-15 18:43:15

by Eric Sandeen

[permalink] [raw]
Subject: Re: debuge2fs not displaying /dev folder

On 1/15/13 11:43 AM, Andreas Dilger wrote:
>
> On 2013-01-14, at 11:01 PM, Prashant Shah wrote:
>> When using debuge2fs on a ext3 partition the /dev partition does not
>> show any entries at all. While running it on a ext4 partition only
>> part of entries are shown for /dev.
>>
>> Below is the list of files and folder within /dev folder residing on
>> a ext4 partition. Using "debugfs" shows around 92 entries while "ls"
>> shows around 217 entries. A block level dump also shows the same
>> folders as "debugfs".
>
> The first and most important question is whether "/dev" is a real
> filesystem, or if it is a virtual (e.g. "tmpfs" type) filesystem
> on your machine?

was going to say the same thing; try

# mount | grep "on /dev"

>> --------------------- debugfs --------------------
>> 3014659 (12) . 2 (12) .. 3014663 (12) fd 3014664 (16) mapper
>> 3014665 (12) pts 3014666 (12) shm 3014667 (16) agpgart
>>
>>
>> --------- from ls -----------
>> autofs ecryptfs loop6 pts random sr0
>> tty2 tty35 tty50 tty9 ttyS22 uinput vcsa2
>> block fb0 loop7 ram0 rfkill stderr
>
> It would be useful to show "ls -li" information for some of the
> entries that appear via debugfs (e.g. "fd", "pts", and "shm" above),
> and also some of the entries that do not appear in debugfs.

Yep, I'm guessing you are seeing some installer-created devices in the root fs's
/dev but that something has been mounted over the top of it.

-Eric


> Cheers, Andreas



2013-01-15 20:14:44

by Theodore Ts'o

[permalink] [raw]
Subject: Re: debuge2fs not displaying /dev folder

On Tue, Jan 15, 2013 at 11:31:53AM +0530, Prashant Shah wrote:
>
> When using debuge2fs on a ext3 partition the /dev partition does not
> show any entries at all. While running it on a ext4 partition only
> part of entries are shown for /dev.

Are you sure you don't have a pseudo-filesystem mounted on top of
/dev?

What does "df /dev" report. If it's something like this, you are
using a pseudo-filesystem for /dev:

% df /dev
Filesystem 1K-blocks Used Available Use% Mounted on
udev 10240 0 10240 0% /dev

In that case, what debugfs is showing is the entries in your /dev
directory before the udev file system is mounted on top of /dev.

Regards,

- Ted

2013-01-16 15:46:37

by Prashant Shah

[permalink] [raw]
Subject: Re: debuge2fs not displaying /dev folder

Hi,

On Wed, Jan 16, 2013 at 1:44 AM, Theodore Ts'o <[email protected]> wrote:
> Are you sure you don't have a pseudo-filesystem mounted on top of
> /dev?
>
> What does "df /dev" report. If it's something like this, you are
> using a pseudo-filesystem for /dev:
>
> % df /dev
> Filesystem 1K-blocks Used Available Use% Mounted on
> udev 10240 0 10240 0% /dev
>

Thanks ! I booted into live cd and listed the files in the unmounted
/dev and I can see the exact same number of files as shown by debugfs.

Regards.