Re: [CentOS] Retrieving files from dd backup

2020-11-26 Thread Ralf Prengel
Simple question
did you try a centos live cd with a all tools to open the system?
Perhaps the easiest way when not trained every day restoring files.
Ralf

Von meinem iPad gesendet

> Am 26.11.2020 um 20:11 schrieb H :
> 
> Running CentOS 7 I have a previously combined backup of a disk with three 
> partitions using dd. I now need to restore one single file from this backup 
> and after perusing the internet, specifically 
> https://unix.stackexchange.com/questions/31669/is-it-possible-to-mount-a-gzip-compressed-dd-image-on-the-fly,
>  I have done the following:
> 
> - installed squashfs-tools
> 
> - installed kpartx
> 
> - made a squash image of the dd backup and mounted it
> 
> - used kpartx to create devices for the three partitions under 
> /dev/mapper/loopNpP
> 
> - I can now mount the first partition, which is the EFI partition, and access 
> it
> 
> - the second partition, the boot partition, fails to mount since it has the 
> same UUID as the disk I am using in the computer, and of which it is an 
> earlier dd backup. Since I am not interested in the boot partition - at least 
> not right now - I moved on.
> 
> - I am, however, interested in the third partition which is LUKS encrypted. 
> Running 'cryptsetup luksOpen /dev/sda3 my_encrypted_volume' I can decrypt it 
> with the password
> 
> - trying to mount the decrypted version with 'mount 
> /dev/mapper/my_encrypted_volume /media/my_device' results in a failure 
> message 'mount: unknown filesystem type 'LVM2_member'
> 
> - another website, 
> https://askubuntu.com/questions/766048/mount-unknown-filesystem-type-lvm2-member,
>  suggests I could run vgdisplay to get the UUID and then rename it using 
> vgrename
> 
> But, vgdisplay shows only one vg and I am afraid to rename the VG UUID shown 
> by vgdisplay since it might refer to the VG currently in use...
> 
> Does anyone have any insight or suggestions into the above and how to proceed 
> while being absolutely certain I will not be messing up the running part of 
> the system?
> 
> Thanks!
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Retrieving files from dd backup

2020-11-26 Thread H
On 11/26/2020 05:27 PM, Leon Fauster via CentOS wrote:
> Am 26.11.20 um 20:10 schrieb H:
>> Running CentOS 7 I have a previously combined backup of a disk with three 
>> partitions using dd. I now need to restore one single file from this backup 
>> and after perusing the internet, specifically 
>> https://unix.stackexchange.com/questions/31669/is-it-possible-to-mount-a-gzip-compressed-dd-image-on-the-fly,
>>  I have done the following:
>>
>> - installed squashfs-tools
>>
>> - installed kpartx
>>
>> - made a squash image of the dd backup and mounted it
>>
>> - used kpartx to create devices for the three partitions under 
>> /dev/mapper/loopNpP
>>
>> - I can now mount the first partition, which is the EFI partition, and 
>> access it
>>
>> - the second partition, the boot partition, fails to mount since it has the 
>> same UUID as the disk I am using in the computer, and of which it is an 
>> earlier dd backup. Since I am not interested in the boot partition - at 
>> least not right now - I moved on.
>>
>> - I am, however, interested in the third partition which is LUKS encrypted. 
>> Running 'cryptsetup luksOpen /dev/sda3 my_encrypted_volume' I can decrypt it 
>> with the password
>>
>> - trying to mount the decrypted version with 'mount 
>> /dev/mapper/my_encrypted_volume /media/my_device' results in a failure 
>> message 'mount: unknown filesystem type 'LVM2_member'
>>
>> - another website, 
>> https://askubuntu.com/questions/766048/mount-unknown-filesystem-type-lvm2-member,
>>  suggests I could run vgdisplay to get the UUID and then rename it using 
>> vgrename
>>
>> But, vgdisplay shows only one vg and I am afraid to rename the VG UUID shown 
>> by vgdisplay since it might refer to the VG currently in use...
>>
>> Does anyone have any insight or suggestions into the above and how to 
>> proceed while being absolutely certain I will not be messing up the running 
>> part of the system?
>>
>
> IIRC: Activate the LVM via: vgchange -a y
>
> and mount the logical volume (LV).
>
> LV can be listed with lvs. The device nodes are under /dev/mapper ...
>
> -- 
> Leon
>
>
>
>
>
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos

OK, I am looking at 
https://www.cyberciti.biz/faq/linux-mount-an-lvm-volume-partition-command/. A 
couple of follow-up questions:

