CentOS 7, X11 and black squares (Font) issue

I was installing a fresh install of centos 7 and somehow decided to test X11. So I installed gedit – just because I though it would be a good x-app test – and it would not display properly on my x-server replacing all character with an empty square █

I solved the issue by installing the DejaVu fonts on my box.

yum install dejavu-lgc-sans-fonts
Advertisements

Add EMC Storage – PowerPath Driven – on Server 2012 R2 Core or Hyper-V 2012 R2 (well core as well)

For this recipe you will need:

  • 1 LUN (setup in a storage group that holds the server)
  • 1 PowerPath (here after PP) Key
  • 1 Diskpart

First, locate your latest PP bundle and install in CLI mode.

PS C:\windows\system32> etsn ptbtt-go-hv
[ptbtt-go-hv]: PS C:\> ls
Directory: C:\
Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        11/21/2014   2:46 PM            logs
-a---         5/15/2014   4:45 PM   92347200 EMCPower.X64.signed.5.7.SP3.b509.exe

[ptbtt-go-hv]: PS C:\> EMCPower.X64.signed.5.7.SP3.b509.exe /s /v"/L*v C:\logs\PPsetup.log LICENSENUM=BUPJ-XB4E-LFC3-QYPY-MM92-QDWB NO_REBOOT=1"

Once finished you can log there to see if  all was successful.

[ptbtt-go-hv]: PS C:\logs> Get-Content .\PPsetup.log | Select-String "Installation completed successfully"

MSI (s) (E4:94) [14:48:24:606]: Product: EMC PowerPath 5.7 Service Pack 3 (64bit) -- Installation completed
successfully.

Hooray? well, go play with PowerMT.exe

[ptbtt-go-hv]: PS C:\> cd 'C:\Program Files\EMC\PowerPath'
[ptbtt-go-hv]: PS C:\Program Files\EMC\PowerPath> ls
Directory: C:\Program Files\EMC\PowerPath
Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        11/21/2014   2:47 PM            Drivers
d----        11/21/2014   2:53 PM            Logs
d----        11/21/2014   2:47 PM            x86
-a---          2/7/2013   1:08 PM      17728 db_recover.exe
-a---         11/1/2010   4:13 AM        385 db_recover.exe.intermediate.manifest
-a---        11/24/2010   2:04 AM     531512 difxapi.dll
-a---          2/7/2013   1:10 PM      49472 EmcAdminProxy.dll
-a---         5/15/2014   5:20 PM    1125184 EmcAdminSvr.exe
-a---          2/7/2013   1:12 PM     516416 EmcLicTool.exe
-a---          2/7/2013   1:13 PM      27456 EmcLicTool_CHS.dll
-a---          2/7/2013   1:14 PM      27968 EmcLicTool_DEU.dll
-a---          2/7/2013   1:15 PM      27968 EmcLicTool_ESP.dll
-a---          2/7/2013   1:15 PM      27968 EmcLicTool_FRA.dll
-a---          2/7/2013   1:16 PM      27968 EmcLicTool_ITA.dll
-a---          2/7/2013   1:17 PM      27456 EmcLicTool_JPN.dll
-a---          2/7/2013   1:17 PM      27456 EmcLicTool_KOR.dll
-a---          2/7/2013   1:18 PM      27968 EmcLicTool_PTB.dll
-a---          2/7/2013   1:20 PM      29504 emcphostid.exe
-a---          2/7/2013   1:20 PM      27968 EmcpLogMsgs.dll
-a---         5/15/2014   5:20 PM    1117504 EmcpMgmtComp.exe
-a---         5/15/2014   5:20 PM     494400 EmcPowerPathAdmin.dll
-a---         5/15/2014   5:20 PM      39232 EmcPowMon.exe
-a---          2/7/2013   1:24 PM      31552 EmcPowPN22.dll
-a---          2/7/2013   1:25 PM      21312 EmcPowRes.dll
-a---         5/15/2014   5:20 PM     869696 EmcPowSrv.exe
-a---          2/7/2013   1:26 PM      39232 EmcpPerfmonPmiPrvdr.dll
-a---          2/7/2013   1:27 PM      36160 emcpreg.exe
-a---          2/7/2013   1:28 PM      10048 EmcpSvcErr.dll
-a---          2/7/2013   1:28 PM      26432 emcp_lic_rtl.dll
-a---         5/15/2014   5:20 PM    1137472 Emcp_mpapi_rtl.dll
-a---          2/7/2013   1:31 PM      91968 emcp_mp_rtl.dll
-a---         6/10/2003  10:00 PM      43430 Emc_PowerPath_Console.msc
-a---          2/7/2013   1:33 PM    1404224 libdb51.dll
-a---         11/1/2010   4:14 AM        385 libdb51.dll.intermediate.manifest
-a---         5/15/2014   5:20 PM    1748480 Libeay32.dll
-a---         5/15/2014   5:20 PM     303424 ManagementComp_Config.exe
-ar--        11/21/2014   3:38 PM         22 mpaa.excluded
-ar--        11/21/2014   3:38 PM        244 mpaa.lams
-a---         5/15/2014   5:20 PM     332608 powermig.exe
-a---         5/15/2014   5:20 PM     270144 powermigcl.exe
-a---         5/15/2014   5:20 PM    1181504 powermt.exe
-a---        12/18/2012   6:12 PM      23639 powerpath.man
-a---         5/15/2014   5:20 PM     304448 PowMigSrvc.exe
-a---         5/15/2014   5:20 PM     222016 ppinstall.exe
-a---         5/15/2014   5:20 PM     490304 ppRemoveAll.exe
-a---          2/7/2013   1:49 PM      55104 pthreadVC2.dll
-a---         5/15/2014   5:20 PM       5279 server.pem
-a---         5/15/2014   5:20 PM     360448 Ssleay32.dll

