Decreasing The Size Of A File System; Increasing An Ext2 Or Ext3 File System; Section 5.2, "Increasing An Ext2 Or Ext3 File System; Section 5.1.3, "Decreasing The Size Of A File System - Novell LINUX ENTERPRISE SERVER 11 - STORAGE ADMINISTRATION GUIDE 2-23-2010 Administration Manual

Table of Contents

Advertisement

When specifying an exact size for the file system, make sure the new size satisfies the following
conditions:
The new size must be greater than the size of the existing data; otherwise, data loss occurs.
The new size must be equal to or less than the current device size because the file system size
cannot extend beyond the space available.

5.1.3 Decreasing the Size of a File System

When decreasing the size of the file system on a device, make sure the new size satisfies the
following conditions:
The new size must be greater than the size of the existing data; otherwise, data loss occurs.
The new size must be equal to or less than the current device size because the file system size
cannot extend beyond the space available.
If you plan to also decrease the size of the logical volume that holds the file system, make sure to
decrease the size of the file system before you attempt to decrease the size of the device or logical
volume.

5.2 Increasing an Ext2 or Ext3 File System

Ext2 and Ext3 file systems can be resized when mounted or unmounted with the
command.
1 Open a terminal console, then log in as the
2 Increase the size of the file system using one of the following methods:
To extend the file system size to the maximum available size of the device called
sda1
resize2fs /dev/sda1
If a size parameter is not specified, the size defaults to the size of the partition.
To extend the file system to a specific size, enter
resize2fs /dev/sda1 size
The size parameter specifies the requested new size of the file system. If no units are
specified, the unit of the size parameter is the block size of the file system. Optionally, the
size parameter can be suffixed by one of the following the unit designators: s for 512 byte
sectors; K for kilobytes (1 kilobyte is 1024 bytes); M for megabytes; or G for gigabytes.
Wait until the resizing is completed before continuing.
3 If the file system is not mounted, mount it now.
For example, to mount an Ext2 file system for a device named
, enter
home
mount -t ext2 /dev/sda1 /home
4 Check the effect of the resize on the mounted file system by entering
df -h
The Disk Free (
the number of blocks available on the file system. The -h option print sizes in human-readable
format, such as 1K, 234M, or 2G.
36
SLES 11: Storage Administration Guide
, enter
) command shows the total size of the disk, the number of blocks used, and
df
user or equivalent.
root
/dev/sda1
resize2fs
/dev/
at mount point
/

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 11 storage

Table of Contents