- Would activating the LVM with 'vgchange -a y' make any changes, or create any 
potential issues, with the system already running?

- How do I know that the output from 'vgdisplay' refers to this 'new' VG and 
not VGs on the running system?

- To mount the VG, I would have to run:

-- 'vgscan'

-- make directory for mounting

-- 'mount...' to mount the VG

Is that correct? And it would not create any issues with the running system?

Thank you in advance.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Retrieving files from dd backup

2020-11-26 Thread Leon Fauster via CentOS

Am 26.11.20 um 20:10 schrieb H:

Running CentOS 7 I have a previously combined backup of a disk with three 
partitions using dd. I now need to restore one single file from this backup and 
after perusing the internet, specifically 
https://unix.stackexchange.com/questions/31669/is-it-possible-to-mount-a-gzip-compressed-dd-image-on-the-fly,
 I have done the following:

- installed squashfs-tools

- installed kpartx

- made a squash image of the dd backup and mounted it

- used kpartx to create devices for the three partitions under 
/dev/mapper/loopNpP

- I can now mount the first partition, which is the EFI partition, and access it

- the second partition, the boot partition, fails to mount since it has the 
same UUID as the disk I am using in the computer, and of which it is an earlier 
dd backup. Since I am not interested in the boot partition - at least not right 
now - I moved on.

- I am, however, interested in the third partition which is LUKS encrypted. 
Running 'cryptsetup luksOpen /dev/sda3 my_encrypted_volume' I can decrypt it 
with the password

- trying to mount the decrypted version with 'mount 
/dev/mapper/my_encrypted_volume /media/my_device' results in a failure message 
'mount: unknown filesystem type 'LVM2_member'

- another website, 
https://askubuntu.com/questions/766048/mount-unknown-filesystem-type-lvm2-member,
 suggests I could run vgdisplay to get the UUID and then rename it using 
vgrename

But, vgdisplay shows only one vg and I am afraid to rename the VG UUID shown by 
vgdisplay since it might refer to the VG currently in use...

Does anyone have any insight or suggestions into the above and how to proceed 
while being absolutely certain I will not be messing up the running part of the 
system?



IIRC: Activate the LVM via: vgchange -a y

and mount the logical volume (LV).

LV can be listed with lvs. The device nodes are under /dev/mapper ...

--
Leon





___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Retrieving files from dd backup

2020-11-26 Thread H
Running CentOS 7 I have a previously combined backup of a disk with three 
partitions using dd. I now need to restore one single file from this backup and 
after perusing the internet, specifically 
https://unix.stackexchange.com/questions/31669/is-it-possible-to-mount-a-gzip-compressed-dd-image-on-the-fly,
 I have done the following:

- installed squashfs-tools

- installed kpartx

- made a squash image of the dd backup and mounted it

- used kpartx to create devices for the three partitions under 
/dev/mapper/loopNpP

- I can now mount the first partition, which is the EFI partition, and access it

- the second partition, the boot partition, fails to mount since it has the 
same UUID as the disk I am using in the computer, and of which it is an earlier 
dd backup. Since I am not interested in the boot partition - at least not right 
now - I moved on.

- I am, however, interested in the third partition which is LUKS encrypted. 
Running 'cryptsetup luksOpen /dev/sda3 my_encrypted_volume' I can decrypt it 
with the password

- trying to mount the decrypted version with 'mount 
/dev/mapper/my_encrypted_volume /media/my_device' results in a failure message 
'mount: unknown filesystem type 'LVM2_member'

- another website, 
https://askubuntu.com/questions/766048/mount-unknown-filesystem-type-lvm2-member,
 suggests I could run vgdisplay to get the UUID and then rename it using 
vgrename

But, vgdisplay shows only one vg and I am afraid to rename the VG UUID shown by 
vgdisplay since it might refer to the VG currently in use...

Does anyone have any insight or suggestions into the above and how to proceed 
while being absolutely certain I will not be messing up the running part of the 
system?

Thanks!

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] dnf via ansible fails if baseurl is used on CentOS 8

2020-11-26 Thread Thomas Eriksson
>
>
> I ran into an odd issue on CentOS 8, anyone seen this?
>
>
> When repos are configured to use baseurl instead of mirrorlist, the
> ansible dnf module fails.
>
> It is as if it is ignoring the baseurl configuration.
>
>
> #mirrorlist=http://mirrorlist.centos.org/?release=$releasever=$basearch=BaseOS=$infra
> baseurl=http://my.local.repo.server/$contentdir/$releasever/BaseOS/$basearch/os/

