bin/124669: growfs does not work with RAID volume

Yui Sakazume saka at michiga.com
Tue Jun 17 11:00:09 UTC 2008


>Number:         124669
>Category:       bin
>Synopsis:       growfs does not work with RAID volume
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 17 11:00:08 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Yui Sakazume
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
>Environment:
NEC Express5800 120Rg-2
3ware 9550SXU RAID card with SATA Drive.
>Description:
I attached additional drive to RAID card and increased the size of RAID
volume. Then, I tried to grow filesystem size using 'growfs' command.
However, growfs does not work. It looks like growfs can not get correct
number of sectors.

The result of simple test is as follows.

1. making test volume
I made single disk volume, device name is /dev/da2, size is 465 GB.

oxygen# tw_cli /c0/u2 show

Unit     UnitType  Status         %RCmpl  %V/I/M  Port  Stripe  Size(GB)
------------------------------------------------------------------------
u2       SINGLE    OK             -       -       p5    -       465.651

oxygen# dmesg | grep da2
da2 at twa0 bus 0 target 2 lun 0
da2: <AMCC 9550SXU-8L DISK 3.08> Fixed Direct Access SCSI-5 device
da2: 100.000MB/s transfers
da2: 476827MB (976541696 512 byte sectors: 255H 63S/T 60786C)

2. I confirmed that this volume is usable with no problem.

oxygen# newfs -b 65536 /dev/da2
increasing fragment size from 2048 to block size / 8 (8192)
/dev/da2: 476827.0MB (976541696 sectors) block size 65536, fragment size 8192
        using 249 cylinder groups of 1922.00MB, 30752 blks, 246016 inodes.
super-block backups (for fsck -b #) at:
 256, 3936512, 7872768, 11809024, 15745280, 19681536, 23617792, 27554048, 31490304,
	.
	.
	.
oxygen# mount /dev/da2 /mnt/test
oxygen# df -h /mnt/test
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/da2      451G     16K    415G     0%    /mnt/test

3. labeling to the disk.

oxygen# fdisk -BI /dev/da2
******* Working on device /dev/da2 *******
fdisk: Geom not found: "da2"
oxygen# fdisk /dev/da2
******* Working on device /dev/da2 *******
parameters extracted from in-core disklabel are:
cylinders=60786 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=60786 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 976527027 (476819 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 369/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

oxygen# bsdlabel -w /dev/da2
oxygen# bsdlabel /dev/da2
# /dev/da2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 976541680       16    unused        0     0
  c: 976541696        0    unused        0     0         # "raw" part, don't edit

4. making the filesystem.

I made the 488 MB filesystem.

oxygen# newfs -s 100000 /dev/da2a
/dev/da2a: 48.8MB (100000 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 12.22MB, 782 blks, 1600 inodes.
super-block backups (for fsck -b #) at:
 160, 25184, 50208, 75232
oxygen# mount /dev/da2a /mnt/test
oxygen# df -h /mnt/test
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/da2a      47M    4.0K     43M     0%    /mnt/test

5. growing the filesystem

oxygen# growfs /dev/da2a
We strongly recommend you to make a backup before growing the Filesystem

 Did you backup your data (Yes/No) ? yes

 Nothing done

6. The same test using GPT label

oxygen# gpt create -f /dev/da2
oxygen# gpt add /dev/da2
/dev/da2p1 added
oxygen# gpt show /dev/da2
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34  976541629      1  GPT part - FreeBSD UFS/UFS2
  976541663         32         Sec GPT table
  976541695          1         Sec GPT header
oxygen# newfs -s 100000 /dev/da2p1
/dev/da2p1: 48.8MB (100000 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 12.22MB, 782 blks, 1600 inodes.
super-block backups (for fsck -b #) at:
 160, 25184, 50208, 75232
oxygen# growfs /dev/da2p1
We strongly recommend you to make a backup before growing the Filesystem

 Did you backup your data (Yes/No) ? yes

 Nothing done

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
 >System: FreeBSD oxygen.michiga.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Jun 15 12:50:56 JST 2008 saka at oxygen.michiga.com:/usr/obj/usr/src/sys/OXYGEN i386


More information about the freebsd-bugs mailing list