07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• finally, a sdh disk, still 4 GB, entirely available.<br />

We're going to use these physical elements to build two volumes, one RAID-0 and one mirror<br />

(RAID-1). Let's start with the RAID-0 volume:<br />

NOTE<br />

Identifying existing RAID<br />

volumes<br />

The /proc/mdstat file lists existing volumes and their states. When creating a<br />

new RAID volume, care should be taken not to name it the same as an existing<br />

volume.<br />

# mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sde<br />

mdadm: Defaulting to version 1.2 metadata<br />

mdadm: array /dev/md0 started.<br />

# mdadm --query /dev/md0<br />

/dev/md0: 8.00GiB raid0 2 devices, 0 spares. Use mdadm --detail for more<br />

➥ detail.<br />

# mdadm --detail /dev/md0<br />

/dev/md0:<br />

Version : 1.2<br />

Creation Time : Thu Sep 30 15:21:15 2010<br />

Raid Level : raid0<br />

Array Size : 8388480 (8.00 GiB 8.59 GB)<br />

Raid Devices : 2<br />

Total Devices : 2<br />

Persistence : Superblock is persistent<br />

Update Time : Thu Sep 30 15:21:15 2010<br />

State : active<br />

Active Devices : 2<br />

Working Devices : 2<br />

Failed Devices : 0<br />

Spare Devices : 0<br />

Chunk Size : 512K<br />

Name : squeeze:0 (local to host squeeze)<br />

UUID : 0012a273:cbdb8b83:0ee15f7f:aec5e3c3<br />

Events : 0<br />

Number Major Minor RaidDevice State<br />

0 8 0 0 active sync /dev/sda<br />

1 8 64 1 active sync /dev/sde<br />

# mkfs.ext4 /dev/md0<br />

mke2fs 1.41.12 (17-May-2010)<br />

302 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!