From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RR63G-0004nG-Np for garchives@archives.gentoo.org; Thu, 17 Nov 2011 17:47:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C7B121C0D9; Thu, 17 Nov 2011 17:46:53 +0000 (UTC) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id A5EBF21C02A for ; Thu, 17 Nov 2011 17:45:49 +0000 (UTC) Received: by bkaq10 with SMTP id q10so2849798bka.40 for ; Thu, 17 Nov 2011 09:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=EzxghJUXtXyTn8l8HLssHy86v8MCA/ZSG9aw/sqabWc=; b=BEHpnkzEUoU5ZtEwN3kEnqPb1OT2yiHXJaLY4NNPPiNXa0ShzKFCwdkb4THb7PFULl WO6hXwntzuS0U3I6lnnVyZ4VGIoTZ5bEWczCAP3aKK8GbKUTy7qA6C1mRpxgXmIYSEer /wNLMr/RphTG60739cKqrhz404VFX8MPpLMqw= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.204.147.75 with SMTP id k11mr33015481bkv.102.1321551948644; Thu, 17 Nov 2011 09:45:48 -0800 (PST) Received: by 10.204.177.76 with HTTP; Thu, 17 Nov 2011 09:45:48 -0800 (PST) Date: Thu, 17 Nov 2011 12:45:48 -0500 Message-ID: Subject: Moving partitionless (hypothetical) (Was: Re: [gentoo-user] Process to resize ext3 file system at the command line? ) From: Michael Mol To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0518a1a3-e9ad-4205-adcc-8772b3e510b3 X-Archives-Hash: b30fe55f7d27390e855a844037843d2b On Thu, Nov 17, 2011 at 12:25 PM, Neil Bothwick wrote: > On Thu, 17 Nov 2011 09:01:46 -0800, Mark Knecht wrote: > >> =C2=A0 =C2=A0I'm pretty sure I've got the command set right to do the RA= ID-1 to >> RAID-5 conversion, but once it's done I believe the file system itself >> will still be 250GB so I'll need to resize the file system. In the >> past I've done this with gparted, which seems to work fine, but this >> time I was considering doing it at the command line. Does anyone know >> of a good web site that goes through how to do that? I've browsed >> around and found different pages that talk about it but my reading >> looks like they all have minor differences which leaves me a bit >> worried. > > Using cfdisk or fdisk, delete the partition and recreate it, USING THE > SAME START BLOCK at a larger size. > > Then "resize2fs /dev/sdwhatever" will resize the filesystem to fill the > partition. Silly question, but is there really a need for a partition in a scenario like that? He could conceivably move the data to the beginning of the block device, and then run resize2fs. Less silly question: What would an effective means of moving the data on-disk like that be? Something like: dd if=3D/dev/md0 of=3D/dev/md0 skip=3D$count_of_blocks_to_get_to_fs_start would do it, I think, since you wouldn't be overwriting any block unless it was useless or already moved. Better not interrupt it unless you can recalculate the skip and seek parameters, though. That'd default to moving data 512 bytes at a time, though, which would be slow and painful. You could do something like dd if=3D/dev/md0 of=3D/dev/md0 skip=3D$fs_start count=3D$boundary_pos dd if=3D/dev/md0 of=3D/dev/md0 bs=3D4M skip=3D$resume_read_pos seek=3D$resu= me_write_pos where: fs_start =3D # the block number to where the filesystem begins boundary_pos =3D # how many increments of 512 bytes it would take to get to a nice round number like 4M resume_read_pos =3D # how many increments of 4MB it would take to get back to where we left off reading resume_write_pos =3D # how many increments of 4MB it would take to get back to where we left off writing I don't know what the exact values for these would be, though. --=20 :wq