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-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110418153206.gx19...@tao.merseine.nu