Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] Adding Disk Space
  • From: Joseph Loo <jloo@xxxxxxx>
  • Date: Fri, 14 Apr 2006 21:46:48 -0700
  • Message-id: <44407AB8.6000202@xxxxxxx>
Donald D Henson wrote:
On Fri, 2006-04-14 at 10:36 +0200, Per Jessen wrote:
Donald D Henson wrote:

(SuSE Linux 10.0)

I need to add some disk space to my /public folder. I am currently
running a single partition on a single 125 GB disk drive. My
intentions are to mount the new drive to a temporary folder, /pubnew
for example, copy everything from /public to /pubnew, delete the files
in /public, and then rename /pubnew to /public. On the surface, this
sounds okay but it is so simple that it makes me think I have missed
something. Can anybody see a way that this procedure can get me into
serious trouble? I'd appreciate any comments.
Sounds good except for the renaming which is unnecessary - I would
probably recommend using rsync instead of 'cp' - that'll make the copy
process restartable.
mount new partition at /new
rsync -avH /public/* /new
umount /public umount /new
mount new partition at /public.

Now you can do whatever you want with your old partition.

Using rsync is a good idea. Thanks for that suggestion.

Donald D. Henson, Managing Director
West El Paso Information Network
The "Non-Initiation of Force Principle" Rules




If you are adding a new disk, don't you have to change the mount in fstab? I am assuming that you are mounting the old drive to /pub and the new drive to /pubnew. If you do that, I do not believe it will do anything because when you reboot the system, it mount the old drive to pub again and the new drive to pubnew.

You can go under root, umount both drives, change the fstab, and remount the drives. That should fix it.

I generally do not do this, rather I use the automount feature. It is best illustrated when fr home directories. If I have a home directory where I want to move to a new location, I do the following:
1. copy the file to the new location
2. change the automount location
3. umount the mount point
4. restart automount
Then the directory has been changed done. In many cases, since I have automount on, the directories are not mounted until it is needed. thus it makes some of the changes even easier.

--
Joseph Loo
jloo@xxxxxxx


< Previous Next >