Re: [gentoo-user] conflict in fstab w/ lvm?
On Fri, 12 Jun 2009 22:47:50 -0300, Daniel da Veiga wrote: You have only two choices, being an eee user myself, and having it upgraded to 2GB RAM, I choose the tempfs filesystem for /tmp (RAM) instead of keeping temporary files writen and deleted from my poor SSD. If you have low RAM, you can decide to leave it on the SSD and thus give more room for app data on RAM. I use tmpfs for /tmp with a 1GB Eee, /tmp usage is usually small, less than a MB. PORTAGE_TMPDIR, on the other hand getslots of writes, so I have than on a cheap, replaceable SD card. -- Neil Bothwick Life is a sexually transmitted disease and the mortality rate is 100%. signature.asc Description: PGP signature
[gentoo-user] conflict in fstab w/ lvm?
Hi group, Following the LVM2 gentoo doc I have in fstab: ... /dev/vg/tmp /tmp ext2 noatime 0 2 ... But also(suggested by the eee forum): ... #shm/dev/shmtmpfs nodev,nosuid,noexec 0 0 tmpfs /tmptmpfs defaults,noatime,mode=1777 0 0 Is this legal? Mounting two things at the same place? Maxm
Re: [gentoo-user] conflict in fstab w/ lvm?
On Fri, Jun 12, 2009 at 16:45, Maxim Wexlermaxim.wex...@gmail.com wrote: Hi group, Following the LVM2 gentoo doc I have in fstab: ... /dev/vg/tmp /tmp ext2 noatime 0 2 ... But also(suggested by the eee forum): ... #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 Is this legal? Mounting two things at the same place? AFAIK, no. First off, what do you want to do? The EEE forum suggested mounting /tmp using tmpfs cause that keep temporary stuff on your RAM, not disk, this way you reduce disk access. Its your decision to use RAM for /tmp or disk (LVM logical volume). Obviously you can't have both (it doesn't even make sense). -- Daniel da Veiga
Re: [gentoo-user] conflict in fstab w/ lvm?
Am Freitag 12 Juni 2009 21:54:45 schrieb Daniel da Veiga: Is this legal? Mounting two things at the same place? AFAIK, no. Yes. However, unless you do union mounts, you'll only see what's mounted last. Bye... Dirk signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] conflict in fstab w/ lvm?
On 6/12/09, Daniel da Veiga danieldave...@gmail.com wrote: On Fri, Jun 12, 2009 at 16:45, Maxim Wexlermaxim.wex...@gmail.com wrote: Hi group, Following the LVM2 gentoo doc I have in fstab: ... /dev/vg/tmp /tmp ext2 noatime 0 2 ... But also(suggested by the eee forum): ... #shm/dev/shmtmpfs nodev,nosuid,noexec 0 0 tmpfs /tmptmpfs defaults,noatime,mode=1777 0 0 Is this legal? Mounting two things at the same place? AFAIK, no. First off, what do you want to do? The EEE forum suggested mounting I want to create a useful, trouble-free genteee box. mw
Re: [gentoo-user] conflict in fstab w/ lvm?
On 6/12/09, Mike Kazantsev mk.frag...@gmail.com wrote: On Fri, 12 Jun 2009 13:45:04 -0600 Maxim Wexler maxim.wex...@gmail.com wrote: #shm /dev/shmtmpfs nodev,nosuid,noexec 0 0 I wonder, what's the rationale behind commenting out shm? Good question. I was given to understand the new line was intended to replaced the default, which I commented out. Perhaps that's a mistake. That's how I configured the previous iteration of genteee before it went south; maybe the new line had something to do with it. Should I use both? mw
Re: [gentoo-user] conflict in fstab w/ lvm?
On Fri, Jun 12, 2009 at 18:46, Maxim Wexlermaxim.wex...@gmail.com wrote: On 6/12/09, Daniel da Veiga danieldave...@gmail.com wrote: On Fri, Jun 12, 2009 at 16:45, Maxim Wexlermaxim.wex...@gmail.com wrote: Hi group, Following the LVM2 gentoo doc I have in fstab: ... /dev/vg/tmp /tmp ext2 noatime 0 2 ... But also(suggested by the eee forum): ... #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 Is this legal? Mounting two things at the same place? AFAIK, no. First off, what do you want to do? The EEE forum suggested mounting I want to create a useful, trouble-free genteee box. You have only two choices, being an eee user myself, and having it upgraded to 2GB RAM, I choose the tempfs filesystem for /tmp (RAM) instead of keeping temporary files writen and deleted from my poor SSD. If you have low RAM, you can decide to leave it on the SSD and thus give more room for app data on RAM. -- Daniel da Veiga
Re: [gentoo-user] conflict in fstab w/ lvm?
On Fri, Jun 12, 2009 at 5:52 PM, Maxim Wexlermaxim.wex...@gmail.com wrote: On 6/12/09, Mike Kazantsev mk.frag...@gmail.com wrote: On Fri, 12 Jun 2009 13:45:04 -0600 Maxim Wexler maxim.wex...@gmail.com wrote: #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 I wonder, what's the rationale behind commenting out shm? Good question. I was given to understand the new line was intended to replaced the default, which I commented out. Perhaps that's a mistake. That's how I configured the previous iteration of genteee before it went south; maybe the new line had something to do with it. Should I use both? mw Hmm. 1) a tmpfs space is, by default, mounted on /dev/shm to meet some standard somewhere (can't recall, FHS I think). The important thing to note is that the name 'shm' is basically an unused placeholder (tmpfs doesn't operate on an actual block device like /dev/hda1), and that /dev/shm is the mount *point*. It should be there, and uncommented. 2) Yes it's 'legal' to mount the lvm volume onto /tmp *and* tmpfs space as you have your fstab lines there, but I can't say for sure which would truly be mounted first and which second, and in turn which would actually be used in the running system. IF you intend to use your system RAM to reduce read/write on your drive for temporary files, comment out the use of the LVM volume on /tmp and just leave the tmpfs mount on that point active (commenting leaves you free to change your mind anytime you like). 3) Vaguely related to your mention of it 'taking its place' about the /dev/shm and /tmp tmpfs mounts, the only time I've seen that mentioned was in a conversation somewhere about 'why not just use a --bind mount of /dev/shm onto /tmp to put it in tmpfs' ... which was answered with the simple fact that, by default everywhere I've seen it, /dev/shm is mounted noexec, while it's not altogether uncommon for things to be decompressed into /tmp before execution (which would fail if /tmp were mounted noexec). -- Poison [BLX] Joshua M. Murphy Without a struggle, there can be no progress. - Frederick Douglass
Re: [gentoo-user] conflict in fstab w/ lvm?
On Fri, 12 Jun 2009 21:52:20 -0400 Joshua Murphy poiso...@gmail.com wrote: On Fri, Jun 12, 2009 at 5:52 PM, Maxim Wexlermaxim.wex...@gmail.com wrote: On 6/12/09, Mike Kazantsev mk.frag...@gmail.com wrote: On Fri, 12 Jun 2009 13:45:04 -0600 Maxim Wexler maxim.wex...@gmail.com wrote: #shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 I wonder, what's the rationale behind commenting out shm? Good question. I was given to understand the new line was intended to replaced the default, which I commented out. Perhaps that's a mistake. That's how I configured the previous iteration of genteee before it went south; maybe the new line had something to do with it. Should I use both? Hmm. 1) a tmpfs space is, by default, mounted on /dev/shm to meet some standard somewhere (can't recall, FHS I think). The important thing to note is that the name 'shm' is basically an unused placeholder (tmpfs doesn't operate on an actual block device like /dev/hda1), and that /dev/shm is the mount *point*. It should be there, and uncommented. ... 3) Vaguely related to your mention of it 'taking its place' about the /dev/shm and /tmp tmpfs mounts, the only time I've seen that mentioned was in a conversation somewhere about 'why not just use a --bind mount of /dev/shm onto /tmp to put it in tmpfs' ... which was answered with the simple fact that, by default everywhere I've seen it, /dev/shm is mounted noexec, while it's not altogether uncommon for things to be decompressed into /tmp before execution (which would fail if /tmp were mounted noexec). Indeed it should be there, it's as a shared memory for inter-process communication (IPC). Many stuff uses shared memory, notably gcc and multi-process daemons like apache, so you should give it to them. And, as noted, tmpfs is not real device or even some single virtual device. By mount -t tmpfs none /tmp you mount some piece of virtual memory to a place but it's never the same piece, so you can have two, ten or hundred tmpfs mounts completely independent of each other. mkdir /mnt/{tmp1,tmp2} mount -t tmpfs none /mnt/tmp1 mount -t tmpfs none /mnt/tmp2 touch /mnt/tmp1/some_file ls -la /mnt/tmp1 (shows some_file ls -la /mnt/tmp2 (empty) So you don't have to bind everything into one tmpfs, just create as many as you want, but, once again, especially if you chose not to have swap, limit their size so they won't eat all your RAM! Imagine scenario like this (or do sync and run it, but it should hang your machine!): mount -t tmpfs none /mnt/tmp1 dd if=/dev/zero of=/mnt/tmp1/some_file bs=1024 count=10 Your VM should go away and kernel 'll go on a killing spree, wiping out all the runnuing processes, but, since tmpfs itself is not a process, it'll just kill everything until panic or nothing's left at all. -o size=512M will just give you No free space on disk instead of nasty crash. /tmp is world-writable, anything can choose to ditch a gig or two into it for whatever reasons... -- Mike Kazantsev // fraggod.net signature.asc Description: PGP signature