Results 1 to 6 of 6
Thread: Upgrading backup HDD
-
01-04-2007, 12:08 AM #1Junior Guru
- Join Date
- May 2004
- Location
- Malaysia
- Posts
- 197
Upgrading backup HDD
Hello,
I would like to replace my existing backup drive to a new one.
Current: /backup
/dev/sda3 20641788 4583524 15009624 24% /
/dev/sdb1 241263968 121746992 107261392 54% /backup
/dev/sda1 256666 21224 222190 9% /boot
none 777300 0 777300 0% /dev/shm
/dev/sda6 196618052 52100984 134529460 28% /home
/dev/sda2 20641788 12885584 6707564 66% /var
/var/tmpMnt 1007896 7304 949392 1% /tmp
to a new 320GB new HDD.
What is the step by step?Danny Goh
http://www.gethosted.com.my
-
01-04-2007, 12:14 AM #2Web Hosting Guru
- Join Date
- Jan 2007
- Posts
- 254
1. Mount the new HDD under for instance /mnt/new_backup:
mkdir /mnt/new_backup
mount /dev/sd? /mnt/new_backup (/dev/sb? is the new HDD, you can list all the present HDDs using fdisk -l)
2. Copy everything over:
cp -a -R /backup/* /mnt/new_backup/
3. unmount the old HDD:
umount /backupServer Surgeon George
http://www.serversurgeon.com
Linux, BSD and Windows Administration Services
Toll Free US 877-378-7436 International +1-213-291-9191
-
01-04-2007, 12:57 AM #3Retired Moderator
- Join Date
- Jul 2001
- Location
- Singapore
- Posts
- 1,889
Before mounting, you need to partition the new hdd and also create file system in the newly created partition.
Giam Teck Choon
:: Join choon.net Community today to share your tips and tricks on server issues please ::
:: Singapore Dedicated Servers :: Singapore Virtual Private Servers :: Linux/FreeBSD Server Management ::
-
01-04-2007, 06:04 AM #4Junior Guru Wannabe
- Join Date
- Dec 2006
- Posts
- 68
You just need to format the new backup and mount
mkfs.ext3 /dev/sd?
mount /dev/sd? /new_backup
Then copy the contents from old drive
cp -rpf /backup/* /new_backup
also don't forget to put the drive info in /etc/fstab
/dev/sd? /new_backup ext3 defaults 1 2
this will automatically mount the new backup after a reboot.
After unmounting the new backup , you can rename the folder /new-backup to /backup. Also a corresponding entry in fstab also.Reverse engineering Rocks
-
01-04-2007, 06:42 AM #5Retired Moderator
- Join Date
- Oct 2004
- Location
- Southwest UK
- Posts
- 1,175
once you remove your old drive, will the device letters change? eg. if you have sda and sdb, then you add sdc, when you remove the old sdb from the system, you'll have 2 drives - sda and sdb.
Its not something you do very often, how does linux enumerate HDD devices?Do not meddle in the affairs of Dragons, for you are crunchy and taste good.
-
01-04-2007, 11:09 AM #6Aspiring Evangelist
- Join Date
- Nov 2005
- Posts
- 352
Originally Posted by gbjbaanb