2009/5/15 Daniel Bush <[email protected]>

>
>
> 2009/5/15 <[email protected]>
>
>> Quoting Daniel Bush <[email protected]>:
>>
>> > 2009/5/15 <[email protected]>
>>
>> > > - LVM is really cool and well worth the time to rad up on it.   I
>> > > am now going to LVM my home system.
>> > >
>> > >
>> > I'm planning to do this as well.
>> > I was thinking back to Mary's backup post last year and thinking if I
>> > could do lvm snapshots with an external harddrive.  Still a bit new to
>> lvm
>> > though.
>> > I think you have to install the alternate ubuntu cd to get lvm
>> > right?
>> > (unless you are using the server install instead of the desktop).
>>
>
>
>>
>> The distinction between desktop and server in ubuntu is an install
>> option not anything else.  To add lvm to your existing system just
>> 'apt-get install lvm2'.
>
>
> Aware of this.  Just weighing up whether to do a clean install so that is
> why I think I have to use alternate instead of desktop.
>
>>
>>
>> To convert an existing setup to lvm you have to have some free space
>> (partitions or whole harddisks to use).
>>
>> First create a volume group (chunk of hardisk spread across one or more
>> harddrives)
>>
>> sudo lvm
>> pvdiskscan
>> pvcreate /dev/yourpartions
>> vgcreate vg1  /dev/part1  /dev/part2
>>
>>
>> create a logical volume somewhere in that volume group  (say 300 gig
>> named yourname in vg1)
>>
>> lvcreate -L300G -n yourname  vg1
>>
>> You can then mksfs.ext3 /dev/vg1/yourname  (replace ext3 with whatever
>> is appropriate) and then mount it.
>>
>
> Since I've got you on this subject and maybe others reading this:
>
> I was working with a test server using vmware esx.  It runs on a virtual
> disk which is just a file.  I decided to resize the file to a larger size
> which created a whole bunch of extra space at the end of the disk.  I made
> this an lvm partition (/dev/sda4) using fdisk and then I did something
> stupid which was to run mke2fs directly on /dev/sda4.
> I then tried to add this as a physical volume to my existing volume group
> and then extend one of the existing logical volumes.
> So far so dumb, right.
>
> So now lvm tells me I've got X gigs and df -h tells me I've got Y gigs (the
> old number).
> I think all I have to do is resize the existing fs on the logical volume
> (/dev/vg1/lv1) .  I'm thinking there won't be any trouble because even
> though /dev/sda4 had some sort of file system added to it (even though it
> was an lvm partition), it never got used.  But not sure if running mke2fs on
> /dev/sda4 has/will bork something.  (This is just a test system)
>
> On a separate issue:
>
> Is it safe to grow a root/bootable ext3 partition or do I have to unmount
> it - the resize2fs man page doesn't say anything but I read
>

What I meant to say was "grow the root ext3 fs which is on the bootable
first partition .... ".

somewhere that I had to unmount and use a rescue disk (maybe this was just
> for ext2)? And I also assumed I had to remove the journal, resize, check and
> then add the journal.
>



> Is XFS a better solution for server lvm stuff and for growing? -  or maybe
> even JFS ??
>

Found this thread on file systems:
http://linux.derkeiler.com/Mailing-Lists/Debian/2008-01/msg01789.html
Guess I'm sticking with ext3 for the moment.


-- 
Daniel Bush

http://blog.web17.com.au
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to