LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 09-05-2012, 06:37 PM   #1
khandu
Member
 
Registered: Sep 2003
Posts: 79

Rep: Reputation: 0
Question Can we rename a volume in RHEL6 on RAID?


Hi

Someone has given us a RAID setup with the following config (RHEL 6.3)

Quote:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_test-lv_root
53G 7.9G 43G 16% /
tmpfs 4.2G 279k 4.2G 1% /dev/shm
/dev/cciss/c0d0p1 508M 63M 420M 13% /boot
/dev/mapper/vg_test-lv_home
83G 661M 78G 1% /home
Now we don't want /home to be 83GB.. instead we want /srv which exists under / at the moment.. the folder /srv is empty at the moment. /home has one user directory and one lost+found directory

Can we simply do

Code:
lvrename /home /srv
or something more is needed??

or do we need to reformat system and setup all over again with proper names??

no data on /srv and any data on /home (just one user directory) can be deleted if needed.

BUT renaming will put all home directory under /srv/<username> right?? We want to keep it as /srv/home/<username>

How to achieve that ?

can someone provide exact steps , that would be great

Cheers

Last edited by khandu; 09-05-2012 at 06:39 PM.
 
Old 09-05-2012, 10:02 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
You're mixing up dirs (aka mount points) (/home, /srv) with lv name lv_home.

you'd need to
0. ensure no usage on that lv
1. un-mount that lv
2. rename it
3. re-mount, but under /srv, not /home.

Try by hand, then edit /etc/fstab if you get what you want.
You'll also have to alter any current user's settings in /etc/passwd and the defaults file /etc/default/useradd
 
  


Reply

Tags
rename lv, rhel 6.3, volume


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
RHEL6 KVM: Add dir based pool volume to guest: CLI HOWTO? chrism01 Linux - Virtualization and Cloud 7 09-10-2012 12:31 AM
LXer: RHEL6 volume encryption using LUKS LXer Syndicated Linux News 0 11-14-2011 10:30 PM
RH: cannot rename logical volume unix1adm Red Hat 7 07-28-2009 11:06 AM
How to rename a logical volume name tom_sawyer70 Linux - Server 2 07-17-2009 02:37 PM
Rename Logical Volume jackpal Linux - Server 2 03-27-2009 08:34 AM


All times are GMT -5. The time now is 11:17 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration