Difference between revisions of "Resize-rootfs"

From VNUML-WIKI
Jump to: navigation, search
Line 1: Line 1:
<h1 class="firstHeading">Resizyng a root-file-system</h1>
+
<h1 class="firstHeading">Resizing a root-filesystem</h1>
  
 
<ol>
 
<ol>
<li>Increasing the size of a root-file-system:
+
<li>Increasing the size of a root-filesystem:
 
</li>
 
</li>
  
Line 12: Line 12:
 
<br>
 
<br>
  
<li>Downsizyng a rootfilesystem:
+
<li>Downsizing a root-filesystem:
 
<ul>
 
<ul>
 
<li>Create a new rootfilesystem with the size you want your filesystem to have:</li>
 
<li>Create a new rootfilesystem with the size you want your filesystem to have:</li>

Revision as of 03:06, 15 October 2006

Resizing a root-filesystem

  1. Increasing the size of a root-filesystem:
  2.  > 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
    


  3. Downsizing a root-filesystem:
    • Create a new rootfilesystem with the size you want your filesystem to have:
    •  > dd if=/dev/zero of=newfs bs=1 count=1 seek=1200M conv=notrunc
       > mkfs -t ext2 newfs
      
    • Copy the old filesystem content to the new one:
    •  > mount -o loop oldfs /mnt/old/
       > mount -o loop newfs /mnt/new
       > cp -a /mnt/old/* /mnt/new/
       > umount /mnt/old
       > umount /mnt/new