Difference between revisions of "Add an additional hard drive"

From LinuxMCE
Jump to: navigation, search
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{versioninfo|810Status=Working|810UpdatedDate=22 Sep 2010|810UpdatedBy=DEMNVT}}  
 
{{versioninfo|810Status=Working|810UpdatedDate=22 Sep 2010|810UpdatedBy=DEMNVT}}  
[[Category: Tutorials]]
+
[[Category:Hardware| ]]
  
WARNING!!! Do not follow this procedure unless you have a basic understanding of how to format hard drives and you know that you are definately working with a hard drive that contains no important data. The process can cause you to lose all of the data on your hard drive.
+
==Caveat==
 +
WARNING!!! Do not follow this procedure unless you have a basic understanding of how to format hard drives and you know that you are   definately working with a hard drive that contains no important data. The process can cause you to lose all of the data on your hard drive.
  
 +
==Procedure==
 
If (after installing LinuxMCE) you would like to add a brand-new (BLANK) hard drive to your Core/Hybrid to add additional storage space for Media you can use the following procedure:
 
If (after installing LinuxMCE) you would like to add a brand-new (BLANK) hard drive to your Core/Hybrid to add additional storage space for Media you can use the following procedure:
  
#Install the physical hard drive into the computer
+
*Install the physical hard drive into the computer
#Check that the BIOS settings all look correct (Hard drive boot order etc)
+
*Check that the BIOS settings all look correct (Hard drive boot order etc)
#Boot up LinuxMCE and ssh into the core.
+
*Boot up LinuxMCE and ssh into the core.
#Create a partition on the disk using the fdisk command  
+
*Create a partition on the disk using the fdisk command (you should have read up on this before you use it)
 
  ie. sudo fdisk /dev/sdX (for a SATA drive where X is the number of the new drive)
 
  ie. sudo fdisk /dev/sdX (for a SATA drive where X is the number of the new drive)
#Create a filesystem on this new partition (XFS is the recommended option)
+
*Create a filesystem on this new partition (XFS is the recommended option)
 
  ie. sudo mkfs.xfs /dev/sdXY (for partition 'Y' on SATA drive 'X')
 
  ie. sudo mkfs.xfs /dev/sdXY (for partition 'Y' on SATA drive 'X')
#Watch the screen of your nearest Orbiter for a few minutes to see if the new partition is automatically detected.
+
*Watch the screen of your nearest Orbiter for a few minutes to see if the new partition is automatically detected.
#If it does not get auto detected then reboot the core and it should be auto detected.
+
*If it does not get auto detected then reboot the core and it should be auto detected.
#Tell LinuxMCE how you want to use the new drive (ie as an Internal Drive that uses the LinuxMCE structure etc)
+
*Tell LinuxMCE how you want to use the new drive (ie as an Internal Drive that uses the LinuxMCE structure etc)
#Reload the router.
+
*Reload the router.
#Enjoy your new storage space.
+
*Enjoy your new storage space.
  
 
==Example==
 
==Example==
<blockquote>
+
<pre>
lukas@dcerouter:/dev/disk$ sudo fdisk /dev/sdb
+
user@dcerouter:/dev/disk$ sudo fdisk /dev/sdb
 
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
 
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
 
Building a new DOS disklabel with disk identifier 0x3272b98c.
 
Building a new DOS disklabel with disk identifier 0x3272b98c.
Line 81: Line 83:
 
Syncing disks.
 
Syncing disks.
  
lukas@dcerouter:/dev/disk$ sudo mkfs.xfs /dev/sdb1  
+
user@dcerouter:/dev/disk$ sudo mkfs.xfs /dev/sdb1  
 
meta-data=/dev/sdb1              isize=256    agcount=4, agsize=122094500 blks
 
meta-data=/dev/sdb1              isize=256    agcount=4, agsize=122094500 blks
 
         =                      sectsz=512  attr=2
 
         =                      sectsz=512  attr=2
Line 91: Line 93:
 
realtime =none                  extsz=4096  blocks=0, rtextents=0
 
realtime =none                  extsz=4096  blocks=0, rtextents=0
  
 +
user@dcerouter:~$ df -h
 +
Filesystem            Size Used Avail Use% Mounted on
 +
rootfs                106G  15G  86G  15% /
 +
