RAID1 upgrade but size doesn't grow

fatcatxx

Honorable
Oct 21, 2013
4
0
10,510
Hi all,

I have been using the Buffalo Linkstation Pro Duo LS-WVLBF4 with 2x 1TB running on RAID1. Last week I bought 2x3TB WD Red to replace the 1TB raid. I have used mdadm successfully increasing the RAID size to around 3TB, and the info showing in /proc/mdstat and mdadm --examine are both correct,

/dev/sdb6:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 6e4dc691:2cc8406b:3936562c:b0e820cc
Name : LS-WVLBF4:2 (local to host LS-WVLBF4)
Creation Time : Thu Nov 1 22:44:10 2012
Raid Level : raid1
Raid Devices : 2

Avail Dev Size : 5829747952 (2779.84 GiB 2984.83 GB)
Array Size : 5829747952 (2779.84 GiB 2984.83 GB)

Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : bb12925a:89a5f710:150d811b:6ea874bd

Update Time : Mon Oct 21 23:34:16 2013
Checksum : d9f990ec - correct
Events : 7910


Device Role : Active device 0
Array State : AA ('A' == active, '.' == missing)

but the actual usable size is still 1TB and df -h is still showing the raid size as 1TB only.
Filesystem Size Used Available Use% Mounted on
/dev/md1 4.7G 837.8M 3.6G 18% /
udev 10.0M 128.0k 9.9M 1% /dev
/dev/ram1 15.0M 188.0k 14.8M 1% /mnt/ram
/dev/md0 969.2M 33.1M 936.1M 3% /boot
/dev/md2 917.1G 724.2G 192.9G 79% /mnt/array1
tmpfs 8.0M 1.8M 6.2M 22% /mnt/ram/com.kernel.org
/dev/md2 917.1G 724.2G 192.9G 79% /opt

Can anyone tell me what I should do or anything I have missed in the process? Thanks!
 
Solution
It looks like it's an XFS partition - did you use xfs_growfs on it?

It appears that you have to provide a mount point rather than a device node to xfs_growfs so you'd use "xfs_growfs /mnt/array1" to resize it rather than specifying /dev/md2.

Hope this helps,
Stephen

molletts

Distinguished
Jun 16, 2009
475
4
19,165
You need to increase the size of the filesystem to fill the RAID volume. Assuming it's formatted with ext4fs, you can do:

resize2fs /dev/md2

which should expand the filesystem.

If you're using another filesystem, you'll need to find out the equivalent command to resize it.
 

fatcatxx

Honorable
Oct 21, 2013
4
0
10,510
Thanks mollets, I have tried that but it still doesn't work. This is the output from parted

(parted) print all partition
Model: WD30EFRX-68AX9N0 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 1026MB 1024MB ext3 primary
2 1026MB 6146MB 5120MB primary
3 6146MB 6147MB 1049kB primary
4 6147MB 6148MB 1049kB primary
5 6148MB 7172MB 1024MB primary
6 7172MB 2992GB 2985GB primary


Model: WD30EFRX-68AX9N0 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 1026MB 1024MB ext3 primary
2 1026MB 6146MB 5120MB primary
3 6146MB 6147MB 1049kB primary
4 6147MB 6148MB 1049kB primary
5 6148MB 7172MB 1024MB primary
6 7172MB 2992GB 2985GB primary


Error: /dev/mtdblock0: unrecognised disk label

Model: Unknown (unknown)
Disk /dev/md0: 1024MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 1024MB 1024MB ext3


Model: Unknown (unknown)
Disk /dev/md10: 1024MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 1024MB 1024MB linux-swap


Model: Unknown (unknown)
Disk /dev/md1: 5119MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 5119MB 5119MB ext3


Model: Unknown (unknown)
Disk /dev/md2: 2985GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 2985GB 2985GB xfs
 

molletts

Distinguished
Jun 16, 2009
475
4
19,165
It looks like it's an XFS partition - did you use xfs_growfs on it?

It appears that you have to provide a mount point rather than a device node to xfs_growfs so you'd use "xfs_growfs /mnt/array1" to resize it rather than specifying /dev/md2.

Hope this helps,
Stephen
 
Solution

fatcatxx

Honorable
Oct 21, 2013
4
0
10,510
Thanks again Stephen!

I tried install the xfsprogs into the LS machine, however, I got this error message:

bash-3.2# apt-get install xfsprogs
Reading package lists... Done
Building dependency tree... Done
xfsprogs is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
libhttpd: Depends: pcre (>= 7.7) but it is not installable
W: Couldn't stat source package list http://172.16.37.216 buffalo-marvell-armel-sdk2p0/main Packages (/usr/local/apt/var/lists/172.16.37.216:8080_update_terastation%5fx_dists_buffalo-marvell-armel-sdk2p0_main_binary-arm_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
bash-3.2# apt-get update
E: Archive directory /usr/local/apt/cache/archives/partial is missing.

It tells me xfsprogs is already installed but the xfs_resizefs cannot be found. Seems there is something wrong with the apt-get library....

Then I tried to run xfs_resizefs in a ubuntu machine, but it tells me that the GPT table is corrupted.... I just confuse... isn't parted can do the same job as xfs_resizefs can do, or do I really need xfs_resizefs to fix that? Thanks!
 

fatcatxx

Honorable
Oct 21, 2013
4
0
10,510
Finally I got it done. Strangely xfs_resizefs cannot be found in both my Linkstation and Ubuntu. However, when I google through xfs, I found that I can use xfs_growfs instead, and it works!

Thanks a lot for your help Stephen!