Resizing Software RAID Arrays with mdadm
113
no
vd
ocx
(e
n)
7 Ja
nua
ry 201
0
To extend the file system to a specific size, enter
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 may 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.
JFS
Resizing a JFS partition is done with a special option to the
mount
command that is specific to the
JFS file system:
mount -o remount,resize /mnt
Using the resize option is valid only during a remount when the volume is already mounted read-
write. The mount point is specified rather than the device name.
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 mounted at
/mnt/point
,
using one of the following methods:
To extend the file system size to the maximum available size of the device, enter
mount -o remount,resize /mnt/point
The resize option with no value specified grows the volume to the full size of the partition.
To extend the file system to a specific size, enter
mount -o remount,resize=
size
/mnt/point
Replace
size
with the desired size in blocks based on the block size used for the file
system.
For example, if you have a 4 GB device with a block size of 4KB, enter
mount -o remount,resize=1048576 /mnt/point
Wait until the resizing is completed before continuing.
3
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 10 SP3 - ARCHITECTURE-SPECIFIC
Страница 4: ...4 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...
Страница 30: ...30 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...
Страница 42: ...42 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...
Страница 76: ...76 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...
Страница 108: ...108 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...
Страница 118: ...118 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...
Страница 124: ...124 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...
Страница 132: ...132 SLES 10 SP3 Storage Administration Guide novdocx en 7 January 2010...