Re: Need help with LVM recovery

2017-01-05 Thread Gordon Messmer
On Tue, Jan 3, 2017 at 8:20 PM,   wrote:
>
> Once, I resized volumes, I ran resizee2fs.  However, system will not boot 
> properly due to bad geometry.

Too late to help now, but you should run "lvresize -r" when shrinking
filesystems, so that the filesystem is resized first.

> To correct the situation, I ran mk2efs.   This fix the geometry but, my 
> /home/ is gone.

If you've run mke2fs, it's probably time to go to backups.

> I found a recovery point from 2014 in /etc/ LVM/archive.  However, my problem 
> is when I try to recover with
> Pvcreate --uuid  --restorefile file /dev/sda8
> I get partition is already mounted error

If there's any hope of using that, you'd probably need to boot the
installer, copy that file out of the damaged system, unmount the
damaged filesystems, and then attempt to recover the old LVM
configuration, and then recover the filesystems.  However, recovery of
the filesystem in place may not be possible, and as Chris indicated,
you almost certainly want to avoid making any changes to the data on
the disk (filesystems or files) until your data is recovered.  That
means copying data off of that disk to another disk.

You probably want to look at photorec and testdisk.  Run them from a
bootable live USB installation to see if they can find your files.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Need help with LVM recovery

2017-01-05 Thread Michael Schwendt
On Wed, 04 Jan 2017 04:20:04 -, shadhi...@gmail.com wrote:

> All,
>   I need help with following situation 
> 
> OS: fedora 22
> Dell
> 
> My root logical volume was full.  As a result, I attempted to resize my home 
> partition.
> 
> My physical volume :/dev/sda8
> 
> 
> My VG:fedora
> 
> Logical volumes are:
> 
> 
> /dev/mapper/fedora-root
> 
> /dev/mapper/fedora-root

Typo? Those two are the same.

> Once, I resized volumes, I ran resizee2fs.  However, system will not boot 
> properly due to bad geometry.
>

Really in that order?

$ man lvresize
[...]
DESCRIPTION
   lvresize allows you to resize a logical volume.  Be careful when reduc‐
   ing a logical volume's size,  because  data  in  the  reduced  part  is
   lost!!!   You should therefore ensure that any filesystem on the volume
   is shrunk first so that the extents that are to be removed are  not  in
   use.  
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Need help with LVM recovery

2017-01-04 Thread Chris Murphy
On Tue, Jan 3, 2017 at 9:20 PM,   wrote:
> All,
>   I need help with following situation
>
> OS: fedora 22
> Dell
>
> My root logical volume was full.  As a result, I attempted to resize my home 
> partition.
>
> My physical volume :/dev/sda8
>
>
> My VG:fedora
>
> Logical volumes are:
>
>
> /dev/mapper/fedora-root
>
> /dev/mapper/fedora-root
>
> Once, I resized volumes, I ran resizee2fs.  However, system will not boot 
> properly due to bad geometry.
>
> To correct the situation, I ran mk2efs.   This fix the geometry but, my 
> /home/ is gone.

I'm gonna guess you meant you ran e2fsck. If you really ran mke2fs,
the fs probably not recoverable, if additionally you mounted it, I
don't see how it's recoverable (mounting causes inode initialization
which will write over large areas of the volume, due to the resize, it
will be writing on top of both data and old metadata - the whole thing
will be a mess).

Anyway, I think this is a case for debugfs, but you're probably best
off asking about serious ext4 related problems on the ext4 list. The
more you keep making modifications without actually knowing what
you're doing, the greater the chance of total data loss.



>
>
> Now, I know data is there and I need to recover it.
>
> I found a recovery point from 2014 in /etc/ LVM/archive.  However, my problem 
> is when I try to recover with
>
> Pvcreate --uuid  --restorefile file /dev/sda8

Doesn't seem related at all. In your steps you've only done a resize
of the fs volume. You hadn't yet resized the LV, and in any case
that's not the problem if you can mount home successfully and it's
just empty. I




