[lug] q: ramdisk /tmp & mount plain files
Chan Kar Heng
chankarheng at gmail.com
Mon May 3 10:49:12 MDT 2010
Thanks Zan! That extra bit of info helps. :)
Zan Lynx wrote:
> On 5/2/10 11:22 AM, David Stearns wrote:
>
>>> 2) how could i mount a plain binary file as a read/write filesystem?
>>> that's assuming that one can do an mkfs on a plain file too.
>>> context is that, i might backup an entire filesystem to a plain file
>>> (eg: cat /dev/sda0> /home/myhome/myfsbackup;
>>> so now I wanna do a mount /home/myhome/myfsbackup /mymountpoint and be
>>> able to access things backed up.)
>> You should be able to
>> `mount -oloop -t<fstype> /home/myhome/myfsbackup /mymountpoint`
>>
>> That should do what you need.
>
> I think that you need to use dd if=/dev/zero of=file bs=1024k count=[#
> of megs] to make the file before you can run mkfs on it. mkfs generally
> expects a file or device or partition to already have a size.
>
> You may also be able to use dd with the skip option to make a sparse
> file and use that with mkfs.
More information about the LUG
mailing list