LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Unable to read /data (https://www.linuxquestions.org/questions/ubuntu-63/unable-to-read-data-4175443745/)

satimis 01-01-2013 09:44 PM

Unable to read /data
 
Hi all,

Ubuntu 12.04 desktop 64bit

I have 2 HDs, both with Ubuntu12.04 desktop 64bit running, connected in the same PC.

HD-1 traditional partitoning
HD-2 LVM volume partitioning.

On running the OS on HD-1, HD-2 can't be viewed automatically
On running the OS on HD-2, HD-1 can be viewed automatically.

On running the OS on HD-1, I have to mount HD-2 with LVM volume partitions. Then I can view HD-2. But I can't view the content of /data partition.

# ls -ald /mnt/data
Code:

drwxr-xr-x 2 root root 4096 Dec 28 13:11 /mnt/data
# ls -al /mnt/data
Code:

total 8
drwxr-xr-x  2 root root 4096 Dec 28 13:11 .
drwxr-xr-x 25 root root 4096 Jan  2 10:11 ..

However I can read other folders/directories;
# ls /mnt/
Code:

bin  etc        initrd.img.old  media  root    srv  var
boot  folder      lib            mnt    run      sys  vmlinuz
data  home        lib64          opt    sbin    tmp  vmlinuz.old
dev  initrd.img  lost+found      proc  selinux  usr

I can't resolve why? Pls help. TIA

B.R.
satimis

michaelk 01-02-2013 06:15 AM

Not sure I exactly follow the question and not enough information provided.
Post the partition layout of your drives including the logical volumes.

Please define what is the /data partition. Is /mnt/data on HD-1 or HD-2 etc?
How are you mounting the LVM logical volumes?

If /mnt/data is part of the LVM partition then you need to use the relative path to the mounted logical volume. i.e. /LV_mount_point/mnt/data vs /mnt/data when trying to access information from HD-2 when running HD-1 OS.

satimis 01-02-2013 06:51 AM

Quote:

Originally Posted by michaelk (Post 4861167)
Not sure I exactly follow the question and not enough information provided.
Post the partition layout of your drives including the logical volumes.

Please define what is the /data partition. Is /mnt/data on HD-1 or HD-2 etc?
How are you mounting the LVM logical volumes?

If /mnt/data is part of the LVM partition then you need to use the relative path to the mounted logical volume. i.e. /LV_mount_point/mnt/data vs /mnt/data when trying to access information from HD-2 when running HD-1 OS.

Hi,

Thanks for your advice.

I already solved my problem by performing following steps;
(It is on HD-1, the old HD. The /data partition is on HD-2, new HD)

$ sudo mkdir /media/data
[sudo] password for satimis:

$ sudo -i
# pvs
Code:

  PV        VG      Fmt  Attr PSize  PFree
  /dev/sdb1          lvm2 a-  243.00m 243.00m
  /dev/sdb5  LVM1.5D lvm2 a-    1.36t      0

# lvdisplay /dev/LVM1.5D | grep 'LV Name'
Code:

  LV Name                /dev/LVM1.5D/root
  LV Name                /dev/LVM1.5D/swap
  LV Name                /dev/LVM1.5D/data

# mount /dev/LVM1.5D/data /media/data
# ls /media/data/
Code:

lost+found  OVA  Satimis_Document  VirtualBox  VirtualBox VMs

Previously before posting I made a mistake running;
$ sudo mount /dev/LVM1.5D/data /mnt
No complaint.

$ ls -al /mnt
No printout

Now I found;
# ls /mnt/
Code:

remoteserver
# ls -al /mnt/remoteserver/
Code:

total 8
drwxr-xr-x 2 satimis root 4096 Sep 21  2011 .
drwxr-xr-x 3 root    root 4096 Sep 21  2011 ..

An empty directory. I have no idea what is it?

Regards
satimis


All times are GMT -5. The time now is 03:52 AM.