Hello,

Sorry, what do you mean by mounted file system? The file system was
not mounted when I tried to enlarge it. I booted with bsd.rd, mounted
the file system just to copy the growfs utility, unmounted the
filesystem and then tried to enlarge it.

Nikos

P.S. This post was sent by 2 mail accounts (skalk...@grnet.gr and
skalk...@gmail.com). For some strange reason the mails from
skalk...@grnet.gr did not reach the list for hours and I tried the
other account. Sorry about this.


On 11 November 2014 21:56, Theo de Raadt <dera...@cvs.openbsd.org> wrote:
>>I have a kernel page fault in OpenBSD 5.6 100% reproducible (I think I
>>can reproduce it in older versions too).
>>
>>I've created an OpenBSD installation in Linux through kvm on a 1GB hard
>>disk with just a root partition (a), by booting the install56.iso cdrom
>>with a command like this:
>>
>>kvm -smp 1 -m 2048 -boot d -drive \
>>file=/dev/images/openbsd-5.6,format=raw,cache=none,if=virtio -cdrom
>>/tmp/install56.iso -vnc :0
>>
>>The system boots fine with a command like this:
>>kvm -m 2048 -drive file=/dev/images/openbsd,format=raw,cache=none,if=virtio
>>
>>If I then copy it into a 100GB volume:
>>dd if=/dev/images/openbsd of=/dev/images/tmp1 bs=4M
>>
>>And try to boot it, it still boots fine. I then boot into the VM's
>>rescue disk:
>>> boot bsd.rd
>>
>>and press S to get a shell
>>
>>I mount the root partition and grab growfs program:
>># mount /dev/sd0a /mnt
>># cp /mnt/sbin/growfs .
>># umount /mnt
>>
>>Fix the MBR to use the entire disk:
>># fdisk -i wd0
>>
>>And change the disklabel:
>>
>>disklabel -E sd0
>>
>>Change the OpenBSD boundaries to cover the whole disk:
>>> b
>>Starting sector: [64]
>>Size ('*' for entire disk):[] *
>>
>>and then grow the root partition to make it 100GB log:
>>
>>> c
>>partition to change size: [] a
>>
>>Then grow the underlying FFS file system:
>>
>>growfs /dev/sd0a
>>
>>If I then reboot, the ffs driver crashes with errors like this:
>>
>>uvm_fault(0xffffffff81dcddc0, 0xc000068, 0, 2) -> e
>>kernel: page fault trap, code=0
>>Stopped at         ffs_vget+0x115: addb    %al, 0(%rcx,%rax,1)
>>ddb>
>>
>>Am I missing something or is this a kernel/growfs bug?
>
> Didn't you read the manual page?
>
>      Currently growfs can only enlarge unmounted file systems.  Do not try
>      enlarging a mounted file system - your system may panic and you will not
>      be able to use the file system any longer.  Most of the newfs(8) options
>      cannot be changed by growfs.  In fact, you can only increase the size of
>      the file system.  Use tunefs(8) for other changes.

Reply via email to