Red Hat / Fedora :: Difference Between Swap Tmpfs And Sysfs Filesystem?
Jun 30, 2010can anybody clarify my doubts what is the difference between swap , tmpfs and sysfs filesystem?? also what is the use of /dev/pts and /dev/shm and ?
View 3 Repliescan anybody clarify my doubts what is the difference between swap , tmpfs and sysfs filesystem?? also what is the use of /dev/pts and /dev/shm and ?
View 3 Repliescan anybody clarify my doubts what is the difference between swap and tmpfs filesystem??
also what is the use of /dev/pts and /dev/shm ?
This link, acpi: thermal/sysfs-api, explains how the new thermal management sysfs class is built, but doesn't give much information about using it. Using watch, I can see that the cur_state of cooling_device2 changes from 0 to 5 when I check "Dim display when idle" in Power Management Preferences. But I haven't found an applet that changes cooling_device0 or cooling_device1.
Echoing different integers to the cur_state files limits the maximum cpu frequency for cpu0 and cpu1, respectively. This behaviour is expected from what I've read, and mimics the options in Windows power manager for extending battery life by throttling the CPUs. I've had no luck with google and local man pages, so has anybody has seen an applet for controlling /sys/class/thermal/cooling_device[0|1]/cur_state?
On a side note, a value of 1 does slow the CPU down, but it will still hit 100C (normal for an Intel mobile duo core). However, values of 2 and larger throttle enough to lower the maximum CPU temp. Since the CPU temp is a good indicator of power consumption, it's pretty obvious that these two cur_state files are intended to extend battery life. dd_wizard
I just got a new hard disk so that my "/" and "/home" partitions would be located at their own separate drives. All was well until i tried to expand my "/home" partition to fill up the entire drive that used to also have the "/" and swap partitions on there. Let me sketch the before-and-after scenario in GParted,
Before:
What actually happened after:
Gparted gave an error prompt after which i found out that the entire ext3 partition (/home) had been moved to the left but not yet expanded to the right, which is of course not a problem. However, for some reason it has labelled the entire ext3 partition as a swap partition!
I'm still running ubuntu from the usb flash drive, because i dont want to risk that the (120GB) swap area will actually be used and cause my data to be lost.
I guess my question is, can i relabel the swap partition as ext3 like it was before without formatting (ie without losing data)?
Here's the output of "fdisk -l", which doesn't show the swap area (the drive in question is "/dev/sdb"):
Code:
When I run df it shows the root device is full.
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 9.4G 0 100% /
I looked at the inode usage and there is pretty much space available for root device
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 640K 103K 538K 16% /
But, when I run the du command, it shows I have used only 2G out of 9.9G.
ip-10-204-70-44:/$ du -xh --max-depth=1
14M ./etc
4.0K ./mnt[code]....
It just driving me crazy and interesting too. This is big problem for us since the root disk / is full and some of the function in our site is failing.
I am running a dual boot system with Win7 on /dev/sda and Ubuntu 10.10 on /dev/sdb
I also have a 250 GB disk I use for storing backup data, /dev/sdc
The two logical partitions on /dev/sdc (/dev/sdc2 and /dev/sdc5) each take up 2.86 GB and I would like to free up that space if possible.
Since the filesystem on /dev/sdc doesn't have an OS on it, does it still require that those two logical partitions exist?
I am very new to linux, and I have a question regarding the filesystem check (fsck). The power recently went out and when I tried to restart linux the following error appears:
*/dev/sda1 contains file system w/errors, check forced it then goes on to say..
*An error occured during the file system check. Dropping you to a shell; the system will reboot when you leave the shell. Give root password for maintenance (or type Control-D to continue) I wasn't sure what to do, but checked some other online forums and they suggested running fsck manually - so I typed in the root password - and used the command, "fsck -A -V ; echo == $? ==" it then gave the following message
*WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage
*Would you like to continue (y/n)
Again, I wasn't sure what to do so i just checked no. I then manually turned off the computer and was prompted at the beginning to press Alt-3. I was brought to another screen and it informed me one of the drives was degraded and suggested rebuilding the array. I tried doing this, but it still brings me back to the original error of, "/dev/sda1 contains file system w/errors, check forced," and the process continues.
Also, when I tried to rebuild the array, I didn't backup any of the data on our home directory before doing this (which was probably a big mistake). After being prompted to type the root password, I was able to give the ls command and look at all the directories...the home directory where our data was stored was empty and I am afraid I may have lost some information. Is there a possibility that data was lost when I was trying to rebuild using the old drives?
My linux system is running from the ram (ramfs/tmpfs). Crated a partition type 'tmpfs'. Processes are reading/ writing from/to this partition files. I am looking for utilities to sync this partition to the remote storage regularly (say, once in 10 sec). Normal copy command will produce partial files, if the copy is getting executed during a write operation.
View 2 Replies View RelatedI need to make a validation before start my application, so I read the Hard Drive serial from the /sys directory (sysfs).
So I was thinking if there is someway to star Linux without the /sys (sysfs) and put manually some files, and override the real hard disk serial.
After each boot I find 2 occurrences of WARING! Can't find hypervisor information in sysfs!
in /var/log/boot. This box is running as KVM-host, so I am a bit worried about 'warings' like these...
I just installed Gentoo.
Everything's working fine except for this error I get during bootup: udev: missing sysfs features; please update the kernel or disable the kernel's CONFIG_SYSFS_DEPRECATED option. udev may fail to work correctly
I don't know what to do with this. I built the kernel using the genkernel script. I'm using kernel 2.6.31-gentoo-r6 on an amd64 processor
so i've tried doing the whole /tmp as tmpfs thingy and it works!
View 4 Replies View RelatedNew vps with fedora 13
my fstab
none/dev/pts devptsrw00
tmpfs /dev/shm tmpfs defaults 0 0
first one works
tmpfs doesn't get mounted....
can't figure out why =
worked on fedora 10...
How can I create consistent snapshots of tmpfs or any RAM disks?
View 5 Replies View RelatedI've grown rather fond lately of creating tmpfs here and there to speed up various activities. (I think it is awesome that RAM can be mounted to a directory!) The downside though, is that this requires root privileges. I don't really like this because then I either have to go root each time I want a tmpfs, or I have to add a new line to fstab each time I want a tmpfs in some new, odd place. (This becomes doubly weird when the odd place is somewhere like inside my personal home directory.) Is there some other utility out there that can mount RAM as a filesystem, but allow mounting to be done without root privileges? It seems like this shouldn't be an issue, since a normal user has the ability to create and manipulate directories as well as borrow as much RAM as he wants.
View 2 Replies View Related1) In our tmpfs /dev/shm we have what seem to be unused/stale files. Can these be safely deleted by using 'rm'.
2) How is the space calculated for tmpfs /dev/shm?
So for instance if we have unused/stale files are these in the calculation of space used? Red Hat Enterprise Linux Server release 5.4 x86_64
Fs Size Used Avail Use% Mounted on
tmpfs 32G 25G 7.9G 76% /dev/shm
My laptop now has 8GB of memory, so I think mounting a tmpfs over /tmp is a reasonable thing to do. I also want to prepare for getting a SSD in the near future.The computer has a 1GB swap partition and I've set vm.swappiness=20
1) There is also a tmpfs mounted to /dev/shm. Both have the default size of 50%. Is there a way to get /dev/shm and /tmp to share the same capacity without doing a symlink or bind?
2) Is the swap partition a good size (is that swappiness value ok)? What happens if /tmp runs out of room? Should I increase the swap size to something really large like 15G (because I have swappiness so low...)?
Does one need to Check the Swap filesystem, from time to time
View 4 Replies View RelatedHow can I allow normal users to mount a tmpfs under any subdirectory owned by them?
View 3 Replies View RelatedOn boot, udev is giving a mount error. It appears to not have control of the /dev directory. This was finally traced to bad kernel compile, but some questions remain. Bogus information has been removed.
The kernel was built with tmpfs (CONFIG file had CONFIG_TMPFS, compiled kernel probably did not, this has been fixed.)
My system runs, probably because there is a valid /dev directory tree copied from the original 2.4.31 system.
After boot, I am getting 3 udevd running, according to "ps -A".
After re-executing /etc/rc.d/rc.udev I see only one udevd at a low id number (625).
Previously I had 2.4.31, which had udev and it was mounting using ramfs.
My fstab has:
On my previous 2.4.31 these fstab lines were:
I have been running Slackware since 1996. This is Slackware 13.1, running on a Sempron/Athlon K8, VIA chipsets. I have been fighting with this install for 2 weeks now. If I have to I will disable udev and live with a /dev directory that I setup by hand.
If udev does not have a tmpfs over the top of /dev, does it use the /dev on the harddrive or does it just fail some other way ?
Lucid on an Acer Travelmate800.Can anyone tell me why I have 0k for swap space? I allocated swap which I can see in my Disk Utility's 'volumes' display.
View 5 Replies View RelatedRAM for older machines like I use is fairly cheap these days. But flash memory is just as cheap or cheaper. So I'd like to ask about the feasibility of expanding my system's memory using flash memory. And about whether creating a partition for swap on the flash memory, or whether a swap file on the flash device, is the better way to go.
By flash memory I have in mind mainly USB sticks or what are sometimes called "pen drives." But I do also have CF and SD cards that, with the proper cheap adapter (one of which I already own for adapting CF) could be used to create extra swap space. So, what is the current consensus on the feasibility/advisability of using flash memory for swap? I've read about the limited write cycles of flash being an argument against using it for swap. But recent reading indicates to me that the limited write cycles problem applies mostly to older, smaller-capacity flash memory. Some will come out and say that, for larger-capacity flash memory, the life of the device is likely to exceed the amount of time your current computer will be useful (I think I've seen estimates in the range of 3-4 years life--minimum--for newer, higher-capacity flash memory).
A more persuasive argument I've heard against using flash memory for swap is that access times for these devices can be much slower than SATA, and maybe even IDE, hard drives. That would certainly dictate against using flash memory for swap.
So, how about some input on this issue? Anyone using flash memory for swap? If so, what kind (e.g., usb stick or SD/CF)? Are you using a swap file or a swap partition? How's system performance? Likewise, has anyone had flash-memory-used-as-swap die on them? The consequences would undoubtedly be dire. Also, has anyone measured flash memory access times to confirm or refute claims about slow access times? Are some types of flash memory better/worse than others in terms of access times?
I know it's possible, but does anyone have a URL or tutorial on how to do this?
View 3 Replies View RelatedWhen I try to boot to OpenSUSE I get the following error during boot-up: unknown filesystem type 'reiserfs' could not mount root filesystem - exiting to /bin/sh$
This only started happening quite recently - before this I could boot to Linux quite happily.
I am trying to mount a file image, like this
mount -o loop /tmp/apps.img /media/apps
But I get the following:
mount: you must specify the filesystem type
I try ext3:
mount -o loop /tmp/apps.img /media/apps -t ext3
dmesg says:
error: can't find ext3 filesystem on dev loop6.
I've also tried ext2, vfat etc. How can I detect the filesystem type of apps.img?
I have a following problem: Recently my drive with Ubuntu 9.4 has mysteriously stopped working, i.e. when I switch the computer on it informs me that GRUB didn't find the filesystem. Well, I suppose it happens.
First, I though it was due to the drive dying, but I popped it in an external enclosure and HDTune told me the drive was fine. Wanting to recover the files on the drive before reinstalling I first tried to mount it in said external enclosure under Windows (I have Win Ext2 driver installed which used to work just fine). This time, however, drive gets assigned a letter but upon opening it Windows popped up an error saying that the drive was not formatted and whether I would like to format it then.
Unfazed by this streak of failures I tried to mount it under Linux but, alas, to no avail. I might have tried every single -t operator under mount command but it still won't budge and let me mount.
I've had a look at some similar threads but as I'm very new to linux they're already a bit technical for me. Sorry, this calls for someone with patience. I gather from other threads that disconnecting an external drive without unmounting is a no-no, and this seems to be the likely cause. Now the disk is read only and I'm unable to change any settings through the usual control panel on ubuntu. I'm just not familiar with the terminal instructions. I tried to cut and past a few command lines from other threads but I got some warnings that proceding could damage data. Like this one: WARNING! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage.
View 5 Replies View RelatedI'm running fedora 11 on Dell laptop. I find that fedora is using swap space even if memory is available.
Isn't it slower to use swap ?? Or Am I just missing something ?
I installed Fedora 14, but I noticed that is not using my swap (4GB) space. Allways show 0.0% usage. In Fedora 13 it worked fine.
Code:
[root@localhost ~]# free -m
total used free shared buffers cached
[code]....
What is the difference between su - and su? Both ask me for password. Bothe report "root" when asked whoami
View 6 Replies View Related