Debian Bug report logs - #632832
ufsutils: growfs.ufs do not work

version graph

Package: ufsutils; Maintainer for ufsutils is GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>; Source for ufsutils is src:ufsutils.

Reported by: Nikita A Menkovich <n.menkovich@sprinthost.ru>

Date: Wed, 6 Jul 2011 10:27:03 UTC

Severity: important

Tags: experimental, jessie, sid, squeeze

Found in version ufsutils/7.3-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, menkovich@gmail.com, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#632832; Package ufsutils. (Wed, 06 Jul 2011 10:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nikita A Menkovich <n.menkovich@sprinthost.ru>:
New Bug report received and forwarded. Copy sent to menkovich@gmail.com, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Wed, 06 Jul 2011 10:27:08 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Nikita A Menkovich <n.menkovich@sprinthost.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ufsutils: growfs.ufs do not work
Date: Wed, 06 Jul 2011 09:47:19 +0000
Package: ufsutils
Version: 7.3-1+b1
Severity: important
Tags: squeeze experimental lenny sid

When I run growfs.ufs on partition or image, grows reports:

growfs.ufs: bogus sectorsize: 0


You could reproduce this way:

root@qtest:~# dd if=/dev/zero of=tmp2.img bs=128k count=1k
1024+0 records in
1024+0 records out
134217728 bytes (134 MB) copied, 0,37235 s, 360 MB/s
root@qtest:~# dd if=/dev/zero of=tmp1.img bs=128k count=1k
1024+0 records in
1024+0 records out
134217728 bytes (134 MB) copied, 0,553614 s, 242 MB/s
root@qtest:~# mkfs.ufs ./tmp1.img 
./tmp1.img: 128.0MB (262144 sectors) block size 16384, fragment size
2048
    using 4 cylinder groups of 32.02MB, 2049 blks, 4160 inodes.
super-block backups (for fsck -b #) at:
 160, 65728, 131296, 196864
root@qtest:~# cat tmp2.img >> tmp1.img 
root@qtest:~# ls -lsha tmp1.img
257M -rw-r--r-- 1 root root 256M Июл  6 13:45 tmp1.img
root@qtest:~# growfs.ufs ./tmp1.img 
growfs.ufs: bogus sectorsize: 0


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-lib-forsete-kvm-0.0.4 (SMP w/24 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to ru_RU.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ufsutils depends on:
ii  libbsd0                  0.2.0-1         utility functions from BSD systems
ii  libc6                    2.11.2-10       Embedded GNU C Library: Shared lib
ii  libedit2                 2.11-20080614-2 BSD editline and history libraries
ii  libncurses5              5.9-1           shared libraries for terminal hand

ufsutils recommends no packages.

ufsutils suggests no packages.

-- no debconf information




Removed tag(s) lenny. Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Wed, 06 Jul 2011 12:34:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#632832; Package ufsutils. (Mon, 15 Apr 2013 14:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nikos Skalkotos <skalkoto@grnet.gr>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Mon, 15 Apr 2013 14:00:04 GMT) Full text and rfc822 format available.

Message #12 received at 632832@bugs.debian.org (full text, mbox):

From: Nikos Skalkotos <skalkoto@grnet.gr>
To: 632832@bugs.debian.org
Cc: "okeanos-dev@lists.grnet.gr" <okeanos-dev@lists.grnet.gr>
Subject: ufsutils: growfs.ufs do not work
Date: Mon, 15 Apr 2013 16:45:00 +0300
[Message part 1 (text/plain, inline)]
Hello all,

The " bogus sectorsize: 0" error is because the get_dev_size() function
in growfs.c only works when using the FreeBSD kernel. The sectorsize and
mediasize local variables get initialized only if HAVE_BSD_DISKLABEL is
defined, and this gets defined only when compiling the source under
Debian GNU/kFreeBSD.

Please find attached a patch that makes the function work under Linux
too. In order to accomplish this, the patch will add a
get_block_device_sectors() function under libport/blockdev.c. The
get_dev_size() function will call the latter if HAVE_BSD_DISKLABEL is
not defined.

The patch also adds a get_sector_size() function that returns the value
of the hard-coded sector_size variable that was already present in
libprot/blockdev.c.  This function is currently not being used, so feel
free to remove it if you want.

I'm not sure that hard-coding the sector_size is the right thing to do.
You can always ask the kernel for the sector size value by triggering an
appropriate ioctl system call:

ioctl(fd, DIOCGSECTORSIZE, &sectorsize) (for freeBSD)
ioctl(fd, BLKSSZGET, &sectorsize) (for Linux)

but I haven't changed this to make the patch as less intrusive as possible.

Regards,
Nikos Skalkotos

[03_growfs.ufs.patch (text/x-patch, attachment)]

Added tag(s) jessie. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Thu, 18 Apr 2013 17:43:17 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#632832; Package ufsutils. (Mon, 20 May 2013 08:12:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nikos Skalkotos <skalkoto@grnet.gr>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Mon, 20 May 2013 08:12:04 GMT) Full text and rfc822 format available.

Message #19 received at 632832@bugs.debian.org (full text, mbox):

From: Nikos Skalkotos <skalkoto@grnet.gr>
To: 632832@bugs.debian.org
Subject: ufsutils: growfs.ufs do not work
Date: Mon, 20 May 2013 11:09:08 +0300
[Message part 1 (text/plain, inline)]
The same problems exists in ufsutils/8.2-3. Please find attached a patch
for the aforementioned version that addresses this issue.

Regards,
Nikos


[03_growfs.ufs.patch (text/x-patch, attachment)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 04:05:53 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.