Difference between revisions of "SUNScholar/Upgrading/Hardware/Add a New Disk"
| Line 3: | Line 3: | ||
</center> | </center> | ||
| − | <center> | + | <center><font color="red"> |
| − | <font color="red" | ||
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.<br>WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS.<br> | BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.<br>WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS.<br> | ||
| − | These guidelines are very brief and require someone with [[SUNScholar/Capacity_Building/Digital_Repository_Systems_Management|Linux experience]] to execute correctly.</font> | + | These guidelines are very brief and require someone with [[SUNScholar/Capacity_Building/Digital_Repository_Systems_Management|Linux experience]] to execute correctly.</font></center> |
| − | </center> | ||
==Step 1== | ==Step 1== | ||
Revision as of 19:35, 8 February 2014
Back to Upgrading Hardware
BE ABSOLUTELY SURE THAT YOU ARE RUNNING THESE COMMANDS AGAINST THE CORRECT DRIVE.
WE CANNOT ACCEPT RESPONSIBILITY FOR ANY DATA LOSS.
Step 1
Determine the kernel hardware label for the new disk.
After connecting the new disk to the server and rebooting, login to the server using a console and type;
sudo fdisk -l
This command will list all the disks attached and the kernel label used.
Step 2
Create a linux partition on the new disk.
Assuming that you identified the new disk as /dev/sdb, from step 1 above, then type the following to create a single linux partition on the new disk;
sudo -i
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary ext4
parted /dev/sdb print
Step 3
Make a linux filesystem on the new disk.
Step 2 above should have created a single primary linux partition on the disk.
Type the following to create an ext4 file system on the disk;
mkfs.ext4 /dev/sdb1
Step 4
Make a mount point on the linux file system for the new disk.
Step 5
Mount the new disk to the mount point on the linux file system.
Definitions
- http://en.wikipedia.org/wiki/Disk_partitioning
- http://en.wikipedia.org/wiki/Fdisk
- http://en.wikipedia.org/wiki/Parted
- http://en.wikipedia.org/wiki/Mkfs
- http://en.wikipedia.org/wiki/Fstab