Difference between revisions of "Server Administration"
(→Install new hard drive) |
(→Install new hard drive) |
||
Line 8: | Line 8: | ||
The new drive show show up here in this list. In this case, it is /dev/sdc | The new drive show show up here in this list. In this case, it is /dev/sdc | ||
fdisk /dev/sdc | fdisk /dev/sdc | ||
− | Using fdisk, create a new | + | Using fdisk, create a new Linux partition containing the entire hard drive. |
− | + | mkfs.ext3 -m 0 /dev/sdc1 | |
+ | Format this new partition as ext3. By default, this reserves 5% of the disk for root. To remove this reservation, with use "-m 0". This can be changed later with "tune2fs -m 0 /dev/sdc1". | ||
Now create a new mount point in /media.. | Now create a new mount point in /media.. | ||
mkdir /media/new_drive | mkdir /media/new_drive |
Revision as of 11:10, 1 October 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 Linux partition containing the entire hard drive.
mkfs.ext3 -m 0 /dev/sdc1
Format this new partition as ext3. By default, this reserves 5% of the disk for root. To remove this reservation, with use "-m 0". This can be changed later with "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/