Re: repartitioning a non-root ext3 partition
- Thanks, Tzafrir. It was a simple solution that did the work. (Still I
will have to repartition somewhere in the near future...)
Let me know if the following sequence is what you meant:
Sauron:root # cd /
Sauron:/ # mkdir /home/tmp
Sauron:/ # ln -s ../home/tmp /tmp
Sauron:/ # chmod 1777 /home/tmp
For the sake of future knowledge, I found this note in parted's manual
(info parted, ch. "Using parted" Sec. "Running parted"):
Parted will always warn you before doing something that is
potentially dangerous, unless it's something that's obviosuly
dangerous (i.e. rm, mklabel, mkfs) For example, if you attempt to
shrink a partition "too much" (i.e. by more than the free space
available), Parted will automatically resize to the minimum it can
without losing data. If this minimum is significantly different, it
will warn you that it's doing something significanlty different to
what you asked. Since many partitioning systems have complicated
constraints, Parted will usually do something slightly different to
what you asked. (For example, create a partitiong starting at 10.352,
I think it is clear then that 'parted' does NOT harm data on disk on
Anyhow, Admin was right about blaming X. The problem persists even now
that I have 200MB free. But that should be on a different thread. See
you all there ;)
--- In firstname.lastname@example.org, Tzafrir Cohen <tzafrir@t...> wrote:
> On Wed, Apr 30, 2003 at 05:34:13PM -0000, yuvalaviel wrote:
> > Hi,
> > This is a bit urgent, so I'd appreciate any comment.
> > I have basically 3 partitions on a single hard-drive redhat-9 machine:
> > /swap, /home and /
> > Stupidly enough, I didn't make the /tmp partition separate from /, so
> > now the / partition got full and many applications fail to function.
> > To that end, I must repartition the /home (30GB) to /home and /tmp.
> > I'd prefer to do it without harming the data in /home.
> > 1. Is there a way to do it?
> You can also try making /tmp a symlink to ../home/tmp , and create
> /home/tmp (with mode 1777).
> Some gotchas:
> * /tmp has to be avaiable even before /home is mounted. So create
> /home/tmp under /home .
> * The mount operation will make temporary files in the original
> /home/tmp unavaialble . Hopefully there won't be many of those
> * Note that the symlink I mentioned is to ../home/tmp . This is
> /home/tmp , but a relative link. Never make absulute symlinks!
> I'm not sure I like this, but OTOH, it may be better if repartitionning
> is not your solution.
> > 2. Can fdisk do it? (I have a little experience with it)
> > 3. Can `parted' do it? (I have no idea how to use it, I read that it
> > can `resize' a partition)
> Basically: yes. I never tried it myself, though.
> /home should be unmounted to be resized. Later on /
> should be unmounted to be resized . This means that the whole process
> should not be performed from your system. Use a rescue CD, a parted
> floppy, or whatever.
> Tzafrir Cohen +---------------------------+
> http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
> mailto:tzafrir@t... +---------------------------+