Difference between revisions of "Storage on cube"

From Netsoc Wiki
Jump to: navigation, search
Line 1: Line 1:
  
Cube has 4x500GB SATA disks, each with two partitions. sd{a,b,c,d}1 are each 1GB ext3, used to store /boot and backups of /boot. sd{a,b,c,d}2 are each 499GB. sda2 and sdb2 are combined into a RAID1 as are sdc2 and sdd2. These RAID1s are used in LVM to allocate storage to whatever we need it for. The extra space for /boot was added because it saves hassle when teaching new kernels to boot from RAID+LVM.
+
Cube has 4x500GB SATA disks, each with two partitions. sd{a,b,c,d}1 are each 1GB ext4, used to store /boot and backups of /boot. sd{a,b,c,d}3 are each 495GB. sda3 and sdb3 are combined into a RAID1 as are sdc3 and sdd3. These RAID1s are used in LVM to allocate storage to whatever we need it for. The extra space for /boot was added because it saves hassle when teaching new kernels to boot from RAID+LVM. sd{a,b,c,d}2 are 5GB partitions reserved for swap.
  
 
==Partition tables==
 
==Partition tables==
 
<code>
 
<code>
  [cuberoot] ~ > # fdisk -l /dev/sd{a,b,c,d}
+
  [cube] ~ > # fdisk -l /dev/sd{a,b,c,d}
 +
 
 
   Disk /dev/sda: 500.1 GB, 500107862016 bytes
 
   Disk /dev/sda: 500.1 GB, 500107862016 bytes
   255 heads, 63 sectors/track, 60801 cylinders
+
   255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
   Units = cylinders of 16065 * 512 = 8225280 bytes
+
   Units = sectors of 1 * 512 = 512 bytes
 
   Sector size (logical/physical): 512 bytes / 512 bytes
 
   Sector size (logical/physical): 512 bytes / 512 bytes
 
   I/O size (minimum/optimal): 512 bytes / 512 bytes
 
   I/O size (minimum/optimal): 512 bytes / 512 bytes
   Disk identifier: 0x00000080
+
   Disk identifier: 0x00060046
 
    
 
    
  Device Boot      Start        End      Blocks  Id  System
+
    Device Boot      Start        End      Blocks  Id  System
   /dev/sda1  *           1        122     979933+  83  Linux
+
   /dev/sda1  *       2048    2000895     999424  83  Linux
   /dev/sda2             123      60801   487404067+ fd  Linux raid autodetect
+
   /dev/sda2         2000896    10000383    3999744   82 Linux swap / Solaris
 +
  /dev/sda3        10000384  976771071  483385344  fd  Linux raid autodetect
 
    
 
    
 
   Disk /dev/sdb: 500.1 GB, 500107862016 bytes
 
   Disk /dev/sdb: 500.1 GB, 500107862016 bytes
   255 heads, 63 sectors/track, 60801 cylinders
+
   255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
   Units = cylinders of 16065 * 512 = 8225280 bytes
+
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 512 bytes
+
   Sector size (logical/physical): 512 bytes / 4096 bytes
   I/O size (minimum/optimal): 512 bytes / 512 bytes
+
   I/O size (minimum/optimal): 4096 bytes / 4096 bytes
   Disk identifier: 0x00000082
+
   Disk identifier: 0x00070a2d
 
    
 
    
  Device Boot      Start        End      Blocks  Id  System
+
    Device Boot      Start        End      Blocks  Id  System
   /dev/sdb1               1        122     979933+  83  Linux
+
   /dev/sdb1           2048    2000895     999424  83  Linux
   /dev/sdb2             123      60801   487404067+ fd  Linux raid autodetect
+
   /dev/sdb2         2000896    10000383    3999744   82 Linux swap / Solaris
 +
  /dev/sdb3        10000384  976771071  483385344  fd  Linux raid autodetect
 
    
 
    
 
   Disk /dev/sdc: 500.1 GB, 500107862016 bytes
 
   Disk /dev/sdc: 500.1 GB, 500107862016 bytes
   255 heads, 63 sectors/track, 60801 cylinders
+
   255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
   Units = cylinders of 16065 * 512 = 8225280 bytes
+
   Units = sectors of 1 * 512 = 512 bytes
 
   Sector size (logical/physical): 512 bytes / 512 bytes
 
   Sector size (logical/physical): 512 bytes / 512 bytes
 
   I/O size (minimum/optimal): 512 bytes / 512 bytes
 
   I/O size (minimum/optimal): 512 bytes / 512 bytes
 
   Disk identifier: 0x00000081
 
   Disk identifier: 0x00000081
 
    
 
    
  Device Boot      Start        End      Blocks  Id  System
+
    Device Boot      Start        End      Blocks  Id  System
   /dev/sdc1               1        122     979933+  83  Linux
+
   /dev/sdc1           2048    2000895     999424  83  Linux
   /dev/sdc2             123      60801   487404067+ fd  Linux raid autodetect
+
   /dev/sdc2         2000896    10000383    3999744   82 Linux swap / Solaris
 +
  /dev/sdc3        10000384  976771071  483385344  fd  Linux raid autodetect
 
    
 
    
 
   Disk /dev/sdd: 500.1 GB, 500107862016 bytes
 
   Disk /dev/sdd: 500.1 GB, 500107862016 bytes
   255 heads, 63 sectors/track, 60801 cylinders
+
   255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
   Units = cylinders of 16065 * 512 = 8225280 bytes
+
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 512 bytes
+
   Sector size (logical/physical): 512 bytes / 4096 bytes
   I/O size (minimum/optimal): 512 bytes / 512 bytes
+
   I/O size (minimum/optimal): 4096 bytes / 4096 bytes
   Disk identifier: 0x00000083
+
   Disk identifier: 0x00000000
 
    
 
    
  Device Boot      Start        End      Blocks  Id  System
+
    Device Boot      Start        End      Blocks  Id  System
   /dev/sdd1               1        122     979933+  83  Linux
+
   /dev/sdd1           2048    2000895     999424  83  Linux
   /dev/sdd2             123      60801   487404067+ fd  Linux raid autodetect
+
   /dev/sdd2         2000896    10000383    3999744   82 Linux swap / Solaris
 
+
  /dev/sdd3        10000384  976771071  483385344  fd  Linux raid autodetect
  
 
</code>
 
</code>
Line 55: Line 59:
  
 
<code>
 
<code>
   [cuberoot] ~ > # for disk in /dev/sd{a,b,c,d}2; do
+
   [cube] /dev > # mdadm --detail --scan
  > echo -n "$disk: "; mdadm --detail --scan | grep $(mdadm --examine $disk | grep UUID | awk '{print $3}')
+
  ARRAY /dev/md/1 metadata=1.2 name=(none):1 UUID=1a3b73a6:49ad91af:46ea8579:e04f5068
  > done
+
  ARRAY /dev/md/0 metadata=1.2 name=(none):0 UUID=08c3a752:7ac6bca4:eb915f07:2e030304
  /dev/sda2: ARRAY /dev/md0 metadata=0.90 UUID=3cc47921:d606c715:3d6bf82e:54d85272
 
  /dev/sdb2: ARRAY /dev/md0 metadata=0.90 UUID=3cc47921:d606c715:3d6bf82e:54d85272
 
  /dev/sdc2: ARRAY /dev/md1 metadata=0.90 UUID=15ac4ac0:047be175:31ea7fbd:eff357e9
 
  /dev/sdd2: ARRAY /dev/md1 metadata=0.90 UUID=15ac4ac0:047be175:31ea7fbd:eff357e9
 
 
</code>
 
</code>

Revision as of 05:38, 7 January 2014

Cube has 4x500GB SATA disks, each with two partitions. sd{a,b,c,d}1 are each 1GB ext4, used to store /boot and backups of /boot. sd{a,b,c,d}3 are each 495GB. sda3 and sdb3 are combined into a RAID1 as are sdc3 and sdd3. These RAID1s are used in LVM to allocate storage to whatever we need it for. The extra space for /boot was added because it saves hassle when teaching new kernels to boot from RAID+LVM. sd{a,b,c,d}2 are 5GB partitions reserved for swap.

Partition tables

 [cube] ~ > # fdisk -l /dev/sd{a,b,c,d}
 
 Disk /dev/sda: 500.1 GB, 500107862016 bytes
 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x00060046
 
    Device Boot      Start         End      Blocks   Id  System
 /dev/sda1   *        2048     2000895      999424   83  Linux
 /dev/sda2         2000896    10000383     3999744   82  Linux swap / Solaris
 /dev/sda3        10000384   976771071   483385344   fd  Linux raid autodetect
 
 Disk /dev/sdb: 500.1 GB, 500107862016 bytes
 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 Disk identifier: 0x00070a2d
 
    Device Boot      Start         End      Blocks   Id  System
 /dev/sdb1            2048     2000895      999424   83  Linux
 /dev/sdb2         2000896    10000383     3999744   82  Linux swap / Solaris
 /dev/sdb3        10000384   976771071   483385344   fd  Linux raid autodetect
 
 Disk /dev/sdc: 500.1 GB, 500107862016 bytes
 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x00000081
 
    Device Boot      Start         End      Blocks   Id  System
 /dev/sdc1            2048     2000895      999424   83  Linux
 /dev/sdc2         2000896    10000383     3999744   82  Linux swap / Solaris
 /dev/sdc3        10000384   976771071   483385344   fd  Linux raid autodetect
 
 Disk /dev/sdd: 500.1 GB, 500107862016 bytes
 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 Disk identifier: 0x00000000
 
    Device Boot      Start         End      Blocks   Id  System
 /dev/sdd1            2048     2000895      999424   83  Linux
 /dev/sdd2         2000896    10000383     3999744   82  Linux swap / Solaris
 /dev/sdd3        10000384   976771071   483385344   fd  Linux raid autodetect

RAID1s

  [cube] /dev > # mdadm --detail --scan
 ARRAY /dev/md/1 metadata=1.2 name=(none):1 UUID=1a3b73a6:49ad91af:46ea8579:e04f5068
 ARRAY /dev/md/0 metadata=1.2 name=(none):0 UUID=08c3a752:7ac6bca4:eb915f07:2e030304