when the shit goes down …

August 2, 2007

Checking (fsckin’:) GBDE encrypted containers in FreeBSD

Filed under: *nix like stuff — valntine @ 5:42 am

In one of my previous posts I have written about how we can create GBDE encrypted file containers with the help of the FreeBSD memory devices (mdconfig)

Let’s say that we are working on our encrypted partition and our PC is unexpectedly restarted due to lack of power, hardware problem or anything.

When the operation system boots again it will automatically check all system partitions but the GBDE encrypted file containers require some special attention. However with little knowledge and luck :) they can be easily checked and repaired like a normal file system.

[root@sunrise ~]# mdconfig -a -t vnode -f /usr/magick
[root@sunrise ~]# gbde attach /dev/md0
Enter passphrase:

!!!HERE YOU STOP!!! Do NOT I repeat DO NOT mount /dev/md0.dbe. Once I tried fscking a mounted ext3 partition and … well you know what -> mess.

So after you attach md0 simply run fsck on /dev/md0.bde

[root@sunrise ~]# fsck -t ufs /dev/md0.bde
** /dev/md0.bde
** Last Mounted on /mnt/magick
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
937 files, 87511 used, 158608 free (32 frags, 19822 blocks, 0.0% fragmentation)

***** FILE SYSTEM MARKED CLEAN *****

Well done … And pray for always clean file system :)

vaLntine

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment