I discovered recently that the “B” drive in my RAID-1-configured MBLD was bad. I decided to take the opportunity to increase the machine’s capacity, using the method outlined here:
(Yes, I know, this voids the long-expired warranty, but I had nothing to lose so I decided to try it.) I acquired two 4-TB ATA WDC WD40EFRX-68N drives. I followed the procedure in the link above. I replaced Drive B with one of the 4TB drives and let the machine rebuild the RAID array, which took about a month. (Not sure what that’s about - the machine was nearly full, at 1.9 TB). It did finish though. Then I replaced Drive A with the other 4TB drive and let it rebuild the RAID again. This took about a day. Then came the part where you use the “parted” utility to make the data partitions take up the extra 2TB on each drive. That’s when I got errors:
(parted) select /dev/sda
(parted) resize 4 4624 4001G
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted’s file system manipulation code is not as robust as what you’ll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Warning: File system has errors! You should run e2fsck.
I canceled, and then tried to run e2fsck:
MyBookLiveDuo:~# e2fsck /dev/sda
e2fsck 1.41.12 (17-May-2010)
e2fsck: Device or resource busy while trying to open /dev/sda
Filesystem mounted or opened exclusively by another program?
df -k reports:
MyBookLiveDuo:~# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md1 1968336 732640 1135708 40% /
tmpfs 5120 0 5120 0% /lib/init/rw
udev 10240 1216 9024 12% /dev
tmpfs 5120 0 5120 0% /dev/shm
tmpfs 102400 4416 97984 5% /tmp
ramlog-tmpfs 20480 18816 1664 92% /var/log
/dev/md3 1941328128 1424244672 517083456 74% /DataVolume
I tried unmounting /DataVolume, but that did not help.
How do I properly run e2fsck on an MBLD that is configured for RAID1?