Are you using a proxy somehow? Do you have proxy environment variables set
in your shell environment which may not exist in the ansible environment?


Thanks for the suggestion!

In the end it turned out the ansible version (2.7.7) on the that machine I run 
ansible from is not handling dnf commands correctly.
Once ansible was updated to 2.9.15 on the ansible master, it works fine.

/Thomas

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] dnf via ansible fails if baseurl is used on CentOS 8

2020-11-26 Thread Simon Matter
> Hi,
>
>
> I ran into an odd issue on CentOS 8, anyone seen this?
>
>
> When repos are configured to use baseurl instead of mirrorlist, the
> ansible dnf module fails.
>
> It is as if it is ignoring the baseurl configuration.
>
>
> #mirrorlist=http://mirrorlist.centos.org/?release=$releasever=$basearch=BaseOS=$infra
> baseurl=http://my.local.repo.server/$contentdir/$releasever/BaseOS/$basearch/os/

Are you using a proxy somehow? Do you have proxy environment variables set
in your shell environment which may not exist in the ansible environment?

Regards,
Simon

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] dnf via ansible fails if baseurl is used on CentOS 8

2020-11-26 Thread Thomas Eriksson
Hi,


I ran into an odd issue on CentOS 8, anyone seen this?


When repos are configured to use baseurl instead of mirrorlist, the ansible dnf 
module fails.

It is as if it is ignoring the baseurl configuration.


#mirrorlist=http://mirrorlist.centos.org/?release=$releasever=$basearch=BaseOS=$infra
baseurl=http://my.local.repo.server/$contentdir/$releasever/BaseOS/$basearch/os/


If trying to use the dnf module in ansible, dnf is still trying to find a 
mirror to use and fails.

ansible  test-build-0  -m dnf  -a "name=zsh state=present"
test-build-0 | FAILED! => {
"changed": false,

"msg": "Failed to download metadata for repo 'BaseOS': Cannot download 
repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried",

"rc": 1,
"results": []
}

Using dnf locally from the command line works fine with baseurl


If I re-configure with repos using mirrorlist again, ansible dnf works as 
expected.

Just looking for ideas...


/Thomas
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Replacing SW RAID-1 with SSD RAID-1

2020-11-26 Thread Simon Matter
> On 11/24/20 8:20 AM, Simon Matter wrote:
>
>> Sure, and for large disks I even go further: don't put the whole disk
>> into
>> one RAID device but build multiple segments, like create 6 partitions of
>> same size on each disk and build six RAID1s out of it. So, if there is
>> an
>> issue on one disk in one segment, you don't lose redundancy of the whole
>> big disk. You can even keep spare segments on separate disks to help in
>> case where you can not quickly replace a broken disk. The whole handling
>> is still very easy with LVM on top.
>
> Same setup I've been using for 15 years at least.
> Just have a standard partition size and keep using that (or multiple of
> that,
> e.g. 256GiB, then 512GiB, than 1024MiB), so to keep numbers down.

Thanks for sharing! Interesting to hear that some people did the same or
similar things as I did without knowing from each other.

IIRC initially I started to do this when I got a server with different
disk sizes and different paths to the disks. Think of some 18G disks, some
36G, some 73G and also some 146G. Now, if you have to make the storage
redundant for disk failures and also for single path failures, you get
creative how to cut the larger disks into slices and spread the mirror
pairs over the paths.

It proved to be quite flexible in the end and still allowed the extension
of the storage without any downtime. Needless to say that the expensive
hardware RAID controllers have been removed from the box and replaced by
simple SCSI controllers - because the hardware just couldn't do what was
required here.

Regards,
Simon

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Replacing SW RAID-1 with SSD RAID-1

2020-11-26 Thread Roberto Ragusa

On 11/24/20 8:20 AM, Simon Matter wrote:


Sure, and for large disks I even go further: don't put the whole disk into
one RAID device but build multiple segments, like create 6 partitions of
same size on each disk and build six RAID1s out of it. So, if there is an
issue on one disk in one segment, you don't lose redundancy of the whole
big disk. You can even keep spare segments on separate disks to help in
case where you can not quickly replace a broken disk. The whole handling
is still very easy with LVM on top.


Same setup I've been using for 15 years at least.
Just have a standard partition size and keep using that (or multiple of that,
e.g. 256GiB, then 512GiB, than 1024MiB), so to keep numbers down.

Best regards.

--
   Roberto Ragusamail at robertoragusa.it
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos