Difference between revisions of "Resize-rootfs"
Line 9: | Line 9: | ||
resize2fs -p root_fs_tutorial-0.31 | resize2fs -p root_fs_tutorial-0.31 | ||
e2fsck -f root_fs_tutorial-0.31 | e2fsck -f root_fs_tutorial-0.31 | ||
+ | |||
+ | <br> | ||
<li>Downsizyng a rootfilesystem: | <li>Downsizyng a rootfilesystem: | ||
− | + | <ul> | |
+ | <li>Create a new rootfilesystem with the size you want your filesystem to have:</li> | ||
+ | |||
> dd if=/dev/zero of=newfs bs=1 count=1 seek=1200M conv=notrunc | > dd if=/dev/zero of=newfs bs=1 count=1 seek=1200M conv=notrunc | ||
> mkfs -t ext2 newfs | > mkfs -t ext2 newfs | ||
− | + | ||
+ | <li>Copy the old filesystem content to the new one:</li> | ||
+ | |||
> mount -o loop oldfs /mnt/old/ | > mount -o loop oldfs /mnt/old/ | ||
> mount -o loop newfs /mnt/new | > mount -o loop newfs /mnt/new | ||
Line 20: | Line 26: | ||
> umount /mnt/old | > umount /mnt/old | ||
> umount /mnt/new | > umount /mnt/new | ||
− | </ | + | </ul> |
<ol> | <ol> |
Revision as of 03:03, 15 October 2006
Resizyng a root-file-system
- Increasing the size of a root-file-system:
- Downsizyng a rootfilesystem:
- Create a new rootfilesystem with the size you want your filesystem to have:
- Copy the old filesystem content to the new one:
> dd if=/dev/zero of=newfs bs=1 count=1 seek=1200M conv=notrunc > mkfs -t ext2 newfs
> mount -o loop oldfs /mnt/old/ > mount -o loop newfs /mnt/new
> cp -a /mnt/old/* /mnt/new/
> umount /mnt/old > umount /mnt/new
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