LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-08-2008, 04:38 AM   #1
grim2
LQ Newbie
 
Registered: Jan 2004
Posts: 18

Rep: Reputation: 0
How to increase tmp partition - mount loop device


Hi.

I've installed linux server (Linux Version 2.6.18-1.2798. fc6) with small /tmp partition (it happens that it is 100% full).

So, I've decided to create my own loop device on /var partition (which is very large) and replace /tmp partition with that

new partition on loop device.

I've done these steps:

1)
dd if=/dev/zero of=/var/disk-image count=204800000
2)
mkfs.ext3 -q /var/disk_image
3)
mkdir /virtual_fs
mount -o loop=/dev/loop0 /var/disk-image /virtual_fs

(These last two commands are only for testing and everthing works ok - I see partition with df -h, can read and write to it).

Here is the problem: what line do I need to to put in /etc/fstab so that partition is mounted at startup?
I tried with:

/var/disk-image /virtual_fs ext3 rw,loop,auto 0 0

, and got error on startup:

Mounting local file system: /var/disk_image Permission denied

I also have tried with other options in fstab with same result.

I need to fix this so that I can remove from fstab line for /tmp partition and replace it with line:

/var/disk-image /tmp rw,loop,auto 0 0

Can anybody help me with this?

Thanks!
 
Old 03-08-2008, 06:52 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
After manually mounting the filesystem, use "chown root.root /var/root-image" and "sudo chmod a=rwxt" so the permissions match what /tmp should be.

I wonder if you put your line in the bottom of /etc/fstab if it would work. I have an ISO image of my distro's install dvd on a separate partition and it mounts automatically. I use this as the installation disk, so I don't have to insert the dvd. Being on a separate partition, I can reinstall if I want to after booting with a small cdrom disc.
 
Old 03-10-2008, 08:27 AM   #3
grim2
LQ Newbie
 
Registered: Jan 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Unhappy

It's not only a problem with /tmp partition. I can't add any line to fstab to mount any loop device at startup. I tried with some other partition for holding any files. Searching on internet I found that most people add line with "noauto" options so that loop device isn't mounted at startup? Is this "must do it that way" or? If I could figer out for any partitions on loop device I would start from that and go on /tmp partition.

Could it be mounting it before /var is mounted? Or is still read-only?

Thanks!
 
  


Reply



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
how to increase the loop devices number baloon Red Hat 3 03-29-2007 07:53 PM
increase /tmp space to 1GB gobbs Linux - Newbie 3 01-22-2007 01:08 AM
can't mount iso 'could not find any loop device' dethree Slackware 1 06-23-2005 01:14 AM
/tmp partition won't increase? I_AM Linux - General 1 03-19-2005 12:18 AM
Cannot mount more than 8 iso image files as loop device marsim Debian 4 11-09-2004 04:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:20 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration