Would like to mount a small rootfs file on E?

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
XBoxgeek
Pro
Posts: 77
Joined: Sat Sep 27, 2003 6:55 pm
Location: London
Contact:

Would like to mount a small rootfs file on E?

Post by XBoxgeek »

Hi Guys,

I am running Pro 1.1 natively on F (stock drive) and what I would like to do is mount a roofs type file on E just for a little bit of extra storage for my web-site.

I would like to make this about a gig in size and then mount it using loopback.

I tried just doing a redirect in the apache config files, something like this

From /extraspace/
To /mnt/fatx/e/extraspace/

Unfortunately apache does not have permission to read from /mnt/fatx/e/extraspace/ so I thought the rootfs thing would be my best bet (could be wrong :lol: ).

Any suggestions would be appreciated. Also if the rootfs option is the best way to go, some help with this would be great.

Many thanks.
Xboxgeek
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

The steps are create the file, make the filesystem, create a mount point, add it to fstab,mount the file.

Code: Select all

dd if=/dev/zero of=/mnt/fatx/e/path/of/new/filesystem bs=1024k count=<size in MB i.e 1024 for 1GB>
yes | mkreiserfs -f /mnt/fatx/e/path/of/new/filesystem
mkdir /mnt/path/of/new/mount/point
then edit fstab and add the entry using reiserfs for filesystem and loop,defaults for options and mount your partition using

Code: Select all

mount /mnt/path/of/new/mount/point
If you keep an open mind, will your brain fall out?
XBoxgeek
Pro
Posts: 77
Joined: Sat Sep 27, 2003 6:55 pm
Location: London
Contact:

Post by XBoxgeek »

Many thanks I have got upto the edit fstab part but I am a bit confused :D

This is my mount point for my native partition on F:-

Code: Select all

# <file system> <mount point> <type>    <options>                     <dump> <pass>
 /dev/hda2       /            reiserfs  defaults,errors=remount-ro      0       1
Where do I get the hda number from? doI just make it up like hda55 like this?

Code: Select all

# <file system> <mount point> <type>    <options>                     <dump> <pass>
 /dev/hda55       /webdata            reiserfs  defaults,errors=remount-ro      0       1
Note:- I now have a 1gig file in the root of E called webdata.

Many thanks.
Xboxgeek
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

try

Code: Select all

/mnt/fatx/e/webdata         /webdata      reiserfs     loop,defaults    0   0
If you keep an open mind, will your brain fall out?
XBoxgeek
Pro
Posts: 77
Joined: Sat Sep 27, 2003 6:55 pm
Location: London
Contact:

Post by XBoxgeek »

Many thanks nobspangle. It worked a treat :D .

Cheers.
Xboxgeek
Post Reply