TIP_Running_out_of_space_use_a_loopback_device
| Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
| 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=1000000 # losetup /dev/loop1 /mnt/windows/portage-loop # mkfs.ext3 /dev/loop1 # mount -t ext3 /dev/loop1 /var/tmp # emerge xorg-x11 (or something big) # 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)
Follow the instructions as above, but replace the dd step with:
| Code: |
# dd if=/dev/zero of=/mnt/windows/portage-loop bs=1M count=1 seek=1000 |
This will tell dd to write a zero at the 1000th 1 Megabyte block, making a 1000MB file filled with zeros, just as above. However, this method takes advantage of most filesystem's (including NTFS) support for what are known as sparse files. The FS allocates the files as being of a a certain size, but the empty allocated space is not written to the disk itself; rather the FS keeps track of what regions are empty and actually fills them on the disk as appropriate.
PLEASE NOTE! FAT32/vfat does NOT support sparse files!
Credits
Feedback
Concerns or Compliments? Please use the Discussion section.Last modified: Fri, 05 Sep 2008 19:22:00 +1000 Hits: 16,759
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and list their apartments, townhouses and units.
