User Tools

Site Tools


debian_on_a_hp_mediasmart_server

If you want to send us your comments, please do so. Thanks
More on comments


Debian on a HP MediaSmart Server

Installing Debian

HP MediaSmart Server on Wikipedia
Review HP MediaSmart server EX490 and EX495
A closer look at the EX490 and EX495 hardware
Instaling Ubuntu on the HP MediaSmart EX490
Step by step guideline to install Ubuntu on a EX495
How to install Debian on a PC without a monitor or keyboard
How to install FreeNAS on the HP EX495 MediaSmart server Replace the CPU

Software RAID installation

We are going to use two entiere, unpartitioned, disks. The creation of partitions can be omitted
We started off with a ntfs filesystem on sdc and a hfsplus filesystem on sdd
The default style of RAID metadata (superblock) to be used is 1.2 for --create
On the Debian Wiki SoftwareRAID is the explanation

The procedure, remarks and additions on the Debian Wiki explanation for our, two full disks, case

  • Become root
  • aptitude install mdadm
  • Check out which drives you want to incorporate with blkid
  • mdadm --zero-superblock /dev/sdc /dev/sdd
  • For the next time, experimental. The aim is to get the “Filesystem LABEL:” and the “filesystem:” tags, as shown in cfdisk, right. Also affer the creation of the RAID array is successfully finished
    • e2label RAIDdisk_1 /dev/sdc
    • e2label RAIDdisk_2 /dev/sdd
    • With cfdisk
      • set the type for sdc to 83
      • create a primary partition occupying the whole disk
      • delete the partition
      • set the type of the disk to 0xFD
      • repeat these “With cfdisk” steps for sdd
  • mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdc /dev/sdd (just the devices without partition indicator like the 1 in sda1). Result
mdadm: partition table exists on /dev/sdc
mdadm: partition table exists on /dev/sdc but will be lost or
       meaningless after creating array
mdadm: Note: this array has metadata at the start and
       may not be suitable as a boot device.  If you plan to 
       store '/boot' on this device please ensure that
       your boot-loader understands md/v1.x metadata, or use --metadata=0.90
mdadm: partition table exists on /dev/sdd
mdadm: partition table exists on /dev/sdd but will be lost or
       meaningless after creating array
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
  • mkfs.ext4 /dev/md0 or more dedicated: mkfs.ext4 -v -O extent -t ext4 -L RAID_drive /dev/md0
  • Create a directory where RAID_drive has to be mounted if it does not exist. mkdir /mnt/RAID_drive
  • Add to /etc/fstab : /dev/md0 /mnt/RAID_drive ext4 noatime,rw 0 0
  • Create the mdadm config file: mdadm --detail --scan /dev/md0 >> /etc/mdadm/mdadm.conf
  • tail -n 3 /etc/mdadm/mdadm.conf The output should look like, the UUID with 0's: this is the UUID for sdc and sdd combined,
# This configuration was auto-generated on Fri, 24 Apr 2020 15:59:11 +0000 by mkconf
ARRAY /dev/md0 metadata=1.2 name=Hostname:0 UUID=00000000:00000000:00000000:00000000
ARRAY /dev/md0 metadata=1.2 name=Hostname:0 UUID=00000000:00000000:00000000:00000000
  • mount -a to mount the RAID drive via fstab
  • Check the output of blkid for sdc, sdd and md0. It should look like,
    • UUID with 0's: this is the UUID for sdc and sdd combined
    • UUID with 1's: this is the UUID for sdc
    • UUID with 2's: this is the UUID for sdd
    • UUID with 3's: this is the UUID for md0
/dev/sdc: UUID="00000000-0000-0000-0000-000000000000" UUID_SUB="11111111-1111-1111-1111-111111111111" LABEL="Hostname:0" TYPE="linux_raid_member"
/dev/sdd: UUID="00000000-0000-0000-0000-000000000000" UUID_SUB="22222222-2222-2222-2222-222222222222" LABEL="Hostname:0" TYPE="linux_raid_member"
/dev/md0: LABEL="RAID_drive" UUID="33333333-3333-3333-3333-333333333333" TYPE="ext4"

Remarks

  • Using 2 partitions (like /dev/sda1 and /dev/sdc1 is also possible
  • The array is started by the mdadm-raid service or (via mdadm -A -s or via mdrun commands)
  • cfdisk mentions for sdc
    • Filesystem UUID: 4444444444444444
    • Filesystem LABEL: NieuwVolume
    • Filesystem: ntfs
  • cfdisk mentions for sdd
    • Filesystem UUID: 55555555-5555-5555-5555-555555555555
    • Filesystem LABEL: Just a label name
    • Filesystem: hfsplus
  • cfdisk mentions for md0
    • Device already contains a ext4 signature; it will be removed by a write command.
  • dmraid might be useful if you use partitions in stead of unpartitioned disks

Errors and Warings

Unrecognised md component device

mdadm --zero-superblock

mdadm: Unrecognised md component device - /dev/sdc

This is a warning. It means that mdadm --zero-superblock was not needed

wrong fs type ...

mount /dev/md0 /mnt/RAID_drive/

mount: /mnt/RAID_drive: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.

May be you forgot to do mkfs.ext4 /dev/md0 or more dedicated: mkfs.ext4 -v -O extent -t ext4 -L RAID_drive /dev/md0

autorebuild process already running

mdadm --monitor --test /dev/md0

mdadm: Monitor using e-mail address "user" from config file
mdadm: Warning: One autorebuild process already running.

Remove the software RAID

The RAID information is stored at the END of each drive in the array
Use dd to wipe sdc and sdd using /dev/zero When done you can start (over) creating the RAID array

Useful links

RAID
Recovering RAID
How to set up a RAID 1 under GNU Slash Linux

update-initramfs -u
cat /proc/mdstat


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
debian_on_a_hp_mediasmart_server.txt · Last modified: 02-11-2021 14:41 by wim