Difference between revisions of "Resize-rootfs"
Line 1: | Line 1: | ||
− | + | {{Title|How to resize a root_fs filesystem}} | |
+ | |||
+ | == Manually == | ||
<ol> | <ol> | ||
Line 31: | Line 33: | ||
man uml_resize | man uml_resize | ||
+ | |||
+ | Currently, only allows increasing the size, not decreasing. |
Latest revision as of 13:28, 20 June 2007
How to resize a root_fs filesystem
Manually
- Increasing the size of a root-filesystem:
- Downsizing a root-filesystem:
- Create a new rootfilesystem with the size you want your filesystem to have:
- Copy the old filesystem content to the new one:
e2fsck -f root_fs_tutorial-0.31 dd if=/dev/zero of=root_fs_tutorial-0.31 bs=1 count=1 seek=550M conv=notrunc resize2fs -p root_fs_tutorial-0.31 e2fsck -f root_fs_tutorial-0.31
dd if=/dev/zero of=newfs bs=1 count=1 seek=1200M conv=notrunc mkfs -t ext2 newfs # Change the filesystem type to your needs (ext3, etc)
mount -o loop oldfs /mnt/old/ mount -o loop newfs /mnt/new cp -a /mnt/old/* /mnt/new/ umount /mnt/old /mnt/new
Using uml_resize
The uml_resize that comes with the VNUML package can be also use to resize root filesystems. Look at the man page to know how it works:
man uml_resize
Currently, only allows increasing the size, not decreasing.