Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I just switched my Hard Drives and I would like to copy my data from the old HDD to the new HDD.

I have mounted the old HDD at /mnt, it is a LVM Ubuntu partition. What I would like to do is copy my old user directory which should be located under under /mnt/home/user1. The dir however seems to be protected or unaccessible, I can't remember if I have encrypted the data or not.

In my file manager I get a lock symbol and when I open the dir it is empty! Update: I have opened it with root rights, the lock disapears but the directory stays empty.

Further the username and pwd were the same on the old and the new system if that helps.

Is there a way to access the data on the mounted external LVM drive without switching the HDDs back and copy all data to a third drive first?

sudo fdisk -l
Disk /dev/sdb: 500.1 GB, 500107859968 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773164 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b2653

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      499711      248832   83  Linux
/dev/sdb2          501758   976771071   488134657    5  Extended
/dev/sdb5          501760   976771071   488134656   8e  Linux LVM

Disk /dev/mapper/ubuntu-root: 491.6 GB, 491635343360 bytes
255 heads, 63 sectors/track, 59771 cylinders, total 960225280 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu-root doesn't contain a valid partition table

Disk /dev/mapper/ubuntu-swap_1: 8162 MB, 8162115584 bytes
255 heads, 63 sectors/track, 992 cylinders, total 15941632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu-swap_1 doesn't contain a valid partition table

And mount of the partition as requested:

mount
/dev/mapper/ubuntu-root on /mnt type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
share|improve this question

closed as unclear what you're asking by jasonwryan, Anthon, slm, Chris Down, peterph Jan 6 at 16:11

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

    
What does "seems to be protected or unaccessible mean"? Please post any errors etc. –  jasonwryan Jan 5 at 21:35
    
In my file manager I get a lock symbol and when I open the dir it is empty! –  mahatmanich Jan 5 at 21:38
    
Can you add the output of mount and sudo fdisk -l? –  Braiam Jan 5 at 21:52
    
Also check whether there aren't any errors in the system log (output of dmesg and files /var/log/messages, /var/log/syslog or their appropriate equivalent on your system). –  peterph Jan 6 at 16:11
    
Why is this put on hold? What is not clear about the question? –  mahatmanich Jan 6 at 22:23

1 Answer 1

It's possible the uid of the home directories does not match the uid on the new installation, and if the permissions of the directory are not o+rx, you may not be able to read the directory as a regular user. Try browsing the mounted drive as root.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.