Date: Sat, 21 Aug 2010 19:14:09 GMT From: Ralf Folkerts <ralffmail-news2@yahoo.de> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/149855: growfs causes fsck to report errors in Filesystem grown with gvinum Message-ID: <201008211914.o7LJE9iS064556@www.freebsd.org> Resent-Message-ID: <201008211920.o7LJK1T1069602@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 149855 >Category: misc >Synopsis: growfs causes fsck to report errors in Filesystem grown with gvinum >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 21 19:20:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Ralf Folkerts >Release: 8-STABLE >Organization: >Environment: FreeBSD beaster.home.folkerts-net.de 8.1-STABLE FreeBSD 8.1-STABLE #0: Sat Jul 31 20:47:59 CEST 2010 toor@beaster.home.folkerts-net.de:/usr/obj/usr/src/sys/GENERIC amd64 >Description: When a subdisk is being added to a gvinum-Volume on a "dirty" (i.e. not cleared with zeroes) fsck will report many errors in the grown Filesystem. When the disk is cleared a fsck after growfs will not show any errors. I tried both with a "dirty" disk filled from urandom as well as filed with .ogg Files and with the abovementioned FBSD-Version as well as with PC-SBD 8.1/x86. Upon posting to bsdforen.de a User found this ticket http://www.freebsd.org/cgi/query-pr.cgi?pr=115174 that sounds very related to my Problems. my growfs.c is __FBSDID("$FreeBSD: src/sbin/growfs/growfs.c,v 1.26.2.4 2010/03/17 20:27:35 gavin Exp $"); During my last trials varvol was to small to hold all contents of /var. However, I ran tests with varvol being large enough. Then, after ~10 fsck -y Runs, when no more errors were found I mounted that repaired FS unter /mnt and ran, in both /mnt and /var "find . -type f -print | sort > [var|mnt]files.tst" and then diffed these; they were identical. Pls. note that I also tried not to put any files into the varvol-FS; however, the Result (fsck reports lots of errors) was the same. >How-To-Repeat: Create a Parition on Disk and fill with "garbage" [-su]beaster:~$fdisk /dev/da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=19457 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=19457 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 10474317 (5114 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 651/ 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> [-su]beaster:~$dd if=/dev/urandom of=/dev/da0s1 bs=64m create a default disklabel on the Partition (I also tried setting the fstype of the a-Slice to vinum, which did not make a difference) [-su]beaster:~$bsdlabel -w /dev/da0s1 [-su]beaster:~$bsdlabel -r /dev/da0s1 # /dev/da0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 10474301 16 unused 0 0 c: 10474317 0 unused 0 0 # "raw" part, don't edit create a vinum config (this is my Layout) drive sysdisk device da0s1a volume rootvol plex org concat sd length 512m drive sysdisk volume usrvol plex org concat sd length 100m drive sysdisk volume homevol plex org concat sd length 200m drive sysdisk volume varvol plex org concat sd length 512m drive sysdisk gvinum -> create vinum.txt gvinum -> list 1 drive: D sysdisk State: up /dev/da0s1a A: 3790/5114 MB (74%) 4 volumes: V varvol State: up Plexes: 1 Size: 512 MB V homevol State: up Plexes: 1 Size: 200 MB V usrvol State: up Plexes: 1 Size: 100 MB V rootvol State: up Plexes: 1 Size: 512 MB 4 plexes: P varvol.p0 C State: up Subdisks: 1 Size: 512 MB P homevol.p0 C State: up Subdisks: 1 Size: 200 MB P usrvol.p0 C State: up Subdisks: 1 Size: 100 MB P rootvol.p0 C State: up Subdisks: 1 Size: 512 MB 4 subdisks: S varvol.p0.s0 State: up D: sysdisk Size: 512 MB S homevol.p0.s0 State: up D: sysdisk Size: 200 MB S usrvol.p0.s0 State: up D: sysdisk Size: 100 MB S rootvol.p0.s0 State: up D: sysdisk Size: 512 MB create a Filesystem on /dev/gvinum/varvol, check and then mount it [-su]beaster:~$newfs -O2 -U /dev/gvinum/varvol /dev/gvinum/varvol: 512.0MB (1048576 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 128.02MB, 8193 blks, 16448 inodes. with soft updates super-block backups (for fsck -b #) at: 160, 262336, 524512, 786688 [-su]beaster:~$fsck -tufs /dev/gvinum/varvol ** /dev/gvinum/varvol ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 2 used, 253813 free (21 frags, 31724 blocks, 0.0% fragmentation) ***** FILE SYSTEM IS CLEAN ***** [-su]beaster:~$mount /dev/gvinum/varvol /mnt I always used to put some data into that frsh Filesystem; I used to tar /vars contents into it. umount that fresh Filesystem, check it -su]beaster:var$umount /mnt [-su]beaster:var$fsck -tufs /dev/gvinum/varvol ** /dev/gvinum/varvol ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 3518 files, 253081 used, 734 free (734 frags, 0 blocks, 0.3% fragmentation) ***** FILE SYSTEM IS CLEAN ***** add a subdisk to varvol (this is the line I entered after gvinum crate) sd name varvol.p0.s1 drive sysdisk len 1g plex varvol.p0 check vinum-config gvinum -> list 1 drive: D sysdisk State: up /dev/da0s1a A: 2766/5114 MB (54%) 4 volumes: V varvol State: up Plexes: 1 Size: 1536 MB V homevol State: up Plexes: 1 Size: 200 MB V usrvol State: up Plexes: 1 Size: 100 MB V rootvol State: up Plexes: 1 Size: 512 MB 4 plexes: P varvol.p0 C State: up Subdisks: 2 Size: 1536 MB P homevol.p0 C State: up Subdisks: 1 Size: 200 MB P usrvol.p0 C State: up Subdisks: 1 Size: 100 MB P rootvol.p0 C State: up Subdisks: 1 Size: 512 MB 5 subdisks: S varvol.p0.s1 State: up D: sysdisk Size: 1024 MB S varvol.p0.s0 State: up D: sysdisk Size: 512 MB S homevol.p0.s0 State: up D: sysdisk Size: 200 MB S usrvol.p0.s0 State: up D: sysdisk Size: 100 MB S rootvol.p0.s0 State: up D: sysdisk Size: 512 MB growfs [-su]beaster:var$growfs /dev/gvinum/varvol We strongly recommend you to make a backup before growing the Filesystem Did you backup your data (Yes/No) ? Yes new file systemsize is: 786432 frags Warning: 261792 sector(s) cannot be allocated. growfs: 1408.2MB (2883936 sectors) block size 16384, fragment size 2048 using 11 cylinder groups of 128.02MB, 8193 blks, 16448 inodes. with soft updates super-block backups (for fsck -b #) at: 1048864, 1311040, 1573216, 1835392, 2097568, 2359744, 2621920 fsck the grown FS [-su]beaster:var$fsck -tufs /dev/gvinum/varvol ** /dev/gvinum/varvol ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes UNKNOWN FILE TYPE I=65792 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65793 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65794 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65795 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65796 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65797 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65798 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65799 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65800 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65801 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65802 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65803 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65804 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65805 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65806 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65807 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65808 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65809 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65810 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65811 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65812 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] y UNKNOWN FILE TYPE I=65813 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] --- more simple strategy create Partition, and label(I used the a-Slice), fill it from urandom [-su]beaster:var$disklabel -r /dev/da0s1 # /dev/da0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 10474301 16 unused 0 0 c: 10474317 0 unused 0 0 # "raw" part, don't edit [-su]beaster:var$dd if=/dev/urandom of=/dev/da0s1a bs=64m create a vinum-config [-su]beaster:var$gvinum gvinum -> create vinum.txt gvinum -> list 1 drive: D sysdisk State: up /dev/da0s1a A: 3790/5114 MB (74%) 4 volumes: V varvol State: up Plexes: 1 Size: 512 MB V homevol State: up Plexes: 1 Size: 200 MB V usrvol State: up Plexes: 1 Size: 100 MB V rootvol State: up Plexes: 1 Size: 512 MB 4 plexes: P varvol.p0 C State: up Subdisks: 1 Size: 512 MB P homevol.p0 C State: up Subdisks: 1 Size: 200 MB P usrvol.p0 C State: up Subdisks: 1 Size: 100 MB P rootvol.p0 C State: up Subdisks: 1 Size: 512 MB 4 subdisks: S varvol.p0.s0 State: up D: sysdisk Size: 512 MB S homevol.p0.s0 State: up D: sysdisk Size: 200 MB S usrvol.p0.s0 State: up D: sysdisk Size: 100 MB S rootvol.p0.s0 State: up D: sysdisk Size: 512 MB gvinum -> creat a Filesystem on a Volume [-su]beaster:var$newfs -O2 -U /dev/gvinum/varvol /dev/gvinum/varvol: 512.0MB (1048576 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 128.02MB, 8193 blks, 16448 inodes. with soft updates super-block backups (for fsck -b #) at: 160, 262336, 524512, 786688 [-su]beaster:var$gvinum gvinum -> fsck that FS [-su]beaster:var$fsck -tufs /dev/gvinum/varvol ** /dev/gvinum/varvol ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 2 used, 253813 free (21 frags, 31724 blocks, 0.0% fragmentation) ***** FILE SYSTEM IS CLEAN ***** extend varvol by adding a subdisk [-su]beaster:var$gvinum gvinum -> create sd name varvol.p0.s1 drive sysdisk len 1g plex varvol.p0 gvinum -> gvinum -> list 1 drive: D sysdisk State: up /dev/da0s1a A: 2766/5114 MB (54%) 4 volumes: V varvol State: up Plexes: 1 Size: 1536 MB V homevol State: up Plexes: 1 Size: 200 MB V usrvol State: up Plexes: 1 Size: 100 MB V rootvol State: up Plexes: 1 Size: 512 MB 4 plexes: P varvol.p0 C State: up Subdisks: 2 Size: 1536 MB P homevol.p0 C State: up Subdisks: 1 Size: 200 MB P usrvol.p0 C State: up Subdisks: 1 Size: 100 MB P rootvol.p0 C State: up Subdisks: 1 Size: 512 MB 5 subdisks: S varvol.p0.s1 State: up D: sysdisk Size: 1024 MB S varvol.p0.s0 State: up D: sysdisk Size: 512 MB S homevol.p0.s0 State: up D: sysdisk Size: 200 MB S usrvol.p0.s0 State: up D: sysdisk Size: 100 MB S rootvol.p0.s0 State: up D: sysdisk Size: 512 MB gvinum -> grow that FS [-su]beaster:var$growfs /dev/gvinum/varvol We strongly recommend you to make a backup before growing the Filesystem Did you backup your data (Yes/No) ? Yes new file systemsize is: 786432 frags Warning: 261792 sector(s) cannot be allocated. growfs: 1408.2MB (2883936 sectors) block size 16384, fragment size 2048 using 11 cylinder groups of 128.02MB, 8193 blks, 16448 inodes. with soft updates super-block backups (for fsck -b #) at: 1048864, 1311040, 1573216, 1835392, 2097568, 2359744, 2621920 run fsck [-su]beaster:var$fsck -tufs /dev/gvinum/varvol ** /dev/gvinum/varvol ** Last Mounted on ** Phase 1 - Check Blocks and Sizes PARTIALLY ALLOCATED INODE I=65792 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? [yn] ^C [-su]beaster:var$ ***** FILE SYSTEM MARKED DIRTY ***** >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008211914.o7LJE9iS064556>