- Stupid mkdir question
- Posted by Gerhard W. Gruber on June 26th, 2003
On Wed, 25 Jun 2003 17:35:28 -0500 wrote Jak Ecksteen <nededlander@dooby.nl>
in comp.os.linux.misc with <nq8kfvk5u6h2i1ddpkjtqne2eckmh5ojsl@4ax.com>
You can always mount it there.
Just create /new and then mount /dev/hda5 (or whatever partition you want) on
/new. No problem there.
--
Gerhard Gruber
Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)
- Posted by Neal P. Murphy on June 26th, 2003
Gerhard W. Gruber passionately intoned:
Hmmm. This *is* a good point. On your large partition, you can:
- create a file that is plenty large enough to hold all the data in the
tree you want to move (dd if=/dev/zero of=/new_tree/new_fs bs=1024K \
count=500)
- make a filesystem in it
- mount it on /mnt using the loopback device
- cd to the original dir (cd /orig_dir)
- 'find . -depth -print|cpio -pdv /mnt'
- umount /mnt
- 'cd ..; mv /orig_dir /orig-dir-'
- 'mkdir /orig_dir; chmod 555 /orig_dir'
- 'mount /new_tree/new_fs /orig_dir -o loop,rw'
Your directory has now been moved to a larger home. Once you have verified
that everything works, 'rm -rf /orig_dir-' to free up the original space.
Again, heed the standard warnings and disclaimers about moving a directory
that is needed during the boot process. Also, performance is not guaranteed
to be as speedy as if the new FS was on a block device.
Fest3er
- Stupid question. Please, only stupid responders. If you're not sureif you're stupid, you probably aren't. (Computers & Technology) by Rôgêr
- Re: Stupid Americans! -- Stupid... Stupid... STUPID!!! _____________ nakqox - us-elections.jpg (0/1) (Modems) by Bob
- Re: Stupid Americans! -- Stupid... Stupid... STUPID!!! _____________ nakqox - us-elections.jpg (0/1) (Modems) by Bob
- amazingly stupid situation leads to stupid question... (Home and office) by jaida
- Stupid mkdir question (Linux / Variants) by David Dorward

