Juha Erkkila wrote:
> i don't think this is true.  just use vnconfig to attach a file to
> svnd0, and then do fsck /dev/rsvnd0c (maybe take a backup first?)
> OTOH, whether that works may depend on the disklabel on /dev/rsvnd0c,
> but at least i do this routinely in a similar script as yours,
> before mounting /dev/svnd0c, and it appears to work fine for me

I'll confirm this.  I use a 650 MB encrypted file for my $HOME (so it's
easy to backup to 700 MB CDR along with /etc and a few other things).
Before I got a laptop, I had some problems with power outages, but
running fsck on the svnd was always able to fix the problem.  You just
have to make sure you type the password correctly, because vnconfig only
asks once, and it will hapilly configure anything:

$ dd if=/dev/urandom of=/tmp/junk bs=1 count=8192
8192+0 records in
8192+0 records out
8192 bytes transferred in 0.439 secs (18626 bytes/sec)
$ sudo vnconfig -vck svnd1c /tmp/junk
Encryption key:
svnd1c: 8192 bytes on /tmp/junk
$ echo $?
0
$ sudo vnconfig -vl svnd1c
vnd1: covering /tmp/junk on ??, inode 7
$ echo $?
0

Of course fsck and disklabel will tell you it's totally bogus, unless by
some freak chance the junk data happens to look like a real
filesystem...

-- 
Stephen Takacs   <[EMAIL PROTECTED]>   http://perlguru.net/
    4149 FD56 D078 C988 9027  1EB4 04CC F80F 72CB 09DA

Reply via email to