Skip to contentSkip to conversation

cleaning up udev nodes after crash

DISCUSSION Jon Smirl 4 participants 7 messages Jan 3, 2004

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

Since I write device drivers I keep killing my box and rebooting (especially when I misprogram DMA registers). After a crash all of the device nodes in /udev are permamently in /udev. starting/stopping udev won't clean them up. I can clean up manually with rm -rf /udev but shouldn't this happen automatically?

I though udev was a virtual file system, why do the nodes endup on disk anyway? At least I think they are on disk, I stopped udev and they are still there.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 1 line · Jon Smirl

I though udev was a virtual file system,

Unlike devfs, it doesn't have its own special filesystem. It just puts things in whatever filesystem you've already got mounted there.

Quoted 2 lines

why do the nodes endup on disk anyway? At least I think they are on disk, I stopped udev and they are still there.

So mount a tmpfs there before starting udev, and it should vanish when you reboot.

-Dave Dodge

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#2 lore raw
In reply to Jon Smirl

The tip about putting udev on a tmpfs should probably go into the documentation. Is there any reason not to recommend always putting udev on a tmpfs?

Quoted 2 lines · --- Dave Dodge

So mount a tmpfs there before starting udev, and it should vanish when you reboot.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Jon Smirl
Quoted 4 lines · Jon Smirl

Since I write device drivers I keep killing my box and rebooting (especially when I misprogram DMA registers). After a crash all of the device nodes in /udev are permamently in /udev. starting/stopping udev won't clean them up. I can clean up manually with rm -rf /udev but shouldn't this happen automatically?

The old udev shutdown script used to do this. If you want, you can change it back.

But as you are crashing your box, and you aren't using a ramfs filesystem for /udev, it will stick around, sorry.

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to Jon Smirl
Quoted 2 lines · Jon Smirl

The tip about putting udev on a tmpfs should probably go into the documentation. Is there any reason not to recommend always putting udev on a tmpfs?

People who care about extended attributes of device nodes, like to keep their /dev on a filesystem that supports them (ext2, ext3, etc.)

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#5 lore raw
In reply to Jon Smirl
Quoted 6 lines · Greg KH
Quoted 2 lines · Jon Smirl

The tip about putting udev on a tmpfs should probably go into the documentation. Is there any reason not to recommend always putting udev on a tmpfs?

People who care about extended attributes of device nodes, like to keep their /dev on a filesystem that supports them (ext2, ext3, etc.)

Won't this be a problem when the kernel switches to dynamic major/minor numbers?

I wouldn't want to open up /udev/dsp just to find out it's actually /udev/kmem this boot.

JE

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#6 lore raw
In reply to Jon Smirl
Quoted 10 lines · Johannes Erdfelt
Quoted 6 lines · Greg KH
Quoted 2 lines · Jon Smirl

The tip about putting udev on a tmpfs should probably go into the documentation. Is there any reason not to recommend always putting udev on a tmpfs?

People who care about extended attributes of device nodes, like to keep their /dev on a filesystem that supports them (ext2, ext3, etc.)

Won't this be a problem when the kernel switches to dynamic major/minor numbers?

Yes it would.

Quoted 2 lines

I wouldn't want to open up /udev/dsp just to find out it's actually /udev/kmem this boot.

Exactly, not a good thing. Then it would not be a good thing to keep /dev on a persistant filesystem.

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel