top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to mount an LVM2 volume in Fedora Linux.

0 votes
539 views

Runnning old "Fedora 20-x86_64", and want to install Fedora-Kde-live-25-1-3.

Situation:
$ uname -rov
3.19.8-100.fc20.x86_64 #1 SMP Tue May 12 17:08:50 UTC 2015 GNU/Linux

$ sudo lvmdiskscan
/dev/fedora/root [ 50,00 GiB]
/dev/fedora/swap [ 3,77 GiB]
/dev/sda2 [ 500,00 MiB]
/dev/vg_maq01/lv_swap [ 5,75 GiB]
/dev/sda3 [ 118,75 GiB] LVM physical volume
/dev/vg_maq01/lv_home [ 63,00 GiB]
/dev/vg_maq01/lv_root [ 50,00 GiB]
/dev/fedora/home [ 48,48 GiB]
/dev/sdb2 [ 500,00 MiB]
/dev/sdb3 [ 194,87 GiB]
/dev/sdb4 [ 500,00 MiB]
/dev/sdb5 [ 102,24 GiB] LVM physical volume
6 disks
4 partitions
0 LVM physical volume whole disks
2 LVM physical volumes

The /dev/sda* is a SSD(KINGSTON SV200S3128G) 128GB, with old "Fedora 16-x86_64", and only want to recover some files in /home.

The /dev/sdb* is a Seagate(ST3320613AS) 320GB, running old "Fedora 20-x86_64", with some important file in /home.

$ sudo lvscan
ACTIVE '/dev/fedora/swap' [3,77 GiB] inherit
ACTIVE '/dev/fedora/home' [48,48 GiB] inherit
ACTIVE '/dev/fedora/root' [50,00 GiB] inherit
ACTIVE '/dev/vg_maq01/lv_swap' [5,75 GiB] inherit
ACTIVE '/dev/vg_maq01/lv_home' [63,00 GiB] inherit
ACTIVE '/dev/vg_maq01/lv_root' [50,00 GiB] inherit

$ mount | grep /dev/mapper
/dev/mapper/fedora-root on / type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/fedora-home on /home type ext4
(rw,relatime,seclabel,data=ordered)

Problem:
Want to mount the SSD on "Fedora 20" to recover some files, copying it to /dev/sdb3 space(/dev/sdb3 not used/mounted). After this, I can erase all SSD and install "Fedora 25" on it.

Thanks for help.

posted May 21, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Wouldnt it be /dev/vg_maq01/lv_home that you want to mount to read files out of your home directory?

1 Answer

0 votes

Caveat: I don't use VG or LV, so not familiar with its usage.

Can you look at the /etc/fstab on the drive you want to copy files from? Create some mount points under /mnt in F20, add the lines from the F16 /etc/fstab to the F20 /etc/fstab, mounting under your new mount points. Reboot, and those mount points should be active, allowing you to cp from them. When you are done, just delete the lines in fstab.

e.g. instead of mounting /home of F16 under /home, mount it under /mnt/f16_home in F20, but with the same parameters as it was
mounted with in the /etc/fstab under F16.

answer May 22, 2017 by Majula Joshi
Similar Questions
0 votes

For some reason I have to temporarily deactivate IPv6 interface configuration on a F22 server box.

According to documentation (or at least as I understood) it could be done either by adding

IPV6INIT=no
IPV6_AUTOCONF=no
to /etc/sysconfig/network-scripts/ifcfg-eth0

or

NETWORKING_IPV6=no
IPV6_AUTOCONF=no
to /etc/sysconfig/network

I tried both, executed "nmcli c reload", "systemctl restart NetworkManager", even rebooted the system. No change in network configuration. In ifconfig I have a local link address as well as a global address as advertised by the router and autoconfig based on mac address.

All those options are documented in usr/share/doc/initscripts/sysconfig.txt, so I guess these are still valid options.

Now I am wondering what I may have overlooked or missed?

Any hint appreciated.

+2 votes

I'd like to ensure core files go to a local partition rather than the default location ($HOME), which is network-mounted in my case.

Googling a bit, I found this: https://access.redhat.com/site/solutions/61536

In light of that, a few questions... Does this still apply to abrt in Fedora 19?

That page suggests that when abrt is in use, core files would be generated in the location set by abrt, which defaults to /var/spool/abrt. However, I have abrtd running and I'm definitely getting core files in $HOME. Does abrt just make a copy to put in /var/spool/abrt?

Might my problem be resolved as simply as telling abrt not to make a copy? I'd be fine with just having the core files in /var/spool/abrt. Otherwise, I imagine I'd like them somewhere named /var/users/$USER/dump
(or similar). How do I do that and continue to play nicely with abrt?

0 votes

I was playing with the permissions of

/home
/home/abc

Could someone please tell me the commands to restore the correct permissions to those both directories?

+1 vote

I need a new OS for an old computer, an about 10 years old x86. I upgraded RAM from 500MB to 2GB, though Windows XP reports 1.99 GB.

I would have installed Fedora, but they say the requirements are at least 4GB RAM. Is there any Linux distro similar to Fedora that works for 1.99 GB RAM?

+2 votes

I have /etc/lvm/backup/ and /etc/lvm/archive with wrong volumes. Howe can I clean them?

...