udev                  1.7G  2.8M  1.7G  1% /dev
 +
/dev/disk/by-uuid/ec718bdb-9cb0-4be0-9c52-893d4b7c3aad
 +
                      106G  15G  86G  15% /
 +
/dev/disk/by-uuid/ec718bdb-9cb0-4be0-9c52-893d4b7c3aad
 +
                      106G  15G  86G  15% /dev/.static/dev
 +
tmpfs                1.7G    0  1.7G  0% /lib/init/rw
 +
varrun                1.7G  376K  1.7G  1% /var/run
 +
varlock              1.7G    0  1.7G  0% /var/lock
 +
tmpfs                1.7G  2.2M  1.7G  1% /lib/modules/2.6.27-17-generic/volatile
 +
tmpfs                1.7G    0  1.7G  0% /dev/shm
 +
/dev/sdb1            1.9T  4.2M  1.9T  1% /mnt/device/60
 +
//192.168.80.2/public
 +
                      148G  135G  13G  92% /mnt/device/53
 +
</pre>
  
 
Keywords: new hard drive, HDD, extra hard drive, second hard drive.
 
Keywords: new hard drive, HDD, extra hard drive, second hard drive.
</blockquote>
 

Latest revision as of 16:26, 19 October 2012

Version Status Date Updated Updated By
710 Unknown N/A N/A
810 Working 22 Sep 2010 DEMNVT
1004 Unknown N/A N/A
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information

Caveat

WARNING!!! Do not follow this procedure unless you have a basic understanding of how to format hard drives and you know that you are definately working with a hard drive that contains no important data. The process can cause you to lose all of the data on your hard drive.

Procedure

If (after installing LinuxMCE) you would like to add a brand-new (BLANK) hard drive to your Core/Hybrid to add additional storage space for Media you can use the following procedure:

  • Install the physical hard drive into the computer
  • Check that the BIOS settings all look correct (Hard drive boot order etc)
  • Boot up LinuxMCE and ssh into the core.
  • Create a partition on the disk using the fdisk command (you should have read up on this before you use it)
ie. sudo fdisk /dev/sdX (for a SATA drive where X is the number of the new drive)
  • Create a filesystem on this new partition (XFS is the recommended option)
ie. sudo mkfs.xfs /dev/sdXY (for partition 'Y' on SATA drive 'X')
  • Watch the screen of your nearest Orbiter for a few minutes to see if the new partition is automatically detected.
  • If it does not get auto detected then reboot the core and it should be auto detected.
  • Tell LinuxMCE how you want to use the new drive (ie as an Internal Drive that uses the LinuxMCE structure etc)
  • Reload the router.
  • Enjoy your new storage space.

Example

user@dcerouter:/dev/disk$ sudo fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x3272b98c.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.


The number of cylinders for this disk is set to 243201.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): p

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3272b98c

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-243201, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-243201, default 243201): 
Using default value 243201

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

user@dcerouter:/dev/disk$ sudo mkfs.xfs /dev/sdb1 
meta-data=/dev/sdb1              isize=256    agcount=4, agsize=122094500 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=488378000, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096  
log      =internal log           bsize=4096   blocks=32768, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

user@dcerouter:~$ df -h
Filesystem            Size Used Avail Use% Mounted on
rootfs                106G   15G   86G  15% /
udev                  1.7G  2.8M  1.7G   1% /dev
/dev/disk/by-uuid/ec718bdb-9cb0-4be0-9c52-893d4b7c3aad
                      106G   15G   86G  15% /
/dev/disk/by-uuid/ec718bdb-9cb0-4be0-9c52-893d4b7c3aad
                      106G   15G   86G  15% /dev/.static/dev
tmpfs                 1.7G     0  1.7G   0% /lib/init/rw
varrun                1.7G  376K  1.7G   1% /var/run
varlock               1.7G     0  1.7G   0% /var/lock
tmpfs                 1.7G  2.2M  1.7G   1% /lib/modules/2.6.27-17-generic/volatile
tmpfs                 1.7G     0  1.7G   0% /dev/shm
/dev/sdb1             1.9T  4.2M  1.9T   1% /mnt/device/60
//192.168.80.2/public
                      148G  135G   13G  92% /mnt/device/53

Keywords: new hard drive, HDD, extra hard drive, second hard drive.