-- 
Chris Murphy
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Bob Goodwin - Zuni, Virginia, USA


On 12/21/2013 05:21 PM, Roger Heflin wrote:

it just wnats /dev/fedora_box1000/root or /dev/fedora_box1000/home the
lv_ is not in the name of the lv.
Thanks to everyone in this thread for your invaluable help. It looks 
like I am finally where I need to be with this LVM, maybe I wont have to 
re-install after all.


[bobg@box10 ~]$ df -h
Filesystem   Size  Used Avail Use% Mounted on
/dev/mapper/fedora_box1000-root   34G  4.5G   27G  15% /
devtmpfs 3.7G 0  3.7G   0% /dev
tmpfs3.7G   68K  3.7G   1% /dev/shm
tmpfs3.7G  912K  3.7G   1% /run
tmpfs3.7G 0  3.7G   0% /sys/fs/cgroup
tmpfs3.7G   16K  3.7G   1% /tmp
/dev/sdb2477M  101M  347M  23% /boot
/dev/mapper/fedora_box1000-home  546G  7.2G  517G   2% /home
192.168.1.8:/home862G  190G  628G  24% /mnt/HOME1
192.168.1.48://SRVR1 635G   54G  549G   9% /mnt/BOX48

/home now resides on the remainder of the disk which is what I expected 
the installer to do. What went wrong I don't know, but I felt confident 
when I did the install that I had it all right?


Bob


--
http://www.qrz.com/db/w2bod
Box10 Fedora-20/64bit Linux

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Bob Goodwin - Zuni, Virginia, USA


On 12/21/2013 05:21 PM, Roger Heflin wrote:

it just wnats /dev/fedora_box1000/root or /dev/fedora_box1000/home the
lv_ is not in the name of the lv.

Eureka! That's the name I needed.

