|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
[PLUG] Thoughts on creating a virtual file system (Mike Chirico)
|
(Apologies for the html and multiple postings...the mail client defaulted to
html)
This is the last time to test a same my settings:
1. Construct a 10MB file, or bigger:
dd if=/dev/zero of=/tmp/disk-work count=20480
By the way, dd defaults to blocks of 512 so the above will = 10MB =
20480*512. The "if=/dev/zero" stand for read from file, and /dev/zero will
zero everything out. As you can probably guess, "of=/tmp/disk-work" creates
the file. You should probably create it in your home directory
"of=/home/<your name>/disk-work" since you'll have more space and it won't
get deleted.
2. Make an ext2 (or ext3 if you want) file system. I believe the difference
is ext3 is a journaling filesystem; but, it doesn't handle recovery as well
as ext2.
mke2fs -q /tmp/disk-work
Hit yes for confirmation, and it's going to ask this because it's a file and
not a drive.
3. Create a directory, su -l to root, and mount.
mkdir /work
su -l
mount -o loop=/dev/loop0 /tmp/disk-work /work
Now to use it, cd /work and create files etc.
4. When you're done with it, unmount
umount /work
Regards,
Mike Chirico
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|