selena1
Programmer
- Apr 7, 2003
- 69
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!
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!