[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/home /dev/sdb4
  Extending logical volume home to 554.43 GiB
  Logical volume home successfully resized

Thank you Roger

--
http://www.qrz.com/db/w2bod
Box10 Fedora-20/64bit Linux

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Bob Goodwin - Zuni, Virginia, USA


On 12/21/2013 05:18 PM, Chris Murphy wrote:

You did not use pvcreate on sdb4 before using vgextend.

Chris Murphy

After using fdisk to change the type to LVM I ran:

pvcreate /dev/sdb4

Did that yesterday.


--
http://www.qrz.com/db/w2bod
Box10 Fedora-20/64bit Linux

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Roger Heflin
it just wnats /dev/fedora_box1000/root or /dev/fedora_box1000/home the
lv_ is not in the name of the lv.

On Sat, Dec 21, 2013 at 4:13 PM, Bob Goodwin - Zuni, Virginia, USA
 wrote:
>
> On 12/21/2013 04:26 PM, Chris Murphy wrote:
>>
>> On Dec 21, 2013, at 2:11 PM, Roger Heflin  wrote:
>>
>>> you will need a vgextend first something like "vgextend fedora_box1000
>>> /dev/sdb4" that will add the disk to the vg.
>>
>> pvcreate first, then vgextend to add.
>>
>>
>>> /dev/mapper/fedora_box1000-home   17G  7.2G  8.1G  47% /home
>>
>> Oops, you're right, there it is.
>
> I did that earlier today:
>
> [root@box10 bobg]# vgextend fedora_box1000  /dev/sdb4
>   Physical volume '/dev/sdb4' is already in volume group 'fedora_box1000'
>   Unable to add physical volume '/dev/sdb4' to volume group 'fedora_box1000'
>>
>>
>>> so either /dev/fedora_box1000/home or /dev/fedora_box1000/root will
>>> need to be extended, you can also use the names shown in the df
>>> commands…
>
> [root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/lv_root
> /dev/sdb4
>   Logical volume lv_root not found in volume group fedora_box1000
>
> Not sure what it wants here, it did not accept anything I have tried.
>
>> And then lvresize for one or both of those to get the size he wants them.
>> And then resize2fs to resize the file systems.
>>
>> But I think he didn't want a new /home on /dev/sdb, I think he wanted the
>> /home he had on /dev/sda but I could be mistaken. I'm not clear on the exact
>> final layout the OP wants.
>
> I want to continue using the /home on /dev/sdb. All I want is to include all
> of the remaining space as part of /home. The other home is on .dev/sda and
> is part of an Fedora-19 system. Don't want that. It had tried to preserve
> /home from F-20 beta but I believe I've deleted that, don't want it..
>>
>>
>> Chris Murphy
>>
>
> --
> http://www.qrz.com/db/w2bod
> Box10 Fedora-20/64bit Linux
>
> --
> users mailing list
> users@lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
> Have a question? Ask away: http://ask.fedoraproject.org
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Chris Murphy
You did not use pvcreate on sdb4 before using vgextend.

Chris Murphy
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Bob Goodwin - Zuni, Virginia, USA


On 12/21/2013 04:26 PM, Chris Murphy wrote:

On Dec 21, 2013, at 2:11 PM, Roger Heflin  wrote:


you will need a vgextend first something like "vgextend fedora_box1000
/dev/sdb4" that will add the disk to the vg.

pvcreate first, then vgextend to add.



/dev/mapper/fedora_box1000-home   17G  7.2G  8.1G  47% /home

Oops, you're right, there it is.

I did that earlier today:

[root@box10 bobg]# vgextend fedora_box1000  /dev/sdb4
  Physical volume '/dev/sdb4' is already in volume group 'fedora_box1000'
  Unable to add physical volume '/dev/sdb4' to volume group 
'fedora_box1000'



so either /dev/fedora_box1000/home or /dev/fedora_box1000/root will
need to be extended, you can also use the names shown in the df
commands…
[root@box10 bobg]# lvextend -l +100%FREE /dev/fedora_box1000/lv_root 
/dev/sdb4

  Logical volume lv_root not found in volume group fedora_box1000

Not sure what it wants here, it did not accept anything I have tried.


And then lvresize for one or both of those to get the size he wants them. And 
then resize2fs to resize the file systems.

But I think he didn't want a new /home on /dev/sdb, I think he wanted the /home 
he had on /dev/sda but I could be mistaken. I'm not clear on the exact final 
layout the OP wants.
I want to continue using the /home on /dev/sdb. All I want is to include 
all of the remaining space as part of /home. The other home is on 
.dev/sda and is part of an Fedora-19 system. Don't want that. It had 
tried to preserve /home from F-20 beta but I believe I've deleted that, 
don't want it..


Chris Murphy



--
http://www.qrz.com/db/w2bod
Box10 Fedora-20/64bit Linux

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Chris Murphy

On Dec 21, 2013, at 1:05 PM, "Bob Goodwin - Zuni, Virginia, USA" 
 wrote:

> 
> On 12/21/2013 02:51 PM, Chris Murphy wrote:
>> Based on the /dev/sdb layout it seems you used custom/manual partitioning in 
>> the installer, and created all of these mount points manually, is that 
>> correct? If so why not use Guided partitioning with either partition scheme 
>> set to LVM or Standard Partitioning? It seems you'd have ended up with what 
>> you wanted:
> I may have foolishly checked somewhere that offered to keep /home.

I don't see any evidence of an existing home on /dev/sdb. And it's also not 
mounted in your df report. Can you report the output from the command lvs? Did 
you want to preserve the existing /home on /dev/sda perhaps?

Manual Partitioning does allow you to find a previous installation's /home, and 
you can choose to keep it by setting it as a mount point at /home. And then 
deleting everything else. But that would have gotten you what you wanted. Yet 
you're reporting you don't have the layout you want. So there definitely was a 
miscommunication between user and installer.

It's actually quite a valid point, that the Guided path doesn't have a 
mechanism at all to preserve an existing /home. And yet a separate /home 
partition (or LV) is the default installation layout for Fedora. Considering 
all of the mind boggling esoteric things it can do, I think this is much more 
basic, to help users preserve /home. All it needs to do is merely add it to 
/etc/fstab, and if encrypted to crypttab also. Not rocket science, yet a big 
benefit.

I think an admitted weakness of the new installer interface is that it doesn't 
take existing installations into account as much as assuming new installations.

> 
> When I get around to "fixing" this mess I will eliminate LVM, it's an added 
> layer of complexity that buys me nothing. Ok when it works but ... Fixing 
> means a re-install.

Or really esoteric knowledge. At a minimum you need to made sdb4 a PV, and then 
add the PV to the existing VG, and then either create a new LV or resize an 
existing /home LV if it exists. And then create or resize an ext4 volume, which 
itself is a multistep process. And then possibly modify fstab to account for 
the new LV /home if it doesn't exist, and further figure out how to copy any 
data from a rootfs /home to the new LV /home.


Chris Murphy

-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-21 Thread Bob Goodwin - Zuni, Virginia, USA


On 12/21/2013 02:51 PM, Chris Murphy wrote:

Based on the /dev/sdb layout it seems you used custom/manual partitioning in 
the installer, and created all of these mount points manually, is that correct? 
If so why not use Guided partitioning with either partition scheme set to LVM 
or Standard Partitioning? It seems you'd have ended up with what you wanted:
I may have foolishly checked somewhere that offered to keep /home but 
other than that the install was plain vanilla from the DVD iso, XFCE 
rather than Gnome, via a usb flash stick.


When I get around to "fixing" this mess I will eliminate LVM, it's an 
added layer of complexity that buys me nothing. Ok when it works but ... 
Fixing means a re-install. I have become quite adept at configuring 
Fedora/XFCE my way as many times as I have done it. So far, counting 
beta, Fedora 20 three times. I even had the alpha version for a short 
time on one box.


--
http://www.qrz.com/db/w2bod
Box10 Fedora-20/64bit Linux

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: Need help with LVM -

2013-12-20 Thread Bob Goodwin - Zuni, Virginia, USA


On 12/20/2013 04:32 PM, David Beveridge wrote:

If I understand you correctly you will need to do something along these lines...
You need to know the names of your volume groups and logical volumes.

use pvscan, vgscan & lvscan to display what you have. eg
root@MythTV:/etc# pvscan
   PV /dev/sdc2   VG vg_tv   lvm2 [1.82 TiB / 59.31 GiB free]
   Total: 1 [1.82 TiB] / in use: 1 [1.82 TiB] / in no VG: 0 [0   ]
root@MythTV:/etc# vgscan
   Reading all physical volumes.  This may take a while...
   Found volume group "vg_tv" using metadata type lvm2
root@MythTV:/etc# lvscan
   ACTIVE'/dev/vg_tv/lv_photo' [292.97 GiB] inherit
   ACTIVE'/dev/vg_tv/lv_music' [195.31 GiB] inherit
   ACTIVE'/dev/vg_tv/lv_video' [1.19 TiB] inherit
   ACTIVE'/dev/vg_tv/lv_backup' [97.66 GiB] inherit


ensure that /dev/sdb5 is partition type LVM

# fdisk /dev/sdb
use p command to display partitions
use t command to change type to 8e

Add the partition to you volume group

# pvcreate /dev/sdb5

Add the new partition to your volume group

# vgextend vg_name /dev/sdb5

Extend the root logical volume

# lvextend -l +100%FREE /dev/vg_name/lv_root /dev/sdb5

Resize the volume to match

# resize2fs /dev/vg_name/lv_root


Thanks for the suggestions, I think I may have enough there to fix 
things, that or destroy the system! :-)


I will give it a go in the morning.

Bob

--
http://www.qrz.com/db/w2bod
Box10 Fedora-20/64bit Linux

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org