Re: Disk Partiotioning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2004-12-01 at 20:59 -0600, Gustavo Seabra wrote:
> How do I make a "filesystem in a file" ?

Here's one way:

# touch filesys
# mke2fs -j ./filesys 4000
mke2fs 1.35 (28-Feb-2004)
./filesys is not a block special device.
Proceed anyway? (y,n) y
mke2fs: Filesystem larger than apparent device size.
Proceed anyway? (y,n) y
max_blocks 4096000, rsv_groups = 500, rsv_gdb = 15
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
504 inodes, 4000 blocks
200 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=4194304
1 block group
8192 blocks per group, 8192 fragments per group
504 inodes per group

Writing inode tables: done                            
inode.i_blocks = 32, i_size = 67383296
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
# ls -l filesys
-rw-r--r--  1 root root 4096000 Dec  1 15:11 filesys
# mount ./filesys /mnt/img -o loop

Now you can create files in your new filesystem, play with it, then
unmount it and turn off journaling. Mount it again and verify that all
your files are okay. Once you have done this, you have gained some
experience and can do it with other filesystems.

Actually, this won't solve your problem with QTparted. It doesn't
support resizing ext3 or ext2 filesystems. And from playing around with
parted, I think you would run into "Filesystem has incompatible feature
enabled" errors if you tried using it.

I think your best bet on resizing is my original suggestion. Use
resize2fs to resize the filesystem, then use fdisk to resize the
partition.

-- 
C. Linus Hicks <lhicks@xxxxxxxxx>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux