FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-18-2011, 02:52 PM
Mark Fletcher
 
Default Replacing hard disk used in existing filesystem

Hello the list!

My Debian (wheezy am464, upgraded from an original squeeze install)
system started complaining yesterday that one of my hard disks is about
to fail. I suspect it suffered damage in the earthquake that recently
hit Japan (I'm in Tokyo) and has been quietly deteriorating since.

Anyway the disk concerned is a 1TB disk on which is mounted /opt, so I
feel I should be able to replace it without major hassle. I have already
backed it up fully to NAS.

The only issue is that I don't have enough spare power connectors on my
PC's power supply to attach both the new and the old disks at the same
time.

What I want to know is how can I remove the current drive from the
filesystem so I can remove it physically without sending the machine
into a tailspin? I have only ever set up the mapping of disk partitions
to mount points at installation time, never afterwards, and so am not
sure what to do.

I am thinking the procedure will be something along the lines of:

1) modify my computer's mount settings such that /opt is part of the
root filesystem instead of a separate mount point (HOW? manual edit
of /etc/fstab or something more sophisticated?) This will cause me to
lose access to everything on the old disk which is OK because it's all
backed up and there is nothing there that's critical to the running of
the machine.

2) Power down the machine and remove the old disk, attach the new disk.

3) bring up the machine, partition and format the new disk. (is the tool
for this fdisk?)

4) modify the machine's mount settings to go back to mounting /opt on
the new disk (HOW?)

5) restore everything I want in /opt back from the backup.

Even assuming I'm on the right lines, I don't know how to do steps 1 and
4 and am not totally confident about how to do 3, so would appreciate
any advice.

Cheers

Mark


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1303138354.9098.11.camel@kazuki">http://lists.debian.org/1303138354.9098.11.camel@kazuki
 
Old 04-18-2011, 03:32 PM
Dan Ritter
 
Default Replacing hard disk used in existing filesystem

On Mon, Apr 18, 2011 at 11:52:34PM +0900, Mark Fletcher wrote:
> Anyway the disk concerned is a 1TB disk on which is mounted /opt, so I
> feel I should be able to replace it without major hassle. I have already
> backed it up fully to NAS.
>
> The only issue is that I don't have enough spare power connectors on my
> PC's power supply to attach both the new and the old disks at the same
> time.
>
> What I want to know is how can I remove the current drive from the
> filesystem so I can remove it physically without sending the machine
> into a tailspin? I have only ever set up the mapping of disk partitions
> to mount points at installation time, never afterwards, and so am not
> sure what to do.
>
> I am thinking the procedure will be something along the lines of:
>
> 1) modify my computer's mount settings such that /opt is part of the
> root filesystem instead of a separate mount point (HOW? manual edit
> of /etc/fstab or something more sophisticated?) This will cause me to
> lose access to everything on the old disk which is OK because it's all
> backed up and there is nothing there that's critical to the running of
> the machine.

Just comment out the /opt mount line in /etc/fstab. The comment
feature here is putting a # at the beginning of the line.

> 2) Power down the machine and remove the old disk, attach the new disk.
>
> 3) bring up the machine, partition and format the new disk. (is the tool
> for this fdisk?)

fdisk for partitioning, mkfs to create a filesystem on the
partition. You could create a label on the filesystem partition
at this time.

Read the man pages first. Use fdisk without writing anything at
the end to see what your current settings look like.

> 4) modify the machine's mount settings to go back to mounting /opt on
> the new disk (HOW?)

Uncomment the /etc/fstab line, and make sure it points to the
right disk interface, or UUID, or filesystem label if you
created one.

> 5) restore everything I want in /opt back from the backup.
>
> Even assuming I'm on the right lines, I don't know how to do steps 1 and
> 4 and am not totally confident about how to do 3, so would appreciate
> any advice.

You had it pretty much correct; don't worry. Double-check your
backups are good before beginning.


-dsr-

--
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110418153206.GX19751@tao.merseine.nu">http://lists.debian.org/20110418153206.GX19751@tao.merseine.nu
 

Thread Tools




All times are GMT. The time now is 08:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org