<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=7635&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=7635</link>
		<description><![CDATA[The most recent posts in [SOLVED] resizing after a diskclone to recover reclaimed space.]]></description>
		<lastBuildDate>Fri, 09 Jan 2026 22:14:58 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=61224#p61224</link>
			<description><![CDATA[<p>forgot a step:</p><p>lvresize -l +100%FREE /dev/mapper/matrix-home</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Fri, 09 Jan 2026 22:14:58 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=61224#p61224</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60327#p60327</link>
			<description><![CDATA[<p>Actually, I think my file manager is having a glitch or something because everywhere else indicates it has been raised to the correct amount of memory.</p><p>EDIT: Maybe its not the file manager, because I tried doing lvextend -l +100%FREE to my volume and it acted like it had the old amount of storage... very weird.</p><p>Very peculiar indeed...</p><p>/dev/volume/home seems to have 1.79TB (lsblk command)</p><p>but home folder only has 443GB when I check it with lvextend +100%FREE (spacefm)</p><p>Very peculiar...</p><p>EDIT FIGURED IT OUT!</p><p>resize2fs /dev/myvolume/home was the final touch. </p><p>cfdisk /dev/sda in live image or w/e<br />partprobe<br />lvextend -L +100%FREE /dev/mapper/matrix-home <br />#####must be in devuan after gparted unlocks luks (did so via usb persistent install)<br />resize2fs /dev/matrix/home</p><p>That&#039;s how I did it.&#160; SOLVED.</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Tue, 02 Dec 2025 14:17:44 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60327#p60327</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60326#p60326</link>
			<description><![CDATA[<p>@ralph</p><p>Fair enough, but would showing you vgdisplay, pvdisplay, help</p><p>EDIT: I figured out the next step,</p><p>had to do this:</p><p>lvextend -L +100%FREE /dev/mapper/matrix-home </p><p>with gparted disabling luks encryption temporarily</p><p>Now I need to go from there.</p><p>its now in the physical volume but not yet the virtual volume, etc...</p><p>EDIT ONE MORE:</p><p>It still doesn&#039;t show in my file manager or home the change. yet.</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Tue, 02 Dec 2025 13:47:06 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60326#p60326</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60325#p60325</link>
			<description><![CDATA[<p>In order for me to assist I will need to sight the exact result/response from the command I suggest; not some hand-wavy &quot;it didn&#039;t work&quot; or anything wiffle waffle ... I need to the exact response.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Tue, 02 Dec 2025 13:30:12 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60325#p60325</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60324#p60324</link>
			<description><![CDATA[<p>here is some more info:<br />nvme0n1&#160; &#160; &#160; &#160; &#160; &#160;259:0&#160; &#160; 0&#160; &#160;1.8T&#160; 0 disk&#160; <br />├─nvme0n1p1&#160; &#160; &#160; &#160;259:1&#160; &#160; 0&#160; &#160;300M&#160; 0 part&#160; /boot<br />└─nvme0n1p2&#160; &#160; &#160; &#160;259:2&#160; &#160; 0&#160; &#160;1.8T&#160; 0 part&#160; <br />&#160; └─lvmvg&#160; &#160; &#160; &#160; &#160;254:0&#160; &#160; 0&#160; &#160;1.8T&#160; 0 crypt <br />&#160; &#160; ├─user-root 254:1&#160; &#160; 0&#160; &#160; 25G&#160; 0 lvm&#160; &#160;/<br />&#160; &#160; └─user-home 254:2&#160; &#160; 0 451.6G&#160; 0 lvm&#160; &#160;/home</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Tue, 02 Dec 2025 13:25:09 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60324#p60324</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60323#p60323</link>
			<description><![CDATA[<p>@ralph not even close to the truth, I don&#039;t know why you said that</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Tue, 02 Dec 2025 13:21:29 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60323#p60323</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60322#p60322</link>
			<description><![CDATA[<p>Ah, so you don&#039;t want help. Fair enough.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Tue, 02 Dec 2025 13:20:37 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60322#p60322</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60321#p60321</link>
			<description><![CDATA[<p>@ralph more or less it didn&#039;t work I mean.</p><p>Funny thing is, I did this long ago and got it to work. I forget the guide I found though.</p><p>Its online somewhere, but... I can&#039;t find it easily.</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Tue, 02 Dec 2025 13:17:48 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60321#p60321</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60320#p60320</link>
			<description><![CDATA[<p>??? Did the command actually say &quot;Hmm not working...&quot; ???</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Tue, 02 Dec 2025 13:15:31 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60320#p60320</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60319#p60319</link>
			<description><![CDATA[<p>@ralph Hmm not working...</p><p>@Vert yes I did clone a smaller to a bigger. I forget if e2fsck, partimage, partclone or something else is needed</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Tue, 02 Dec 2025 12:53:56 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60319#p60319</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60315#p60315</link>
			<description><![CDATA[<p>@zapper: I&#039;m guessing you need to resize the &quot;home&quot; logical volume to use up all the volume group space, and you then need to enlarge the filesystem inside the logical volume to fill all available logical volume space.</p><p>Possibly it all can be done in a sinlge command, something like:</p><div class="codebox"><pre><code># lvresize -l 100%VG -r $LVM</code></pre></div><p> where you replace $LVM with the identity fo the logical volume.</p><p>A backup might be handy.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Tue, 02 Dec 2025 06:54:09 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60315#p60315</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60314#p60314</link>
			<description><![CDATA[<p>my bet:</p><p>you cloned small one to big one. But old small&#039;s&#160; mbr/gpt header still effective.<br />you should update that old mbr/gpt header.<br />look at fdisk/gdisk &#039;s recovery and/or expert menu. <br />may be helpers in there.</p><p>Disclaimer: i dont know lvm stuff single bit.<br />this is my tiny gpt util. feel free to modify as your need and others guys also so.</p><div class="codebox"><pre class="vscroll"><code>#include &lt;unistd.h&gt;
#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;errno.h&gt;

#define SIG		0x5452415020494645UL
#define HDR		0x5c
#define MBR		510
#define OS_EFI	0xEF
#define OS_GPT	0xEE
#define OS		450
#define LBA		0x200UL
#define ALL		0x400UL

struct part {
	long	t[2];		//type
	long	g[2];		//guid
	long	f;			//first LBA
	long	l;			//last  LBA
	long	a;			//attrs
	char	n[72];		//name;
} __attribute__ ((packed));

struct gpt {// NOTICE!: LBA&#039;s are zero based.
	long		s;		//sign
	int			r;		//rev
	int			h;		//headersize: 0x5c
	unsigned	hc;		//header crc32
	int			res;
	long		c;		//currentLBA
	long		b;		//backupLBA
	long		f;		//firstUsableLBA
	long		l;		//lastUsableLBA
	long		g[2];	//guid
	long		p;		//partition table LBA
	int			n;		//#part
	int			e;		//sizeof(struct part)
	unsigned	pc;		//part table crc32
	char	res2[420];
} __attribute__ ((packed));

static unsigned long	crc, crctab[256], poly = 0xEDB88320L;
static int				ii, jj;

unsigned crc32 (unsigned char *block, unsigned len){
   crc  = 0xFFFFFFFF;
   for (ii = 0; ii &lt; len; ii++) crc = ((crc &gt;&gt; 8) &amp; 0x00FFFFFF) ^ crctab[(crc ^ *block++) &amp; 0xFF];
   return (crc ^ 0xFFFFFFFF);
}

void crc32tab(void){
	for (ii = 0; ii &lt; 256; ii++){
		crc = ii;
		for (jj = 8; jj &gt; 0; jj--){
			if(crc &amp; 1)	crc = (crc &gt;&gt; 1) ^ poly;
			else		crc &gt;&gt;= 1;
		}
		crctab[ii] = crc;
	}
}

static struct gpt   *hd;
static struct part	*pr;
static char         buf[ALL];
static int          disk_fd, partindex, parttype;
static long         disksize, partstart, partsize;

static char
parttypes[5][16] = {
		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, //unused
		{ 0x28, 0x73, 0x2a, 0xc1, 0x1f, 0xf8, 0xd2, 0x11, 0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b }, //efi
		{ 0xe3, 0xbc, 0x68, 0x4f, 0xcd, 0xe8, 0xb1, 0x4d, 0x96, 0xe7, 0xfb, 0xca, 0xf9, 0x84, 0xb7, 0x09 }, //lin64
		{ 0xaf, 0x3d, 0xc6, 0x0f, 0x83, 0x84, 0x72, 0x47, 0x8e, 0x79, 0x3d, 0x69, 0xd8, 0x47, 0x7d, 0xe4 }, //lin
		{ 0xb6, 0x7c, 0x6e, 0x51, 0xcf, 0x6e, 0xd6, 0x11, 0x8f, 0xf8, 0x00, 0x02, 0x2d, 0x09, 0x71, 0x2b }, //freebsd UFS
};

long time(long*);

int main(int ac, char* av[]){
	if(ac != 7){
		printf(&quot;Usage: %s  disk  disksize  parttype  partindex  partstart  partsize \n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n&quot;,
			av[0],
			&quot;disk       : /dev/sdX&quot;,
			&quot;disksize   : disk size (as LBA)&quot;,
			&quot;parttype   : numeric type of partition&quot;,
			&quot;partindex  : part index (0 based)&quot;,
			&quot;partstart  : part start LBA (0 based)&quot;,
			&quot;partsize   : part size (as LBA)&quot;
		);
		printf(&quot;Supported part types:\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n&quot;,
			&quot;0 -&gt; unused/free&quot;,
			&quot;1 -&gt; EFI&quot;,
			&quot;2 -&gt; linux x86_64 root&quot;,
			&quot;3 -&gt; linux fs&quot;,
			&quot;4 -&gt; freebsd ufs&quot;
		);

		return 0;
	}

	time(NULL);

	disk_fd		= open(av[1], O_RDWR);
	disksize	= strtol(av[2], NULL, 10);
	parttype	= atoi(av[3]);
	partindex	= atoi(av[4]);
	partstart = strtol(av[5], NULL, 10);
	partsize	= strtol(av[6], NULL, 10);

	if(!disksize){
		read(disk_fd, buf, LBA);  //load pmbr
		read(disk_fd, buf, LBA);  //load gpt
		read(disk_fd, buf + LBA, LBA);  //load parts
		hd = (struct gpt*) buf;
		pr = (struct part*) (buf + LBA);
		printf(&quot;current  %ld  bakup  %ld  firstUsable  %ld lastUsable %ld  part %ld #parts %d entrysize %d hdrsize %d\n&quot;, hd-&gt;c, hd-&gt;b, hd-&gt;f, hd-&gt;l, hd-&gt;p, hd-&gt;n, hd-&gt;e, hd-&gt;h);

		for(ii=0; ii&lt;4; ii++){
			printf(&quot;type  %lx %lx  firstUsable  %ld lastUsable %ld \n&quot;, pr[ii].t[0], pr[ii].t[1], pr[ii].f, pr[ii].l);
		}

		return 0;
	}

	crc32tab();

	buf[OS]		= OS_GPT;
	*(unsigned*)(buf + OS + 4)	= 1;
	*(unsigned*)(buf + OS + 8)	= 1;
	buf[MBR]	= 0x55;
	buf[MBR+1]	= 0xaa;
	crc = write(disk_fd, buf, LBA); //update pmbr
	printf(&quot;io1 %lu \n&quot;, crc);

	crc = read(disk_fd, buf, LBA);  //load gpt
	printf(&quot;io2 %lu \n&quot;, crc);
	crc = read(disk_fd, buf + LBA, LBA);  //load parts
	printf(&quot;io3 %lu \n&quot;, crc);

	memset(buf, 0, LBA);
	hd = (struct gpt*) buf;
	pr = (struct part*) (buf + LBA);

	hd-&gt;s = SIG;
	hd-&gt;r = 0x10000;
	hd-&gt;h = HDR;

	hd-&gt;c = 1;
	hd-&gt;b = hd-&gt;c; //disksize; backup disabled for simplicity

	hd-&gt;f = hd-&gt;c + 2;
	hd-&gt;l = disksize - 2; //son sektor bakup&#039;a rezerve.

	hd-&gt;g[0] = time(NULL);
	hd-&gt;g[1] = time(NULL);

	hd-&gt;p = hd-&gt;c + 1;
	hd-&gt;n = 4;
	hd-&gt;e = 128;

	memcpy(pr[partindex].t, &amp;parttypes[parttype], 16);
	pr[partindex].g[0] = time(NULL);
	pr[partindex].g[1] = time(NULL);
	pr[partindex].f = partstart;
	pr[partindex].l = partstart + partsize - 1;
	pr[partindex].a = 0;
/* once pc hesaplanmali! */
	hd-&gt;pc = crc32((unsigned char*)pr, hd-&gt;n * hd-&gt;e);
	hd-&gt;hc = crc32((unsigned char*)hd, hd-&gt;h);

	crc = lseek(disk_fd, LBA, SEEK_SET); //goto gpt
	printf(&quot;io4 %lu \n&quot;, crc);
	crc = write(disk_fd, buf, LBA); //update gpt
	printf(&quot;io4 %lu \n&quot;, crc);
	crc = write(disk_fd, buf+LBA, LBA); //update part table
	printf(&quot;io6 %lu \n&quot;, crc);
	sync();

	close(disk_fd);
	if(errno) perror(&quot;&quot;);

	return 0;
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (wert)]]></author>
			<pubDate>Tue, 02 Dec 2025 06:27:38 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60314#p60314</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] resizing after a diskclone to recover reclaimed space]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=60311#p60311</link>
			<description><![CDATA[<p>I have done the following:</p><p>cfdisk /dev/sda in live image or w/e<br />partprobe</p><p>and now my lvmvg matches the luks volume size.</p><p>However, I am trying to rezize my home partition volume and it keeps saying stuff like there is nothing to add.</p><p>I have 476.6G of 1.8 TB being used currently used, so I know there is something wrong</p><p>Can someone help me out here?</p><p>CLI instructions required btw.</p>]]></description>
			<author><![CDATA[dummy@example.com (zapper)]]></author>
			<pubDate>Tue, 02 Dec 2025 01:45:25 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=60311#p60311</guid>
		</item>
	</channel>
</rss>
