[sclug] RAID and/or LVM for ganging together HDDs to expand capacity?
Tom Dawes-Gamble
tmdg at weardale.cl
Thu Oct 18 22:24:16 UTC 2007
On Thu, 2007-10-18 at 21:38 +0100, John Stumbles wrote:
> Been here before :-(
>
> $ df -h ~
> Filesystem Size Used Avail Use% Mounted on
> shuttle:/home.shuttle
> 268G 253G 1.1G 100% /home.shuttle
>
>
> I can spend an hour or 2 freeing up another few gigs but sooner or later
> I'm going to have to buy another drive. I could 'just' get a 500G[1],
> copy everything over from the 300G and swap them, but I also have
> another 300G on another machine I'm using alongside it. Having to run 2
> PCs just to access all my data is pretty daft, as is having to split my
> stuff across two separate filesystems, so I'd like to put the new 500G
> in one of the existing machines and make them appear as one filesystem.
---- snip ----
Well assuming your resigned to buying a new bigger better disk this is
how I would do it.
Add you new 500Gig drive to the system and create one partition for use
with LVM. Create a volume group on that partition and then create one
large logical volume. mkfs the logical volume, Mount it and copy all
your data from /home.shuttle to this new file system. Then do what ever
you need to do to mount the new file system at the mount for
point /home.shuttle.
OK so now you have some free space again.
Once your happy that the new lvm logical volume is working as you want.
repartition your 300Gig drive to one large LVM partition. pvcreate the
partition and add it to the volume group using vgextend. Next extend
the logical volume using lvextend and finally resize2fs to make the
extra space available to the file system.
Once you start running out of space again just buy another disk and add
that in to the Volume group in the same way.
Regards,
Tom.
More information about the Sclug
mailing list