Difference between revisions of "Server Administration"
From Rizzo_Lab
(→Install new hard drive) |
|||
Line 21: | Line 21: | ||
/dev/sdb1 459G 232G 204G 54% /media/sdb1 | /dev/sdb1 459G 232G 204G 54% /media/sdb1 | ||
/dev/sdc1 917G 109M 871G 1% /media/hdock | /dev/sdc1 917G 109M 871G 1% /media/hdock | ||
+ | In case you are having trouble unmounting a volume, use lazy unmount -l. This does not force an unmount, rather it waits until the device stops being busy. | ||
+ | umount -l hdock/ |
Revision as of 11:16, 25 January 2010
Updating the server
Install yumex (YUM eXtender GUI for yum)
sudo yum install yumex
Install new hard drive
After plugging in new hard drive, find the drive by typing
ll /dev/sd*
The new drive show show up here in this list. In this case, it is /dev/sdc
fdisk /dev/sdc
Using fdisk, create a new ext3 partition containing the entire hard drive. This actually reserves 5% of the disk for root. To remove this reservation, use tune2fs to set this to 0.
tune2fs -m 0 /dev/sdc1
Now create a new mount point in /media..
mkdir /media/new_drive
Edit /etc/fstab to add the new drive, such as the line
/dev/sdc1 /media/new_drive ext3 defaults,user,rw 0 0
Now mount the new partition using
mount /media/new_drive
Use df to make sure the new drive is up and you have the right amount of free space
Filesystem Size Used Avail Use% Mounted on /dev/sda1 99M 87M 7.5M 93% /boot /dev/sdb1 459G 232G 204G 54% /media/sdb1 /dev/sdc1 917G 109M 871G 1% /media/hdock
In case you are having trouble unmounting a volume, use lazy unmount -l. This does not force an unmount, rather it waits until the device stops being busy.
umount -l hdock/