Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[emerge] Running out of space =>use loopback device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
gava77
n00b
n00b


Joined: 12 Jan 2003
Posts: 6
Location: Groningen, The Netherlands

PostPosted: Mon Apr 19, 2004 8:44 am    Post subject: [emerge] Running out of space =>use loopback device Reply with quote

As I found on the fora more low end user are running out of space when emerging large sources. Usually my 650 Mb free space on my /var/tmp/portage partition is enough for the normal updates and new packages. But there comes a time that XFree86 needs an update! Then you would be thankfull if you had a spare disk or other HD space. Since I have another PC in the samba network which is running Win98 with about 2.5 Gb of free space, I thought it would be usefull to use it. First thought mount it export the PORTAGE_TMPDIR and emerge. Alas fat32 space can't be used due to restrictions on the ownership and file mods. The portage.py script wants to change the chown and chmod of files and dirs. This can't be done. With googling I found out that usage of a loopback device could be the answer. And it did! Maybe some people have some additional comments!

What have I done:
Code:

# mkdir /mnt/windows
# mount -t smbfs //windows/linuxtmp /mnt/windows
# dd if=/dev/zero of=/mnt/windows/portage-loop seek=1k bs=1k count=0
# losetup /dev/loop1 /mnt/windows/portage-loop
# mkfs.ext3 /dev/loop1
# mount -t ext3 /dev/loop1 /var/tmp

# emerge xfree

# umount /var/tmp
# losetup -d /dev/loop1
# rm -f /mnt/windows/portage-loop
# umount /mnt/windows


This is performed:

    -mount the windows share
    -create an empty 1Gb file on that share
    -use that file for creating a loopback device
    -create ext3 filesystem on that device
    -mount that device under /var/tmp (place where portage emerges packages)


(Contributed by Cocker :wq)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17809

PostPosted: Mon Apr 19, 2004 1:56 pm    Post subject: Reply with quote

Moved from Portage & Programming.
_________________

Believing I had supernatural powers I slammed into a brick wall.
I said hey, is this my problem? Is this my fault?
Back to top
View user's profile Send private message
xunil
n00b
n00b


Joined: 18 Jun 2003
Posts: 36
Location: Blacksburg, VA, USA

PostPosted: Mon Apr 19, 2004 9:09 pm    Post subject: Reply with quote

You shouldn't use a journaled filesystem over the loopback driver. It's not a reliable enough block device. ext2 is safe, however, and the minor performance hit won't matter since you're already using the loopback device over smbfs.
Back to top
View user's profile Send private message
etnoy
Apprentice
Apprentice


Joined: 29 Aug 2003
Posts: 255
Location: Västerås, Sweden

PostPosted: Mon Apr 19, 2004 10:11 pm    Post subject: Reply with quote

Why SMB? Better use NFS?
_________________
The md5sum of the above post is 06280ccd85ef9deb49c336e7945f4b5c

God is dead! - Nietzsche
Nietzsche is dead! -God
Back to top
View user's profile Send private message
Souperman
Guru
Guru


Joined: 14 Jul 2003
Posts: 449
Location: Cape Town, South Africa

PostPosted: Tue Apr 20, 2004 10:45 am    Post subject: Reply with quote

etnoy wrote:
Why SMB? Better use NFS?

Simple... because his other machine with available space was a Windows box. ;)
_________________
moo
Back to top
View user's profile Send private message
soulwarrior
Guru
Guru


Joined: 21 Oct 2002
Posts: 331

PostPosted: Tue Nov 09, 2004 12:14 pm    Post subject: Re: :. copied to gentoo-wiki.com Reply with quote

dmitrio wrote:
I have copied this, with permission of gava77, to gentoo-wiki.com


the link has changed:

http://gentoo-wiki.com/TIP_Running_out_of_space_use_a_loopback_device
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum