How to resize an XFS mdraid partition?
- From: Roenie <notmy@xxxxxxxxxxxxxxxx>
- Date: Wed, 30 Aug 2006 02:59:33 +0200
Hi,
Here's the details:
During Ubuntu setup I got this nice (well...sort of) graphical
interface to partition my drives. I have two 80GB drives, /dev/hda and
/dev/hdd. From fstab:
/dev/md0 / reiserfs
/dev/md1 /store xfs
/dev/md2 /ftp xfs
/dev/hda1 /boot ext2
/dev/hda2 none swap
/dev/hdd2 none swap
/dev/hdc /media/dvd
/dev/hdb /media/cdrom0
In Ubuntu setup I partitioned each drive like so:
[#] [fstype]
partition 0: /boot ext2
(/dev/hdd probably has this partition too but it isn't used, not sure
if i remember correctly but i think i wanted both drives to be
partitioned the same, but didn't want /boot to be raid, obviously)
partition 1: swap swap
(again, not using raid, linux can use swapspace just fine when it's on
2 different disks)
partition 2: / linux raid
partition 3: /store linux raid
partition 4: /ftp linux raid
So both 80GB drives are partitioned exactly the same. Then, mdraid
combines both drives' linux raid partitions to form /dev/md#.
From /dev/mtab:
/dev/md0 / reiserfs
/dev/hda1 /boot
/dev/md1 /store
/dev/md2 /ftp
Now here's "the big question":
I would like to know how to enlarge /ftp, without losing the data
already on it, if at all possible. If this is not possible I would
still want to know how to do it. I'd just have to find a way to backup
the data.
To make things even more interesting, the extra space needs to come
from /store, which is /dev/md1 which is /dev/hda5 + /dev/hdd5 combined
by the mdraid. But for now let's just assume that there's unused space
after /dev/hda6 and /dev/hdd6 and we use that instead:
The /ftp partition is the one to be enlarged, also know as /dev/md2,
which is created by the mdraid by combining /dev/hda6 and /dev/hdd6.
In this situation, should I fdisk /dev/hda and /dev/hdd to make
/dev/hda6 and /dev/hdd6 bigger, expanding into the unused space? (How
is that done? Changing the number of cylinders through fdisk's expert
mode?)
And after this should I run xfs_growfs to make the fs use the extra
space added to the partition? Would after all this, the existing data
on /ftp still be there and would mdraid automatically use the extra
space and "give it to" /dev/md2?
Assuming this would work (if not, please provide an alternative), as I
said before, there really isn't any unused space after /dev/hda6 and
/dev/hdd6. In fact they are at the end of the disks. I want to make
/dev/hda5 and /dev/hdd5 smaller (/dev/md1 a.k.a. /store), and then add
that space to /dev/hda6 and /dev/hdd6 respectively, to enlarge
/dev/md2, also known as /ftp.
And I don't think this is possible.
Might partition magic help? (I don't have windows on there, but I do
have something that resembles what could be best described as a
Windows live CD).
Thanks a whole heap in advance!
-Roenie
.
- Prev by Date: A new reader? Welcome to alt.os.linux, read this first if you're new here (FAQ)
- Next by Date: Re: adventures in n00bie administration
- Previous by thread: adventures in n00bie administration
- Next by thread: block size more than 4096 in ext2/3
- Index(es):
Relevant Pages
|