FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 05-08-2011, 04:31 PM
Scott Robbins
 
Default How to add a HD to a LVM

On Sun, May 08, 2011 at 09:21:56AM -0700, Todd Cary wrote:
>
> lvm lvremove LogVol01
>
> Using the GUI, I get
>
> Logical volume LogVol01 contains swap filesystem. All data on it
> will be lost! Are you quite certain that you wish to remove
> logical volume LogVol01?


If it's a swap partition, first turn off the swap

swapoff /dev/VGwhaever/LogVol01

Then lvremove.


--
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

Xander: What's going on here? People are going all Felicity with
their hair.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-08-2011, 10:03 PM
Ken Smith
 
Default How to add a HD to a LVM

Todd Cary wrote:
> On 5/8/2011 7:37 AM, Todd Cary wrote:
>
>> On 5/8/2011 12:03 AM, Ken Smith wrote:
>>
>>> Todd Cary wrote:
>>>
>>>> I have connected a HD that was a prior system drive (Centos 4.8)
>>>> and I am not sure of the command line procedures to find out if
>>>> it is recognized (I believe it is since it present in the GUI),
>>>> delete all data on it and finally add it to the LVM.
>>>>
>>>> I would like to use it as a backup data drive.
>>>>
>>>> Todd
>>>>
>>>>
>>>>
>>> This is an excellent tutorial on LVM.
>>>
>>> http://tldp.org/HOWTO/LVM-HOWTO/
>>>
>>> Are you planning to join it to an existing Volume Group and then create
>>> a LV on it for backup? My preference would be to keep things simple and
>>> to aid recovery in the future, maybe just format the disk ext3 for
>>> backup. Then it is easy to plug into another box for recovery. But, I'm
>>> just guessing how you plan to use it.
>>>
>>> Ken
>>>
>>>
>> Ken -
>>
>> Thank you for your response. What you suggested is exactly what
>> I would like to do: have an extra, stand alone, drive for
>> backup. However, when I do
>>
>> fdisk -l
>>
>> I get the output below which has me concerned. As a "Sunday
>> afternoon" user of Centos, I am not 100% sure of my
>> interpretation - that is - the drive is already been joined as
>> part of the LVM even though all I did was to plug it in as a slave.
>>
>> My installation of Centos 5.5 is new and I do not remember
>> specifying LVM (though that is what I had with my 4.8 system).
>> The /dev/hdc (250 GB) is the new system drive. The /dev/hdd is
>> the old Centos 4.8 drive that I would like to have as an
>> independent drive e.g. /dev/hda or whatever it needs to be.
>>
>> What I DO NOT want to happen is for me to accidentally mess up my
>> new Centos 5.5 system :-)!!
>>
>> Questions:
>>
>> * Is it possible to "remove" /dev/hdd from the LVM - at least it
>> appears to be part of it
>> * Once removed, format it as EXT3 and mount it as /dev/hda (or
>> /dev/hdd)
>>
>> For this I am swimming in unknown waters.
>>
>> Todd
>>
>> Disk /dev/hdc: 251.0 GB, 251000193024 bytes
>> 255 heads, 63 sectors/track, 30515 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>
>> Device Boot Start End Blocks Id System
>> /dev/hdc1 * 1 13 104391 83 Linux
>> /dev/hdc2 14 30515 245007315 8e Linux LVM
>>
>> Disk /dev/hdd: 163.9 GB, 163928604672 bytes
>> 255 heads, 63 sectors/track, 19929 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>
>> Device Boot Start End Blocks Id System
>> /dev/hdd1 * 1 13 104391 83 Linux
>> /dev/hdd2 14 19929 159975270 8e Linux LVM
>>
>> Disk /dev/sda: 81.9 GB, 81964302336 bytes
>> 255 heads, 63 sectors/track, 9964 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>
>> Device Boot Start End Blocks Id System
>> /dev/sda1 1 9964 80035798+ 7 HPFS/NTFS
>>
>>
>>
> Whether I use the lvm command line or the GUI, I am not sure if I
> am suppose to remove the logical first as in
>
> lvm lvremove LogVol01
>
> Using the GUI, I get
>
> Logical volume LogVol01 contains swap filesystem. All data on it
> will be lost! Are you quite certain that you wish to remove
> logical volume LogVol01?
>
>

Before you delete any LV's could you please post what the result of the
"mount" command says.

Thanks, Ken



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org