Novell LINUX ENTERPRISE SERVER 10 SP2 - STORAGE ADMINISTRATION GUIDE 05-15-2009 Administration Manual page 113

Table of Contents

Advertisement

®
In SUSE
Linux Enterprise Server SP1, only Ext2, Ext3, and ReiserFS provide utilities for
shrinking the size of the file system. Use the appropriate procedure below for decreasing the size of
your file system.
The procedures in this section use the device name
modify commands to use the name of your own device.
Ext2 or Ext3
The Ext2 and Ext3 file systems can be resized when mounted or unmounted.
1 Open a terminal console, then log in as the
2 Decrease the size of the file system on the RAID by entering
resize2fs /dev/md0 <size>
Replace size with an integer value in kilobytes for the desired size. (A kilobyte is 1024 bytes.)
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 RAID named
/dev/md0
mount -t ext2 /dev/md0 /raid
4 Check the effect of the resize on the mounted file system by entering
df -h
The Disk Free (
) command shows the total size of the disk, the number of blocks used, and
df
the number of blocks available on the file system. The -h option print sizes in human-readable
format, such as 1K, 234M, or 2G.
JFS
JFS does not support shrinking a volume.
ReiserFS
ReiserFS file systems can be shrunk only if the volume is unmounted.
1 Open a terminal console, then log in as the
2 Unmount the device by entering
umount /mnt/point
If the partition you are attempting to shrink contains system files (such as the root (
unmounting is possible only when booting from a bootable CD or floppy.
3 Decrease the size of the file system on the software RAID device called
resize_reiserfs -s size /dev/md0
Replace size with the desired size in bytes. You can also specify units on the value, such as
50000K (kilobytes), 250M (megabytes), or 2G (gigabytes). Alternatively, you can specify a
decrease to the current size by prefixing the value with a minus (-) sign. For example, the
following command reduces the size of the file system on
resize_reiserfs -s -500M /dev/md0
Wait until the resizing is completed before continuing.
4 Mount the file system by entering
/dev/md0
user or equivalent.
root
at mount point
, enter
/raid
user or equivalent.
root
for the RAID device. Make sure to
/dev/md0
by 500 MB:
/dev/md0
Resizing Software RAID Arrays with mdadm 113
) volume),
/
by entering

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux enterprise desktop 10 sp2

Table of Contents