From owner-freebsd-stable Sun Nov 10 18:36:44 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA28A37B401 for ; Sun, 10 Nov 2002 18:36:42 -0800 (PST) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id B433A43E3B for ; Sun, 10 Nov 2002 18:36:36 -0800 (PST) (envelope-from eugen@kuzbass.ru) Received: from kuzbass.ru (kost [213.184.65.82]) by www.svzserv.kemerovo.su (8.12.6/8.12.5) with ESMTP id gAB2aVNf076550; Mon, 11 Nov 2002 09:36:32 +0700 (KRAT) (envelope-from eugen@kuzbass.ru) Message-ID: <3DCF17A3.A0267D9D@kuzbass.ru> Date: Mon, 11 Nov 2002 09:36:19 +0700 From: Eugene Grosbein Organization: SVZServ X-Mailer: Mozilla 4.79 [en] (Win95; U) X-Accept-Language: ru,en MIME-Version: 1.0 To: Ian Dowse Cc: FreeBSD-Stable Subject: Re: backups of SUPERBLOCK References: <200211101250.aa33786@salmon.maths.tcd.ie> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > The superblock location for cylinder group N in units of 512-byte > sectors as fsck expects is: > > (fpg * N + cgoffset * (N & ~cgmask) + sblkno) * (fsize / 512) > > Most recent filesystems don't use the per cylinder group superblock > offset (cgmask is 0xffffffff) so this simplifies to: > > (fpg * N + sblkno) * (fsize / 512) > > There are `ncg' cylinder groups, i.e. the values 0..(ncg - 1) are > valid cylinder group numbers. For the above filesystem, fpg=32768, > sblkno=16, fsize=1024, so that gives backup superblocks at 32, > 65568, 131104, 196640 ... 1966112, 2031648. Thank you very much! > I guess dumpfs should have an option to print the list in the > units that fsck expects. It would be very useful. It is important for average administrator to have simple way to get list of superblocks for existing filesystem. Eugene Grosbein To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message