LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-05-2012, 03:09 AM   #16
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,763

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470

I don't see the point in having a tmpfs which is only used for mounting removable devices. Am I missing something?
 
Old 12-05-2012, 04:11 AM   #17
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
Quote:
Originally Posted by gnashley View Post
I don't see the point in having a tmpfs which is only used for mounting removable devices. Am I missing something?
yeah, I wondered that too. I guess it at least ensures nothing else is put there permanently? Also the directories are possibly managed more easily that way too, as they would be created on demand and not need to persist?
 
Old 12-05-2012, 09:46 AM   #18
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,232

Rep: Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577
The mountpoints are created within the tmpfs /media. So access to it is /media/<name>.

The mountpoint name is either based on the volume name, or possibly from a UUID name.

Unless you clean up the directory on removal (it does), you end up forcing a lot of disk churn just creating/deleting mountpoints. Making it tmpfs avoids that churn, and this in turn helps situations with systems based on flash memory as no actual writes to a disk occur.
 
Old 12-05-2012, 12:38 PM   #19
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
Quote:
Originally Posted by jpollard View Post
The mountpoints are created within the tmpfs /media. So access to it is /media/<name>.

The mountpoint name is either based on the volume name, or possibly from a UUID name.

Unless you clean up the directory on removal (it does), you end up forcing a lot of disk churn just creating/deleting mountpoints. Making it tmpfs avoids that churn, and this in turn helps situations with systems based on flash memory as no actual writes to a disk occur.
significant IO load from creating one directory?? Pfft, no way!
 
Old 12-05-2012, 01:06 PM   #20
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,232

Rep: Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577
Yes. Very significant to SSD.

creating/deleting a directory requires at a minimum of one block replacement. On an SSD, that may actually require rewriting several blocks - the pointer to the current block (the new block is not the same as the original like it is on a physical disk), the block iteslf (block replaced... unless a directory split occurs - then it becomes 4). And that would be on each insert/removal of a device. And then there are the inode blocks, and the allocation maps... Not to mention the timestamps...

Now you CAN eliminate the multiple updates due to timestamps (just have the filesystem mounted noatime), but you can't eliminate the updates due to creation.

And it is even more significant to speed. tmpfs is many times faster.

All it really does is minimize wear and tear on ssd/memory sticks with a limited lifetime use.

I'm just wondering how long it will be before /var/lock is moved to another filesystem mounted tmpfs (I would guess at something like /run/lock...)

Now, do I think everything tmpfs is used for appropriate? Nope. Is speed all that important? Not to workstations.

Not good on servers at all - the memory itself is more useful elsewhere, and in addition, there are very few USB devices plugged into/removed from servers anyway.
 
1 members found this post helpful.
Old 12-05-2012, 02:48 PM   #21
GazL
Senior Member
 
Registered: May 2008
Posts: 3,425

Rep: Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937Reputation: 937
There already is a "/run/lock", but replacing /var/lock with it is a mistake. Not all locks should be cleared on a system reboot. Sometimes you need them to persist. Moving those locks that can and should be cleared on a reboot to /run/lock does make sense however.
 
Old 12-05-2012, 07:47 PM   #22
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
I think /media is going away completely. Arch Linux has already done so.
It is only part of the 'old' udisks1 package which uses it.
http://thread.gmane.org/gmane.linux.arch.devel/18670
 
Old 12-06-2012, 06:14 AM   #23
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,232

Rep: Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577
The problem with putting it in /run/media where /run is a tmpfs, is again, security. It allows users to put anything into a directory (at a minimum by volumne/UUID naming of the plug in). And thus causing other system issues.

It might be very difficult to exploit though... and rather unlikely.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Chakra Linux Review: Arch For Mortals LXer Syndicated Linux News 0 01-03-2012 04:10 PM
LXer: SQL Queries for Mere Mortals LXer Syndicated Linux News 0 11-16-2007 03:30 AM
Debian unstable for mortals reverse Debian 22 08-12-2007 02:01 AM
can lower run levels boost usefulness of older computers? dr_zayus69 Linux - Software 4 08-29-2005 06:25 PM
How do you configure machine seucurely that mortals can log into? maxque Linux - Security 4 05-04-2005 09:47 PM


All times are GMT -5. The time now is 02:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration