Hi,

I stumbled about this when trying to set up an auomount script for vnconfig -K using a cryptab like fstab.

Commands entrered by hand here tho:

x41ibm:~ $ dd if=/dev/arandom of=test bs=512 count=100000
100000+0 records in
100000+0 records out
51200000 bytes transferred in 4.470 secs (11452240 bytes/sec)
x41ibm:~ $ dd if=/dev/arandom of=key bs=512 count=10
10+0 records in
10+0 records out
5120 bytes transferred in 0.000 secs (9481481 bytes/sec)
x41ibm:~ $ echo key | vnconfig -cv -K 4096 /dev/svnd3c test
Encryption key:
Salt file: /dev/svnd3c: 51200000 bytes on test
x41ibm:~ $ newfs /dev/svnd3c
newfs: /dev/svnd3c: not a character-special device
/dev/svnd3c:    100000 sectors in 1000 cylinders of 1 tracks, 100 sectors
        48.8MB in 1 cyl groups (1000 c/g, 48.83MB/g, 6272 i/g)
super-block backups (for fsck -b #) at:
 32,
x41ibm:~ $ mount /dev/svnd3c /mnt
x41ibm:~ $ umount /mnt
x41ibm:~ $ vnconfig -u svnd3
x41ibm:~ $ echo key | vnconfig -cv -K 4096 /dev/svnd3c test
Encryption key:
Salt file: /dev/svnd3c: 51200000 bytes on test
x41ibm:~ $ mount /dev/svnd3c /mnt
x41ibm:~ $ umount /mnt
x41ibm:~ $ vnconfig -u svnd3


So, is this a bug or a feature that you can pipe the name of the saltfile to vnconfig? Personally I consider it a feature (and am using it right now) but it would have been nice if that was documented in the vnconfig manual.

Would have spared me some time trying to figure out why this doesn't work:

egrep -v "^[[:space:]]*(#|$)" /etc/cryptab | while read a b c; do
        echo "$a:"
        vnconfig -cv -K 4096 /dev/"$b"c /var/crypt/$a
        mount -o nodev,nosuid,sync /dev/"$b"c $c
done

 - Michael

Reply via email to