Ask Your Question
1

[solved] Mounting hard drive through USB plug

asked 2017-10-30 14:04:29 -0600

updated 2017-11-15 06:48:57 -0600

Hello. I plug the sane hard drive of a computer using Fedora 26 (ou 25?) workstation, which doesn't work any more (the computer, not the hard disk), through a USB case, on another Fedora 26 workstation computer. I can see directories, but not the /home one. And I get this:

# vgchange -ay fedora
Multiple VGs found with the same name: skipping fedora
Use –select vg_uuid= in place of the VG name.
I launch
# lvdisplay

(…)

— Logical volume —
LV Path /dev/fedora/home
LV Name home
VG Name fedora
LV UUID 2wTZRj-zHai-651G-GU26-PnbW-TIY6-0SqRMn
LV Write Access read/write
LV Creation host, time nicholas, 2016-02-13 17:10:47 +0100
LV Status NOT available
LV Size 179,39 GiB
Current LE 45924
Segments 1
Allocation inherit
Read ahead sectors auto

(…)

So I try to activate it this way:

# vgchange -ay –select vg_uuid=2wTZRj-zHai-651G-GU26-PnbW-TIY6-0SqRMn

and this command doesn't answer, but lvdisplay still says: « LV Status NOT available » However I create the mount directory:

# mkdir /media/disk_nicholas

but my attempts to mount the volume fail:

# mount /dev/fedora/home /media/disk_nicholas/
mount: /media/disk_nicholas : the special device /dev/fedora/home doesn't exist.

[I translate from French, so the English versions may be slightly different.]

# mount /dev/sda2 /media/disk_nicholas/
mount: /media/disk_nicholas : file system type « LVM2_member » unknown.
# mount UUID=2wTZRj-zHai-651G-GU26-PnbW-TIY6-0SqRMn /media/disk_nicholas/
mount: /media/disk_nicholas/ : UUID=2wTZRj-zHai-651G-GU26-PnbW-TIY6-0SqRMn unfound.
# mount PARTUUID=2wTZRj-zHai-651G-GU26-PnbW-TIY6-0SqRMn /media/disk_nicholas/
mount: /media/disk_nicholas/ : PARTUUID=2wTZRj-zHai-651G-GU26-PnbW-TIY6-0SqRMn unfound.

Any idea? Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2017-10-31 19:21:06 -0600

ssieb gravatar image

You need to rename one of the volume groups. Run vgrename <UUID> fedora_old, then try again.

edit flag offensive delete link more
1

answered 2017-11-15 06:39:59 -0600

updated 2017-11-15 06:44:14 -0600

Thank you Samuel. Before doing what you suggested, I had to find the VG (volume group) UUID, not the LV (logical volume) UUID, of the concerned hard distk, with the command vgdisplay :

# vgdisplay
  --- Volume group ---
  VG Name               fedora
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232,39 GiB
  PE Size               4,00 MiB
  Total PE              59493
  Alloc PE / Size       59492 / 232,39 GiB
  Free  PE / Size       1 / 4,00 MiB
  VG UUID               MRCxNj-p1if-qR1M-HJkI-aKQV-7PW2-BecnKu

--- Volume group ---
  VG Name               fedora
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               27,92 G
  PE Size               4,00 MiB
  Total PE              7148
  Alloc PE / Size       7148 / 27,92 GiB
  Free  PE / Size       0 / 0   
  VG UUID               3MH34B-qkzS-RFTM-4GYw-5aaX-kv1v-1O8aFw

the first one is the old one : I recognized it by its size. Then, as Samuel suggested, I renamed the volume group:

# vgrename MRCxNj-p1if-qR1M-HJkI-aKQV-7PW2-BecnKu old-fedora

Then I activated the renamed volume group:

# vgchange -ay old-fedora
  3 logical volume(s) in volume group "old-fedora" now active

I noticed that the logical volume path changed:

# lvdisplay

(…)

--- Logical volume ---
  LV Path                /dev/old-fedora/home
  LV Name                home
  VG Name                old-fedora
  LV UUID                2wTZRj-zHai-651G-GU26-PnbW-TIY6-0SqRMn

(…)

And I used this path to mount the file system to the adress /media/disk_nicholas/ :

# mount /dev/old-fedora/home /media/disk_nicholas/
edit flag offensive delete link more

Comments

This is a really helpful addition! You can also recognize the old and currently unused volume group by the zero in the line Open LV 0.

astfgl gravatar imageastfgl ( 2018-12-23 14:36:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-10-30 14:04:29 -0600

Seen: 456 times

Last updated: Nov 15 '17