LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2013, 03:36 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908
Blog Entries: 26

Rep: Reputation: 49
acessing lvm2 partition in ubuntu as normal user


Hi ,
I had RHEL 6 installed on my hard disk. boot partition was sda5 while / was sda6 (lvm2 type).
Now I run ubuntu 12.04
Code:
lxuser@lxuser-Pegatron:~$ cat /etc/debian_version 
wheezy/sid
lxuser@lxuser-Pegatron:~$ lsb_release  -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.2 LTS
Release:	12.04
Codename:	precise
lxuser@lxuser-Pegatron:~$ uname -a
Linux lxuser-Pegatron 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:15:33 UTC 2013 i686 i686 i386 GNU/Linux
I read http://quonn.wordpress.com/2010/12/0...ion-on-ubuntu/
I did follwing
Code:
root@lxuser-Pegatron:~# pvscan
  PV /dev/sda6   VG VolGroup00   lvm2 [221.50 GiB / 0    free]
  Total: 1 [221.50 GiB] / in use: 1 [221.50 GiB] / in no VG: 0 [0   ]
root@lxuser-Pegatron:~# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "VolGroup00" using metadata type lvm2
root@lxuser-Pegatron:~# vgchange -a y
  2 logical volume(s) in volume group "VolGroup00" now active
root@lxuser-Pegatron:~# lvscan
  ACTIVE            '/dev/VolGroup00/LogVol00' [215.72 GiB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol01' [5.78 GiB] inherit
root@lxuser-Pegatron:~# mkdir /vol1 /vol0
root@lxuser-Pegatron:~# mount /dev/VolGroup00/LogVol00 /vol0
root@lxuser-Pegatron:~# mount /dev/VolGroup00/LogVol01 /vol1
/dev/mapper/VolGroup00-LogVol01 looks like swapspace - not mounted
mount: you must specify the filesystem type
root@lxuser-Pegatron:~# df
Filesystem                      1K-blocks     Used Available Use% Mounted on
/dev/sda3                       151192780  3710896 139801732   3% /
udev                              2037016        4   2037012   1% /dev
tmpfs                              817968      856    817112   1% /run
none                                 5120        0      5120   0% /run/lock
none                              2044916      320   2044596   1% /run/shm
/dev/sda5                          101086    12835     83032  14% /media/_boot
/dev/mapper/VolGroup00-LogVol00 219113100 91972672 115830556  45% /vol0
Only , the problem is I cannot access some folders of vol0 as normal user.
example
Code:
lxuser@lxuser-Pegatron:~$ ls -al /vol0/home/rajesh/
ls: cannot open directory /vol0/home/rajesh/: Permission denied

Last edited by sumeet inani; 07-01-2013 at 03:39 AM.
 
Old 07-01-2013, 07:04 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try
Code:
ls -l /
which will show you the ownerships/perms.
 
Old 07-01-2013, 11:26 PM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
Code:
$ ls -al /vol0/home/
total 36
drwxr-xr-x.  3 root root  4096 Feb 22  2011 .
drwxr-xr-x. 25 root root  4096 Jun 28 14:42 ..
drwx------  59  500  500 20480 Jun 27 22:46 rajesh
Is there a way I can mount this partition such that it is accessible to everyone ?
 
Old 07-02-2013, 01:01 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I don't know where you got the LVM from, but that shows that the original owner & group no longer exist, hence it showing a numeric uid/gid instead of matching user/group.
You can use chown to change those values, but think about who you want the new user/grp to be.
 
Old 07-02-2013, 01:58 AM   #5
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
that lvm is the root partition of RHEL (installed previously) . Its /boot was sda5.
If I change the ownership using 'chown -R lxuser:lxuser /vol0/home/rajesh'
i fear that while booting RHEL , I will get problem .
 
Old 07-02-2013, 02:12 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You've only shown the content of /vol0/home, not content of / as asked, which would show show ownership/perms of the volume /vol0.
All that above shows is that 'rajesh' had a home dir under the uid/gid of 500/500, but those uid/gid entries no longer exist in /etc/passwd, /etc/shadow, /etc/group.
 
Old 07-02-2013, 03:11 AM   #7
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
as you have told

Here it goes
Code:
$ ls -l /
total 116
drwxr-xr-x    2 root root  4096 Jun 28 04:55 bin
drwxr-xr-x    3 root root  4096 Jun 28 16:53 boot
drwxr-xr-x    2 root root  4096 Jun 28 04:47 cdrom
drwxr-xr-x   16 root root  4340 Jul  1 17:18 dev
drwxr-xr-x  131 root root 12288 Jul  2 11:23 etc
drwxr-xr-x    3 root root  4096 Jun 28 04:47 home
lrwxrwxrwx    1 root root    32 Jun 28 04:54 initrd.img -> boot/initrd.img-3.5.0-23-generic
lrwxrwxrwx    1 root root    33 Jun 28 04:43 initrd.img.old -> /boot/initrd.img-3.5.0-23-generic
drwxr-xr-x   21 root root  4096 Jun 28 04:55 lib
drwx------    2 root root 16384 Jun 28 04:40 lost+found
drwxr-xr-x    3 root root  4096 Jul  2 11:23 media
drwxr-xr-x    3 root root  4096 Jun 28 16:56 mnt
drwxr-xr-x    2 root root  4096 Feb 14 03:37 opt
dr-xr-xr-x  200 root root     0 Jun 28 21:43 proc
drwxr-xr-x    2 root root  4096 Jun 28 05:09 rhboot
drwx------    6 root root  4096 Jun 28 17:01 root
drwxr-xr-x   20 root root   740 Jul  1 14:28 run
drwxr-xr-x    2 root root 12288 Jun 28 16:52 sbin
drwxr-xr-x    2 root root  4096 Mar  5  2012 selinux
drwxr-xr-x    2 root root  4096 Feb 14 03:37 srv
dr-xr-xr-x   13 root root     0 Jun 28 21:43 sys
drwxrwxrwt   12 root root  4096 Jul  2 13:17 tmp
drwxr-xr-x    2 root root  4096 Jun 28 04:43 ubiquity-apt-clone
drwxr-xr-x   10 root root  4096 Feb 14 03:37 usr
drwxr-xr-x   13 root root  4096 Jun 28 15:34 var
lrwxrwxrwx    1 root root    29 Jun 28 04:54 vmlinuz -> boot/vmlinuz-3.5.0-23-generic
drwxr-xr-x.  25 root root  4096 Jun 28 14:42 vol0
drwxr-xr-x    2 root root  4096 Jul  1 13:59 vol1
 
Old 07-05-2013, 12:18 AM   #8
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
need reply

can somebody tell me way to mount lvm partition accessible to all users ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't access ntfs partition as normal user rezzie Linux - Newbie 6 11-26-2005 08:09 AM
New reiser partition. How can normal user write on it? pepeq Linux - Hardware 5 12-09-2004 06:20 PM
Access my windows partition as a normal user necbrownie Slackware 5 10-13-2004 04:22 PM
can't read window partition as normal user ngan_yine Slackware 1 09-27-2004 02:06 PM
An NTFS partition not accessible to the normal user fiod Linux - General 2 09-28-2003 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration