Posted by Enlightenment on 28 juli 2008 @ 17:31
So, if you find anything interesting don't hesitate to send it in! Just click the link below the firefox button on the left.
Current main topics of interest are: science, computer technology, RAID, hardware power consumption and FreeBSD.
There are no replies yet
Posted by Enlightenment on 20 juli 2008 @ 17:34
If you have a system with multiple harddrives lying around, for example if you have not yet taken the machine into production usage, you can help me test my script. If you have the time and patience, this is the procedure:
Caution: this should not be attempted on a system containing real files, the expansion procedure is BETA and is provided to you as means of testing it, not actually performing the procedure on real files without a proper backup!
Step 1)
Install FreeBSD 6.2 ot 6.3 in either i386 (32-bit) or amd64 (64-bit) mode. Be sure to install the sourcecode under /usr/src (option "src" in the installer).
note: you need a working internet connection (dhclient <interface> will use DHCP)
Step 2)
Install geom_raid5 per installscript:
fetch http://www.fluffles.net/files/installgraid5
chmod 700 installgraid5
./installgraid5Step 3)
Install PHP in CLI-mode and calc:
cd /usr/ports/lang/php5
make config (enable the CLI-option and uncheck everything else if you don't use PHP for anything else)make install cleanStep 4)
Install calc external calculator:
pkg_add -r calc(or via ports in /usr/ports/math/calc)
Step 5)
Create a RAID5 array, leaving one or two disks free to be used for expansion
graid5 label data ad1 ad2 ad3Step 6)
Populate the RAID5 array with real files and fill it up:
newfs /dev/raid5/data
mount /dev/raid5/data /mnt
cp -R /usr/* /mnt/(or use another source than /usr/ to copy files from, at least make sure the RAID5 filesystem is quite full)
Step 7)
Check the filesystem for errors:
umount /mnt
fsck -t ufs /dev/raid5/dataStep 8)
Start the expansion process:
fetch http://www.fluffles.net/files/graid5-expand
chmod 700 graid5-expand
./graid5-expand data ad4(note: "data" is the array name as found in "graid5 status" and "ad4" is the disk you wish to add to the RAID5 array. You can specify multiple disks seperated with spaces to add two or more disks at once. Please test this too if possible.
Step 9)
Expand the UFS filesystem:
growfs /dev/raid5/data2note: your expanded array now has a new name, data2 in this example.
Step 10)
After growfs, check the filesystem for errors:
fsck -t ufs /dev/raid5/data2
mount /dev/raid5/data2 /mnt
df -hnote: make sure the Used space equals how you left the filesystem before expansion.
Key points:
Does the internal and external calculator work fine on i386/amd64 mode?
Is the growfs-bug fixed now that we zero-write the expanded LBA-space?
You should not see any errors reported by fsckPlease report your findings to me via email, info )at( fluffles.net
This would help me and others a lot! Thank you!
| Reply by freebsd-developer (unregistered) on Mon, 22 Sep 2008 @ 08:25 | Quote |
oh no! you are not doing what I think you are doing?! (just copying the data from old to new location knowing that the new will always be lower in direct disk address than the older).
of course this should work but "eek!"
(I did something similar (but actually worse) on my first 386bsd system in '92 except I was actually running on the drive at teh time.
| Reply by Enlightenment on Mon, 22 Sep 2008 @ 09:31 | Quote |
It's not as sexy as an in-kernel expansion feature, but i don't think the actual datatransfer is a problem. It's all the sanity checks that need to be done that makes this kind of expansion somewhat complicated.
Aside from some issues, i've successfully expanded filesystems with over 1TB of data, and compared checksums afterwards. It was good. Problem is: the script bails out due to some numbers not being what they should be; there's alot of sanity checks in the script.
| Reply by mr4hughz on Fri, 27 Feb 2009 @ 22:27 | Quote |
hmm need testing ? have 4x 1tb wd green's in test ..
| Reply by Backspace (unregistered) on Thu, 12 Mar 2009 @ 14:02 | Quote |
After some tests in virtual machine I can say that
1. This script works on FreeBSD 7.1 and for sure can add one or two disks (didn't try to add more disks at once for now)
2. Do not run this script if you don't have at least 512MB of RAM
execution time: 138 msec, queries: 19






