On Mon, 26 Apr 1999, Benno Senoner wrote:
> I am interested more in the idea of automatically repartition a new blank disk
> while it is hot-added.
no need to do this in the kernel (or even in raidtools). I use such
scripts to 'mass-create' partitioned disks:
[root@moon root]# cat dobigsd
if [ "$#" -ne "1" ]; then
echo 'sample usage: dobigsd sda'
exit -1
fi
echo "*** DESTROYING /dev/$1 in 5 seconds!!! ***"
sleep 5
dd if=/dev/zero of=/dev/$1 bs=1024k count=1
(for N in `cat domanydisks`; do echo $N; done) | fdisk /dev/$1
[root@moon root]# cat domanydisks
n e 1 1 200
n l 1 25
n l 26 50
n l 51 75
n l 76 100
n l 101 125
n l 126 150
n l 151 175
n l 176 200
n p 2 300 350
n p 3 350 400
n p 4 450 500
t 2 86
t 3 83
t 4 83
t 5 83
t 6 83
t 7 83
t 8 83
t 9 83
t 10 83
t 11 83
t 12 83
w
thats all, fdisk is happy to be put into scripts.
-- mingo