Connect Drobo B800i to CentOS 7 via iSCSI

Drobo Dashboard
CentOS 7.4.1708 Kernel 3.10.0.-693.11.1.el7.x64_86
Drobo B800i Firmware 2.0.6

The Drobo and the host computer must be on the same subnet in order for this to work. (See Drobo Online User Guide)

Preparation

After configuring the device’s IP and other settings via USB from my Windows desktop using Drobo Dashboard, I created a 1TB, unformatted volume.

Format Dialog box

Information you’ll need to connect to machine:

  • Target Name
  • IP address of device

I did not enable CHAP, but it can be easily configured on the machine. I also disabled SELinux on this test box.

**note** your Drobo must be on the same subnet as your server.

I installed the iscsi initiator utilities.

$ sudo yum install -y scsi-target-utils

Configure the server

On the CentOS server, install the iscsi package

# yum -y install iscsi-initiator-utils

List out the /proc/partitions file to see the devices that you have currently. Once you login to the iSCSI volume, a new one will appear and that’s the one we’ll format.

# cat /proc/partitions

Add the target name to /etc/iscsi/initiatorname.iscsi file, save and exit.

#  vim  /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2005-06.com.drobo:b800i.tdb1504b0092.id1

iscsiadm discovery command

Use the iscsiadm command to discover the target.

# iscsiadm -m discovery -t  sendtargets -p 10.253.53.25

Once your volumes are discovered, you can login to them

# iscsiadm -m node -T iqn.2005-06.com.drobo:b800i.tdb1504b0092.id1 -p 10.253.52.25 --login

List out the /proc/partitions file to see the new disk.

# cat /proc/partition

 

Command to display partitions

command to login the iscsi target

If the login is successful, run the dmesg | tail command to see if the kernel sees the logical blocks.

# dmesg | tail

Time to partition the device. 

Run the parted command against the device to create a new disk label. Run It again to create the primary partition

# parted --script  /dev/sdb mklabel msdos
# parted --script  /dev/sdb mklabel primary 0% 100%

If by chance you get an error that reads:

Warning: The resulting partition is not properly aligned for best performance

Read this blog post and make the adjustments. 2048s is a good choice for the starting sector.

Check the disk alignment

# parted /dev/sdb align-check optimal 1

If it returns 1 aligned, you’re good to go.

Format your disk

# mkfs.ext3 /dev/sdb1

*note* I’d read that this Drobo didn’t support ext4 and after formatting the volume, I found that to be false.

Mount your disk

# mount /dev/sdb1 /drobo

Confirm that you can write to it

# touch /drobo/testfile

Check the  file system disk space usage.

# df -hT

*Notes & Caveats*

  • All volumes on the Drobo were ‘visible’ in file manager. If you have multiple volumes on the target, you’ll see them all in GUI file manager.
  • They have a different name after each reboot /dev/sdb1 or /dev/sdc1,
  • Adding it to /fstab didn’t matter, since the name changed after every reboot.
  • They show as ‘on my computer’ and when I click on the drive, it mounts to /run/media/username/some-really-long-number-and-series-of-letters. The media directory isn’t even present  under the/ run director after a reboot. It only appears once I click on the disk in the file manager.
  • I’ve read a few blogs where it’s better to present the Drobo as 1 large volume to a Linux system.
  • I formatted it as ext3 just fine. I’d read in another blog that it doesn’t support ext4. I didn’t find a definitive answer in the online guide to confirm or deny it until I saw the above mentioned alert in the dashboard.

You can set the target to login and mount at boot by editing the /etc/fstab and by using the iscsiadm command to set it to automatic.

 

Leveling up skills with Linux Academy

My stand up desk with the Linux Academy Penguin

I haven’t been blogging much, I’ve been busy learning.

I got a subscription to Linux Academy and for the past month, I’ve been immersed in retooling for a skill switch into DevOps. I’ve been using Linux for years, but my goal is not to have a cursory understanding of the OS, but to be as comfortable in it as I am in Windows. I’ve gotten a few successful completions on a few courses on Linux Academy under my belt. I’m currently in the Linux, Cloud, and Ruby Coding learning path which consists of:

  • Linux Essentials Certification (done)
  • CompTIA Cloud Essentials Certification (in progress)
  • AWS Certified Solutions Architect – Associate
  • OpenStack Essentials
  • Nginx And The LEMP Stack
  • Introduction To Ruby Programming Language On Linux

Linux Academy Completion Certificate- Linux Essentials Linux Academy Completion Certificate- DevOps Essentials

I’ll sit for the LPI Linux Essentials exam this month and move on to the AWS Certified Solutions Architect-Associate exam after that.

In the meantime, I’m writing 2 blog series that will highlight some of the tools, commands, packages that I come across in my studies. Today’s 10 will highlight 10 commands, tips, tricks, etc. The other, Fab 5 will cover 5 quick hitters about Linux.

Stay tuned for more posts about my DevOps journey.

 

Today’s 10 Commands: Command-Line Navigation

Introducing 2 new blog series: Today’s 10 & Fab 5

This is the first of many blog posts about commands, utilities and tips I’m either learning for the first time or re-familiarizing myself with. This series is called Today’s 10, 10 commands, tips, tricks, etc. I will have another series called Fab 5 for the quick hitters that I come across.

Command-Line navigation:

We all have done it, backspaced and back and forth, arrow up and down the command line. Trying to correct errors, change things after an erroneous tab completions and make changes to command after we’ve pulled them up in our history.

Here are 10 commands that will have you zipping around the shell prompt in no time.

  1. Alt+b – will move your cursor back one word at a time to start of the word.
  2. Alt+f – will move your cursor forward one word at a time to the end of the word.
  3. Alt+d – will delete to the end of that misspelled word starting at the cursor.
  4. Ctrl+e – move your cursor at the end of the line.
  5. Ctrl+ a – move your cursor to the beginning of the line.
  6. Ctrl+l – clear your screen (clear also will do the trick).
  7. Ctrl +w – deletes from the cursor to the beginning of the word or path.
  8. Ctrl+c – clears the entire line. (yes, THAT ctrl+c) and takes to to a blank command prompt.
  9. Ctrl+f – move cursor forward one character at a time, like the right arrow key.
  10. Ctrl+b – move cursor backward one character at a time, like the left arrow key.

Watch your command-line navigation improve as you use these keystrokes more and more. There are many, many more, but these are the 10 that I use the most.

What are some of your favorite command-line shortcuts?

 

 

 

 

404 error when downloading .iso file on IIS

I’m running IIS8 and I have a site where I can wget and download isos easily.

I got a 404 error when trying to download an iso:

Image of a 404 error from IIS

You must add the correct MIME type for the file you’re trying to download.

From IIS Manager, go to Sites > YOUR_SITE> and in the features view, double-click MIME Types.

Under actions, click Add.

Enter the file extension iso and the MIME type application/octetstream

Add MIME type dialog box

Click OK and retry your download.

iso downloading

 

Veeam Backup & Replication stops when temp license expired

Veeam License Expired Error Message
Environment:
Veeam Backup & Replication (VBR)  and Enterprise Manager(EM) Version 9.5.0.1038
Windows Version 2016
Veeam Agent for Windows(VAW) 2.0

After downloading and installing the Veeam Agent for Microsoft Windows on my workstation and adding the agent to VBR, I scheduled my job and let it run. However, I let the license expire before purchasing one.

Veeam License Expired Error Message

Every backup in my vSphere environment stopped backing up on schedule. Manual jobs ran and completed, but nothing would run as scheduled. Here is the proper way of removing the expired license from VBR.

Launch the command prompt as Administratrator and cd to C:\Program Files\Veeam\Backup and Replication\Enterprise Manager. Enter:

> Veeam.Backup.EnterpriseService.exe -removelicense vaw

 

Command to remove licenses
You’ll be prompted to continue the license removal, press y.
Next, restart both VBR and EM and verify at all licenses have been removed. Test your jobs by rescheduling one for a few minutes out, once the job runs, the hosts that the VMs run on will begin to re-add themselves to Licensed Hosts.

 

 

-ShowWindow in Powershell help

The adage, you learn something new everyday is very true.

I’m reading a book called Learn Powershell in a Month of Lunches by Don Jones and Jeff Hicks and I just discovered a helpful nugget I didn’t know existed, -ShowWindow.

Example:
help Get-ADGroupMember -showwindow

The -ShowWindow parameter will give you a popup window with the help topic you’re researching.  You can search words and phrases within the help topic. The found term is highlighted for easy reading and you can move between terms using the previous and next buttons. The window can be resized and you can increase or decrease the text with the slider at the bottom of the window. The description is a bit shorter for some cmdlets, but there are even some command examples displayed in the help window to get you going without coming out of your prompt.

The PowerShell help window
-ShowWindow

Gone are the days of opening a second Powershell window to reference the help while crafting command line syntax. -ShowWindow is a great too in the Powershell arsenal.

 

~Note~ This works differently in PS 4.0 and 5.0. and within different builds of Windows 10. 
Some contents are missing or out of order. It appears it is a known issue.
Your mileage may vary.

A curved arrow pointing right Don’t forget Help Cmdletname -online It launches help in the browser. Keeping you in your PS window without taking you away from your prompt.

 

Check the hash on a file using PowerShell

Checking the hash of a file you’ve downloaded from the internet is very good practice. It’s a way to ensure the file you’re downloading hasn’t been tampered with, according to the hash provided on the site you’re downloading from.

Since Powershell 4.0, Get-FileHash has been a way to check the hash signature of a file.

A powershell windows showing the Get-FileHash command

Get-FileHash -Path C:\Path\to\file\file.exe -Algorithm SHA256

Get-FileHash can check the following signatures:

  • SHA1
  • SHA256 (default value)
  • SHA384
  • SHA512
  • MACTripleDES
  • MD4
  • RIPEMD160

Disks not visible to ESXi host

SSD disks not visible to host

I have (4) new Dell PowerEdge R730xd Ready Nodes that I’m using for a new vSAN 6.6 cluster.

The systems are up to date on drivers and firmware. The controller is a PERC H730 mini, which is supported for pass-through. I installed the hypervisor on the SD card and checked to see if I could see the SSDs from vCenter. The drives weren’t visible.

SSD disks not visible to host

I SSH’d in the host and ran:

~ esxcli storage nmp device list

It only returned the SD card.

To get your disks to show up in your host, you have to reset the controller. First, put the host into maintenance mode.

Log into the iDRAC. Overview > Storage>Controller > Troubleshooting tab.

Under the actions drop down, select Reset Configuration.

Reset Controller in iDRAC

You’ll get a warning. Click OK to confirm.

System Alert Warning

Once the process is started, you can monitor the job queue’s progress.

When the reset is done,  you set the disks to Non-Raid.

Under Storage > Physical disks> Setup Tab, you click on the down arrow under Action-Assign to all.

Select Convert to Non-Raid and click apply. You can monitor the progress in the job queue.

Setting Physical Disks to Non-Raid Mode

Once it has completed, take the host out of maintenance mode and check the storage devices.

You should now be able to see all of your disks that are now available to the host for vSAN

Disks are now visible on the host.

Master Dead but PID File exists

Users reported that mail stopped being sent from their server.

Tried to test email functionality from the command line.

# echo "Subject: Testing Sendmail from server.domain.com" | sendmail -v admin@domain.com
This is a test
BYE
[ctrl + D]

The message wasn’t sent. I tailed the maillog &  checked the service status:

# tail -n 500 /var/log/maillog
# service sendmail status
master dead by pid file exists

I checked to see if any Sendmail processes were running and there were several.

 ps -ef | grep sendmail

Stopped the service, deleted the master.pid and the lock file and killed all the sendmail processes, then restarted the sendmail service

# service sendmail stop
# rm /var/spool/postfix/pid/master.pid
# rm /var/lock/subsys/sendmail
# killall -9 sendmail
# service sendmail start
# service sendmail status

Tailed the logs, resent the email and it was delivered.

# watch tail -n 20 /var/log/maillog

 

Edit files from Windows Command Line

I was adding entries to my hosts file on Windows 10 and I got an Access is Denied message when I saved the file in Notepad. Here are 2 quick ways to edit system files.

1) Right+Click Command Prompt or Notepad and Run as Administrator (old faithful)
2) From the Command Line, as Administrator,  start notepad.exe “hosts” (from the etc folder of course) or for more bang for your buck, open notepad++ with start notepad++.exe “hosts” if you have it installed.

Command to edit files from the command line

Social media & sharing icons powered by UltimatelySocial