Re: [Hampshire] Strange overflow messages when backing up

Top Page

Reply to this message
Author: Vic
Date:  
To: hampshire
Subject: Re: [Hampshire] Strange overflow messages when backing up
>> I see you are using LVM so I do wonder why you didn't use /dev/sda
>> as an LVM physical volume, extend the volume group into it and get
>> your /home as a logical volume then.
>
> Because I didn't know how to??


The three-line version:

- Turn your disks (or partitions) into LVM-capable Physical Volumes (PVs)
with pvcreate
- Group your PVs into Volume Groups (VGs) with vgcreate
- Slice off a logical volume (LV) for your filesystem with lvcreate

The man pages for those three commands are pretty good, but ask here if
anything's unclear :-)

> The SATA disk arrangement had been set up
> for me as part of a previous install, and I just went on using it.


It's not terminal, but I would always partition the disk before using it.
Makes swapping to new drives a bit simpler...

> The
> SATA card I have seems to have the possibility of a RAID, but again, I
> don't know how to use it.


My recommendation would be not to bother - the Linux software RAID is
quick enough that you probably won't notice the processing overhead, and
gives you the added bonus that you won't be dependent on any particular
hardware vendor for your RAID.

> Neither I nor the chaps helping me knew how to set up a RAID and we
> couldn't get on-line, so we (he/they) didn't set one up. :-(


mdadm is your friend :-)

One of the neatest tricks I've found is to build an array (e.g. a RAID-1
mirror) using the word "missing" when describing one of the component
partitions. This allows you to build a degraded array (e.g. a RAID-1 with
one active drive, one considered failed & removed). You can now move your
data from the non-RAID drive to the RAID array, check it's all there, then
trash your original partition & add it to the RAID array. The drive light
goes mad for some minutes, and you're left with a fully-functioning
RAID-1.

> I thought that that way by the time I
> needed more space for / I might know how to use LVM to shrink the home
> partition that Etch had insisted on setting up, and use the space for
> something else.


Check there really isn't anything there you want, then unmount it. Use
lvremove to get rid of the volume.

The space freed up will be returned to the VG. You can now reallocate it
with more lvcreate calls (for new volumes), or you can resize existing
volumes with lvresize. Be sure to use the "+" on the size parameter if you
just want to add some space to a volume, and remember to resize the
filesystem (using ext2online or somesuch) afterwards (or you won't be able
to use the new space on the voume!).

> The sort of arrangement you mention is exactly what I would have liked to
> set up. Ascribe the present pig's ear to ignorance. :-(


Lisi, have you got a test box? I always find these tasks most daunting the
first time you try them; having something you really don't care about is a
good way to build confidence before you start playing with your valuable
data :-)

Vic.