At Tue, 06 Jul 2010 18:41:06 +0800 CentOS mailing list <centos@xxxxxxxxxx> 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? /dev is mounted from a *ramdisk* -- swapping to a RAM disk makes really no sense. With a modern (eg 2.6 kernel w/udev), /dev is created fresh at boot time and only contains device node files, generally created on-the-fly by udevd. > -- Robert Heller -- Get the Deepwoods Software FireFox Toolbar! Deepwoods Software -- Linux Installation and Administration http://www.deepsoft.com/ -- Web Hosting, with CGI and Database heller@xxxxxxxxxxxx -- Contract Programming: C/C++, Tcl/Tk _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos