
Resizing Software RAID Arrays with mdadm
103
no
vd
ocx
(e
n)
7 Ja
nua
ry 201
0
resize2fs /dev/md0
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 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.
ReiserFS
As with Ext2 and Ext3, a ReiserFS file system can be increased in size while mounted or
unmounted. The resize is done on the block device of your RAID array.
1
Open a terminal console, then log in as the
root
user or equivalent.
2
Increase the size of the file system on the software RAID device called
/dev/md0
, using one of
the following methods:
To extend the file system size to the maximum available size of the device, enter
resize_reiserfs /dev/md0
When no size is specified, this increases the volume to the full size of the partition.
To extend the file system to a specific size, enter
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
an increase to the current size by prefixing the value with a plus (+) sign. For example, the
following command increases 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.
3
If the file system is not mounted, mount it now.
For example, to mount an ReiserFS file system for a RAID named
/dev/md0
at mount point
/
raid
, enter
mount -t reiserfs /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.
Содержание LINUX ENTERPRISE SERVER 11 - STORAGE ADMINISTRATION GUIDE 2-23-2010
Страница 4: ...4 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 10: ...10 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 12: ...12 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 24: ...24 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 34: ...34 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 78: ...78 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 88: ...88 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 98: ...98 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 108: ...108 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 130: ...130 SLES 11 Storage Administration Guide novdocx en 7 January 2010...
Страница 134: ...134 SLES 11 Storage Administration Guide novdocx en 7 January 2010...