gmirror: how to make your system reboot

Oliver Lehmann lehmann at
Fri Sep 9 06:20:19 UTC 2011


shouldn't there be a failsafe to not be able to destroy the
gmirror as long as it is still in use like mounted?

1. create a gmirror with n>=1 disks
2. newfs the gmirror device
3. mount the gmirror device
4. remove all disks from the gmirror
5. system reboots (gmirror gone but still mounted)

nudel# gmirror status
nudel# gmirror label -b prefer test /dev/ada1p2
nudel# newfs /dev/mirror/test
/dev/mirror/test: 4096.0MB (8388600 sectors) block size 32768,  
fragment size 4096
         using 6 cylinder groups of 740.00MB, 23680 blks, 47360 inodes.
super-block backups (for fsck -b #) at:
  192, 1515712, 3031232, 4546752, 6062272, 7577792
nudel# mount /dev/mirror/test /mnt/tmp
nudel# gmirror remove test ada1p2

> uname -a
FreeBSD 9.0-BETA2 FreeBSD 9.0-BETA2 #0: Thu  
Sep  8 19:59:40 CEST 2011      
olivleh1 at  amd64

I'm just having remote access right now to the system so I'm not able
to provide any dumps but the system instantly reboots.

More information about the freebsd-current mailing list