Found powermt, let’s use it.

[ptbtt-go-hv]: PS C:\Program Files\EMC\PowerPath> .\powermt.exe display dev=all
Pseudo name=harddisk1
VNX ID=APM00141276882 [TTBTT-GO-HV_SG]
Logical device ID=6006016009B03800F71D7ED4B571E411 [FSP_LUN31_SPB_6882_PTBTT-GO-HV_X_200G]
state=alive; policy=CLAROpt; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 4
==============================================================================
--------------- Host ---------------   - Stor -  -- I/O Path --   -- Stats ---
###  HW Path               I/O Paths    Interf.  Mode     State   Q-IOs Errors
==============================================================================
2 port2\path0\tgt1\lun0  c2t1d0      SP A3    active   alive      0      0
2 port2\path0\tgt0\lun0  c2t0d0      SP A2    active   alive      0      0
1 port1\path0\tgt1\lun0  c1t1d0      SP B3    active   alive      0      0
1 port1\path0\tgt0\lun0  c1t0d0      SP B2    active   alive      0      0

Looks like you see your disk? Expose it to windows for storing let’s VMs – this is pretty useful for hyper-v hypervisor!

[ptbtt-go-hv]: PS C:\Program Files\EMC\PowerPath> diskpart
Microsoft DiskPart version 6.3.9600
Copyright (C) 1999-2013 Microsoft Corporation.
On computer: PTBTT-GO-HV
DISKPART>
[ptbtt-go-hv]: PS C:\Program Files\EMC\PowerPath> exit

Sometimes powershell session don’t play nice with output redirection and things like diskpart from let you in the interactive mode. Fear not, use psexec instead and use diskpart to create that disk.

PS H:\> cd .\Tools\sysinternals
PS H:\Tools\sysinternals> .\psexec.exe \\ptbtt-go-hv cmd
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Windows\system32>diskpart
Microsoft DiskPart version 6.3.9600
Copyright (C) 1999-2013 Microsoft Corporation.
On computer: PTBTT-GO-HV
DISKPART> list disk
Disk ###  Status         Size     Free     Dyn  Gpt
--------  -------------  -------  -------  ---  ---
Disk 0    Online          135 GB      0 B
Disk 1    Offline         200 GB   200 GB
DISKPART> select disk 1
Disk 1 is now the selected disk.
DISKPART> online disk
DiskPart successfully onlined the selected disk.
DISKPART> list disk
Disk ###  Status         Size     Free     Dyn  Gpt
--------  -------------  -------  -------  ---  ---
Disk 0    Online          135 GB      0 B
* Disk 1    Online          200 GB   200 GB
DISKPART> select disk 1
Disk 1 is now the selected disk.
DISKPART> list volume
Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
----------  ---  -----------  -----  ----------  -------  ---------  --------
Volume 0     E   IRM_SHV_X64  UDF    CD-ROM      1917 MB  Healthy
Volume 1     D   RECOVERY     NTFS   Partition   3072 MB  Healthy
Volume 2         System Rese  NTFS   Partition    350 MB  Healthy    System
Volume 3     C                NTFS   Partition    132 GB  Healthy    Boot
DISKPART> create partition primary

