Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Moving a part of /usr to another partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mad_ady
n00b
n00b


Joined: 14 Jul 2004
Posts: 54

PostPosted: Tue Jul 20, 2004 8:26 am    Post subject: Moving a part of /usr to another partition Reply with quote

Hello. I noticed I'm running low on space on my / partition and I would like to move a part of /usr to another partition (vfat).
I know there is the --bind option in mount, so that wouldn't really be a problem, but... should I create a 'virtual' image on my vfat drive and mount it and copy everything I can in it? Or do you suggest a better option?

Also, what do I do to 'mount' it automatically at startup?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Jul 20, 2004 8:49 am    Post subject: Reply with quote

You want to move a Linux partition to a vfat one?
As long as you don't mind keeping all the bits that ensue...

In case that was unclear: you can't.
You need to use Linux partitions to put Linux filesystems on.

As for using a loopback filesystem on vfat: sure you can, but it won't perform worth a damn...

My advice is to resize the vfat thing and make a new reiser partition, like normal people ;-)

Oh just noticed: forget your fantasies of moving part of /usr - that is patently impossible.
It's all or nothing.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
oumpah-pah
Guru
Guru


Joined: 18 Jul 2004
Posts: 575
Location: Lausanne, Switzerland

PostPosted: Tue Jul 20, 2004 8:57 am    Post subject: Reply with quote

The first thing I would like to point out is that vfat is a very poor choice as filesystem. It doesn't support permissions, nor files bigger than 2 Go.
But if you want to add a partition beyond /usr, here's what I'd do. Mount your new partition under /mnt/test for example. Then copy in that directory the entire content of a /usr subdirectory. You can now umount /mnt/test, and mount it in the directory you just copied (say /usr/portage). You can now delete the files that still are on the old partition. To achieve this, simply do
Code:
mount --bind / /mnt/test
rm -rf /mnt/test/usr/portage/*
umount /mnt/test

You don't even need to reboot.
Back to top
View user's profile Send private message
oberyno
Guru
Guru


Joined: 15 Feb 2004
Posts: 467
Location: /bin/zsh

PostPosted: Tue Jul 20, 2004 9:39 am    Post subject: Reply with quote

You also might want to check out the DISTDIR variable in your make.conf, if you happen to keep distfiles. There's a post or two on the forums mentioning that it works on fat.

But I would also recommend you resize the fat partition.
Back to top
View user's profile Send private message
mad_ady
n00b
n00b


Joined: 14 Jul 2004
Posts: 54

PostPosted: Tue Jul 20, 2004 10:05 am    Post subject: Reply with quote

Resizing was my first option, but my linux partitions are at the end of the drive, and my fat32 partitions are at the beginning... And besides, I DON'T WANT TO GO THROUGH INSTALLATION ALL OVER AGAIN! (although it was fun! :) )

For the moment, I'll look into that DISTDIR variable, because my /usr/portage/distfiles directory is about 600Mb big... (so I'd like to get rid of it)
But in the future, if I'm desperate enough, I'll create a loopback file on my vfat partition.... Correct me if I'm wrong, but it's:
Code:

dd if=/dev/zero of=/mnt/disk/linux_loopback.img bs=1k count=1M
mke2fs -j /mnt/disk/linux_loopback.img
mount --bind /mnt/disk/linux_loopback.img /usr/share


Would this create a 1Gb file with ext3 mounted under /usr/share?
How do I mount it automatically in fstab?

Thanks for your suggestions. I wasn't going to copy paste my usr dir to d:... :) Just parts of it...
Back to top
View user's profile Send private message
tawtao
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 116
Location: Baltimore

PostPosted: Tue Jul 20, 2004 10:20 am    Post subject: Reply with quote

mad_ady wrote:
Resizing was my first option, but my linux partitions are at the end of the drive, and my fat32 partitions are at the beginning... And besides, I DON'T WANT TO GO THROUGH INSTALLATION ALL OVER AGAIN! (although it was fun! :) )
...


You don't need too. You can use qtparted to resize the fat32 partition, even NTFS! ... I think the better way to get qtparted is to download SystemRescueCD from http://www.sysresccd.org/. It contains a lot of good tools :)
Back to top
View user's profile Send private message
mad_ady
n00b
n00b


Joined: 14 Jul 2004
Posts: 54

PostPosted: Tue Jul 20, 2004 10:29 am    Post subject: Reply with quote

I've tested System Rescue CD and qtparted in a vmware virtual machine, and it seemed to work ok... But I'm not yet brave enough to let it run havoc through my partitions... Maybe when I'm older! :)
Back to top
View user's profile Send private message
Souperman
Guru
Guru


Joined: 14 Jul 2003
Posts: 449
Location: Cape Town, South Africa

PostPosted: Thu Jul 22, 2004 8:48 am    Post subject: Reply with quote

I tried (qt)parted in the past and it wasn't happy with trying to move or resize my ext2, ext3 or reiser3 partitions. I have since switched everything except / to LVM2.
_________________
moo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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