[CentOS] why i can not put my swap files in /dev?

Tue Jul 6 15:53:34 UTC 2010
Robert Heller <heller at deepsoft.com>

At Tue, 06 Jul 2010 22:30:10 +0800 CentOS mailing list <centos at centos.org> wrote:

> 
> 
> 
> In the past I only heard that /proc and /sys are "RAM directories", now 

/proc and /sys are psuedo directories -- they hook into kernel data structures.

> I get /dev as well. thank you.

With 2.6 kernels and udev, /dev has become a RAMDISK that is freshly
populated at boot time by udevd and related code (HAL and the hotplug
system). 

> 
> Tang Jianwei
> 
> 
> On 07/06/2010 10:14 PM, John Kennedy wrote:
> >
> >
> > On Tue, Jul 6, 2010 at 10:01 AM, <m.roth at 5-cent.us 
> > <mailto:m.roth at 5-cent.us>> wrote:
> >
> >     Jerry McAllister wrote:
> >     > On Tue, Jul 06, 2010 at 06:41:06PM +0800, Tang Jianwei wrote:
> >     >
> >     >> I tried to create some swap files in /dev directory for my desktop.
> >     >> the dd and mkswap were ok. but when I try to swapon it, i get this:
> >     >>
> >     >> # swapon /dev/myswap
> >     >> swapon: /dev/myswap: Invalid argument
> >     >>
> >     >> but when I mv the file to some other directory like /mnt or /, the
> >     >> swapon works.
> >     >>
> >     >> could sb. tell me why?
> >
> >     Well, /dev is *not* a good place for anything but device files.
> >     >
> >     > /dev is not a real directory for data files.
> >     <snip>
> >     Um, er, what do you mean about it not being a "real" directory?
> >
> >              mark
> >
> >
> > I would say he means "real" as exists on a hard drive like /home of 
> > /var as opposed to "virtual" as exists in RAM like /proc.
> > John
> > -- 
> > John Kennedy
> >
> >
> > _______________________________________________
> > CentOS mailing list
> > CentOS at centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> >    
> 
> MIME-Version: 1.0
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>         

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/