![Novell LINUX ENTERPRISE SERVER 10 - STORAGE ADMINISTRATION GUIDE 7-2007 Administration Manual Download Page 97](http://html1.mh-extra.com/html/novell/linux-enterprise-server-10-storage-administration-guide-7-2007/linux-enterprise-server-10-storage-administration-guide-7-2007_administration-manual_1711843097.webp)
Resizing Software RAID Arrays with mdadm
97
no
vd
ocx
(e
n)
6 Ap
ril 20
07
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
/dev/md0
for the RAID device. Make sure to
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
root
user or equivalent.
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
at mount point
/raid
, enter
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 (
df
) command shows the total size of the disk, the number of blocks used, and
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
root
user or equivalent.
2
Unmount the device by entering
umount /mnt/point
If the partition you are attempting to shrink contains system files (such as the root (
/
) volume),
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
/dev/md0
by
entering
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
/dev/md0
by 500 MB:
resize_reiserfs -s -500M /dev/md0
Wait until the resizing is completed before continuing.
4
Mount the file system by entering
Summary of Contents for LINUX ENTERPRISE SERVER 10 - STORAGE ADMINISTRATION GUIDE 7-2007
Page 4: ...novdocx en 6 April 2007...
Page 30: ...30 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 42: ...42 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 58: ...58 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 90: ...90 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 100: ...100 SLES 10 Storage Administration Guide novdocx en 6 April 2007...
Page 106: ...106 SLES 10 Storage Administration Guide novdocx en 6 April 2007...