DiskPart has encountered an error: The media is write protected.
See the System Event Log for more information. 

Oops, I am not sure what a a disk is defaulted to read-only. Let’s change it manually.

DISKPART> attributes disk
Current Read-only State : Yes
Read-only  : Yes
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

DISKPART> attributes disk clear readonly

Disk attributes cleared successfully.

DISKPART> list disk

Disk ###  Status         Size     Free     Dyn  Gpt
--------  -------------  -------  -------  ---  ---
Disk 0    Online          135 GB      0 B
* Disk 1    Online          200 GB   200 GB

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> list volume

Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
----------  ---  -----------  -----  ----------  -------  ---------  --------
Volume 0     E   IRM_SHV_X64  UDF    CD-ROM      1917 MB  Healthy
Volume 1     D   RECOVERY     NTFS   Partition   3072 MB  Healthy
Volume 2         System Rese  NTFS   Partition    350 MB  Healthy    System
Volume 3     C                NTFS   Partition    132 GB  Healthy    Boot
* Volume 4                      RAW    Partition    199 GB  Healthy

DISKPART> select volume 4

Volume 4 is the selected volume.

DISKPART> format fs=ntfs quick

100 percent completed

DiskPart successfully formatted the volume.

DISKPART> list volume

Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
----------  ---  -----------  -----  ----------  -------  ---------  --------
Volume 0     E   IRM_SHV_X64  UDF    CD-ROM      1917 MB  Healthy
Volume 1     D   RECOVERY     NTFS   Partition   3072 MB  Healthy
Volume 2         System Rese  NTFS   Partition    350 MB  Healthy    System
Volume 3     C                NTFS   Partition    132 GB  Healthy    Boot
* Volume 4                      NTFS   Partition    199 GB  Healthy

DISKPART> assign letter=f

DiskPart successfully assigned the drive letter or mount point.

DISKPART> list volume

Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
----------  ---  -----------  -----  ----------  -------  ---------  --------
Volume 0     E   IRM_SHV_X64  UDF    CD-ROM      1917 MB  Healthy
Volume 1     D   RECOVERY     NTFS   Partition   3072 MB  Healthy
Volume 2         System Rese  NTFS   Partition    350 MB  Healthy    System
Volume 3     C                NTFS   Partition    132 GB  Healthy    Boot
* Volume 4     F                NTFS   Partition    199 GB  Healthy

DISKPART> exit

Leaving DiskPart...

C:\Windows\system32>f:
f:


F:\>mkdir "Virtual Machines"
mkdir "Virtual Machines"

F:\>dir
dir
Volume in drive F has no label.
Volume Serial Number is 6C59-E0A3

Directory of F:\

11/21/2014  03:49 PM    <DIR>          Virtual Machines
0 File(s)              0 bytes
1 Dir(s)  214,617,317,376 bytes free


cmd exited on ptbtt-go-hv with error code 0.
PS H:\Tools\sysinternals>

add a permanent rule on firewalld

Just started with using centos 7 and they adopted the fedora firewall instead of iptables.

Get the default zone, this is usually “public”:

firewall-cmd --get-active-zones

List services on that zone:

firewall-cmd --zone=public --list-all

Add required TCP ports (let’s do port 80):

firewall-cmd --permanent --zone=public --add-port=80/tcp

You could restart the firewall for them to take affect, or set the rules again without the –permanent option to add them dynamically.

Restart firewall:

systemctl restart firewalld.service

You can also specify services, rather than ports if you like.

sudo firewall-cmd --permanent --zone=public --add-service=http

You’re done!