(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. Donald D. Henson, Managing Director West El Paso Information Network The "Non-Initiation of Force Principle" Rules
On 13/04/06, Donald D Henson
(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.
Donald D. Henson, Managing Director West El Paso Information Network The "Non-Initiation of Force Principle" Rules
I think I would be tempted to at least rename the old '/public' file to /publicold just in case anything wasn't right. I wouldn't delete it for a few days until I was happy the transfer was ok. Over the top maybe but I've seen enough data lost by cavalier usage to be ultra cautious now :-) No doubt others can offer some better suggestions as well. -- ============================================== I am only human, please forgive me if I make a mistake it is not deliberate. ============================================== Xmas may be over but, PLEASE DON'T drink and drive you'll make it to the next one that way. Kevan Farmer Linux user #373362 Cheslyn Hay Staffordshire WS6 7HR
On Thu, 2006-04-13 at 22:08 +0100, Kevanf1 wrote:
On 13/04/06, 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.
Donald D. Henson, Managing Director West El Paso Information Network The "Non-Initiation of Force Principle" Rules
I think I would be tempted to at least rename the old '/public' file to /publicold just in case anything wasn't right. I wouldn't delete it for a few days until I was happy the transfer was ok. Over the top maybe but I've seen enough data lost by cavalier usage to be ultra cautious now :-) Good suggestion. That will also make the changeover faster.
Donald D. Henson, Managing Director West El Paso Information Network The "Non-Initiation of Force Principle" Rules
On Thu, 2006-04-13 at 15:03 -0600, 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.
The last time I did something along those lines, I changed the name if the original directory and then mounted the new disk where the old directory was. I then copied (I'm thinking rsync next time I try this, it depends on if the ownership and permissions come with it,) the old files to the new partition/directory, and then fixed the ownership and permissions.
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.
You shouldn't have to rename the new public. If it's on a different partition, you'll have to mount it on /public. You can even do that, while there are still files in the original /public.
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. /Per Jessen, Zürich
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
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@acm.org
participants (6)
-
Donald D Henson
-
James Knott
-
Joseph Loo
-
Kevanf1
-
Mike McMullin
-
Per Jessen