From saka@oxygen.michiga.com Tue Jun 17 10:58:31 2008 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD66E106567A for ; Tue, 17 Jun 2008 10:58:30 +0000 (UTC) (envelope-from saka@oxygen.michiga.com) Received: from oxygen.michiga.com (219.117.204.214.static.zoot.jp [219.117.204.214]) by mx1.freebsd.org (Postfix) with SMTP id 689488FC16 for ; Tue, 17 Jun 2008 10:58:30 +0000 (UTC) (envelope-from saka@oxygen.michiga.com) Received: (qmail 21021 invoked from network); 17 Jun 2008 10:31:48 -0000 Received: from localhost.michiga.com (HELO oxygen.michiga.com) (127.0.0.1) by localhost.michiga.com with SMTP; 17 Jun 2008 10:31:48 -0000 Received: (from saka@localhost) by oxygen.michiga.com (8.12.10/8.12.10/Submit) id m5HAVmee021019; Tue, 17 Jun 2008 19:31:48 +0900 (JST) (envelope-from saka) Message-Id: <200806171031.m5HAVmee021019@oxygen.michiga.com> Date: Tue, 17 Jun 2008 19:31:48 +0900 (JST) From: Yui Sakazume Reply-To: Yui Sakazume To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: growfs does not work with RAID volume X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 124669 >Category: bin >Synopsis: growfs(8) does not work with RAID volume >Confidential: no >Severity: non-critical >Priority: medium >Responsible: gavin >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 17 11:00:08 UTC 2008 >Closed-Date: Sat Jan 02 19:55:29 UTC 2010 >Last-Modified: Sat Jan 02 19:55:29 UTC 2010 >Originator: Yui Sakazume >Release: FreeBSD 7.0-RELEASE i386 >Organization: >Environment: System: FreeBSD oxygen.michiga.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Jun 15 12:50:56 JST 2008 saka@oxygen.michiga.com:/usr/obj/usr/src/sys/OXYGEN i386 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: 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: The data for partition 3 is: The data for partition 4 is: 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: From: Yui Sakazume To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/124669: growfs does not work with RAID volume Date: Tue, 17 Jun 2008 20:31:10 +0900 (JST) I was able to grow the filesystem using growfs with -y option. Also, I noticed I should answer 'Yes' (Y is uppercase) for 'Did you backup your data (Yes/No) ?' prompt. However, the filesystem was corrupted. oxygen# fsck /dev/da2p1 ** /dev/da2p1 ** Last Mounted on /mnt/test ** Phase 1 - Check Blocks and Sizes UNKNOWN FILE TYPE I=6400 CLEAR? [yn] n UNKNOWN FILE TYPE I=6401 CLEAR? [yn] n UNKNOWN FILE TYPE I=6402 CLEAR? [yn] n UNKNOWN FILE TYPE I=6403 CLEAR? [yn] n UNKNOWN FILE TYPE I=6404 CLEAR? [yn] n . . . Best regards, Yui State-Changed-From-To: open->closed State-Changed-By: gavin State-Changed-When: Sat Jan 2 19:53:07 UTC 2010 State-Changed-Why: Close. THe failure to grow the filesystem was user error: "Yes" must be entered with proper capitalization. The resulting corrupt filesystem issue is a duplicate of PR bin/115174 and has already been fixed in the UFS2 case. Responsible-Changed-From-To: freebsd-bugs->gavin Responsible-Changed-By: gavin Responsible-Changed-When: Sat Jan 2 19:53:07 UTC 2010 Responsible-Changed-Why: Track http://www.freebsd.org/cgi/query-pr.cgi?pr=124669 >Unformatted: