Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[mini-howto] Resizing root partition when using XFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
merror
n00b
n00b


Joined: 09 Apr 2003
Posts: 34
Location: switzerland

PostPosted: Tue Nov 02, 2004 1:13 am    Post subject: [mini-howto] Resizing root partition when using XFS Reply with quote

Hi

i just had to resize my root partition. Actually i wanted to make it smaller and i also wanted to make a separate partition for my /home directory. thats what i did:

1. boot knoppix

2. parted (at least qtparted) does not work for XFS, so i just copied the entrie"/" to the second harddisk
Code:


su
mkdir /mnt/originalroot
mkdir /temproot

mount /dev/hda3 /mnt/originalroot
mount /dev/hdb1 /mnt/temproot

cp -a -v /mnt/originalroot/* /mnt/temproot/

umount /mnt/originalroot

fdisk /dev/hda


3. Set your new partition layout. Don't change /dev/hda1 (=boot -partition) or you'll be f*cked .... :evil:

4. Then i had to reboot knoppix because it somehow complained
about the new partitions. Not sure if this is really necessary tough..

5. After rebooting i created the filesystem and copied all my stuff back.

Code:

su
mkfs.xfs /dev/hda3
#/dev/hda4 = extended
mkfs.xfs /dev/hda5
mkfs.xfs /dev/hda6

mkdir /mnt/copyfrom
mkdir /mnt/copyto
mount /dev/hda3 /mnt/copyto
mkdir /mnt/copyto/home
mount /dev/hda5 /mnt/copyto/home

cp -a -v /mnt/copyfrom/home/* /mnt/copyto/home/

rm -rf /mnt/copyfrom/home
cp -a -v /mnt/copyfrom/* /mnt/copyto/

vi /etc/fstab


6. Adapt /etc/fstab to your new Partition layout. Then shutdown, remove Knoppix CD and pray ;) After the first reboot it complained with "can't read superblock" when trying to mount the new home 8O

but a xfs_repair did the job for me perfectly. After that i could mount everything and it worked just like its supposed to 8O

Code:

xfs_repair /dev/hda5
xfs_repair /dev/hda6


hope this helps someone, at least i am very happy the everything worked for me 8)

merror
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 18084

PostPosted: Tue Nov 02, 2004 5:00 am    Post subject: Reply with quote

Moved from Other Things Gentoo.
_________________
Those who know what's best for us must rise and save us from ourselves.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum