<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;"
bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 18/11/2018 20:13, Geoffrey Mendelson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMNrpNOGFXyH_jpC8SOzzKOXewmfKdJQfpTB8Zf4Ufxakzxs+g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">I have an Ubuntu 15.10 system. When I installed
it, it defaulted to a regular ext(something) boot partition, and
an lvm partition with everything else on it.</div>
<div dir="auto"><br>
</div>
<div dir="auto">There now is a bad spot in the lvm partition. fsck
with a read check does not find it. I have moved enough data off
of it, so it wont show up in a file copy. </div>
<div dir="auto"><br>
</div>
<div dir="auto">I will have a new drive tomorrow, intended to
replace the old one. The old one is 300 gig, the new one is 1tb.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Normally, I would just partition it, make both
file systems ext4, copy the files and run grub.</div>
<div dir="auto"><br>
</div>
<div dir="auto">The lvm volume is something I dont understand.</div>
<div dir="auto"><br>
</div>
<div dir="auto">If there a diskcopy type utility that would do all
the work for me?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Is there a howto?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Can I just make the root an ext4 partition on the
new disk and skip the lvm?</div>
<div dir="auto"><br>
</div>
<div dir="auto">What would I have to change? I assume grub.conf
and /etc/fstab. Anything else?</div>
</blockquote>
<p><br>
</p>
<p>I'm not exactly sure what it is that you want to do. One thing
you can do is (for the time of the transition), connect the new,
and then ask LVM to move the data to it. No need to mess with
fstab.<br>
</p>
<p><br>
</p>
<p>Disclaimer: I didn't test the commands here, I don't play with
LVM that much. I assume you have a logical volume called LV, that
the old physical partition is /dev/sda2 and that the physical
partition is /dev/sdb2[1] .</p>
<p><br>
</p>
<p>1. Partition the new disk. Create (among others) the partition of
type LVM /dev/sdb2</p>
<p>2. Make that partition a physical volume:</p>
<p><br>
</p>
<p>pvcreate /dev/sdb2</p>
<p><br>
</p>
<p>3. Add the new partition (physical volume) to the logical volume:</p>
<p><br>
</p>
<p>vgextend LV /dev/sdb2</p>
<p><br>
</p>
<p>4. Move information from this physical volume (this should take a
while):</p>
<p><br>
</p>
<p>pvmove /dev/sda2</p>
<p><br>
</p>
<p>5. Now you can ask LVM to remove the old physical volume
(partition) from the logical volume:</p>
<p><br>
</p>
<p>vgreduce LV /dev/sda2</p>
<p><br>
</p>
<p><br>
</p>
<p>[1] This is the name it happens to have right now. It's not the
name LVM identifies the partition anyway: it identifies it by an
ID written inside the physical volume.<br>
</p>
<p><br>
</p>
<p>-- Tzafrir<br>
</p>
</body>
</html>