Openfiler: Delete a Volume Group from the Commandline


Last week I decided to give Openfiler 2.3 a try. I downloaded the ISO and installed it on my “storage” box. After clicking around and having some trouble with the iscsi targer server, I did a rebuild of Openfiler. But somthing strange happend. All the volume groupes where deleted but somehow, one of the volume groups came back again. So I pressed delete volume group a several times but it wont get away :S.

So after digging around on google, I found the following site: http://tldp.org/HOWTO/LVM-HOWTO. On this page you’ll find everything about LVM.

So back to my problem with Openfiler. In the Select Volume Group you’ll find and dropdown menu with all the volume groups. Remember the group you want to delete.

image

Go to the commandline on the Openfiler box or via Putty. 

With the following command you can disable the volume group”

vgchange –a n <volume group name>

image

After disableing of the volume group, you can delete the whole volume with the following command:

vgremove <volume group name>

If you’re sure about this, you press y to continue.

image

When you go back to the Openfiler screen and pressed F5 for refreshing the browser. You’ll notice that the volume group is gone.

image

Everything is back to normal.

 

Source for the LVM commands: http://tldp.org/HOWTO/LVM-HOWTO/commontask.html

Advertisement

Release: Openfiler 2.3


image

Feature Summary

Openfiler includes support for volume-based partitioning, iSCSI (target and initiator), scheduled snapshots, resource quota, and a single unified interface for share management which makes allocating shares for various network file-system protocols a breeze.

The following are just some of the features currently available (unless indicated otherwise) in Openfiler.

  • Powerful block storage virtualization
    • Full iSCSI target support, with support for virtual iSCSI targets for optimal division of storage
    • Extensive volume and physical storage management support
    • Support for large block devices
    • Full software RAID management support
    • Support for multiple volume groups for optimal storage allocation
    • Online volume size and overlying filesystem expansion
    • Point-in-time snapshots support with scheduling
    • Volume usage reporting
    • Synchronous / asynchronous volume migration & replication (manual setup necessary currently)
    • iSCSI initiator (manual setup necessary currently)
  • Extensive share management features
    • Support for multiple shares per volume
    • Multi-level share directory tree
    • Multi-group based access control on a per-share basis
    • Multi-host/network based access control on a per-share basis
    • Per-share service activation (NFS, SMB/CIFS, HTTP/WebDAV, FTP with read/write controls)
    • Support for auto-created SMB home directories
    • Support for SMB/CIFS “shadow copy” feature for snapshot volumes
    • Support for public/guest shares
  • Accounts management
    • Authentication using Pluggable Authentication Modules, configured from the web-interface
    • NIS, LDAP, Hesiod, Active Directory (native and mixed modes), NT4 domain controller
    • Guest/public account support
  • Quota / resource allocation
    • Per-volume group-quota management for space and files
    • Per-volume user-quota management for space and files
    • Per-volume guest-quota management for space and files
    • User and group templates support for quota allocation
  • Other features
    • UPS management support
    • Built-in SSH client Java applet
  • Full industry-standard protocol suite
    • CIFS/SMB support for Microsoft Windows-based clients
    • NFSv3 support for all UNIX clients with support for ACL protocol extensions
    • NFSv4 support (testing)
    • FTP support
    • WebDAV and HTTP 1.1 support
    • Linux distribution back-end for any other customizations

Download de VA of ISO hier: http://www.openfiler.com/community/download

Double Lun IDs within ESX3 in combination with Openfiler


vmware_openfiler1.gif

The problem with OpenFiler is: it assigns LUN 0 to each volume.
If you want to use more than one LUN within ESX, it results in double LUN ID’s. ESX wants unique LUNs so you have to change the configuration of openfiler.

openfilerbug11.gif

On your openfiler box open the file /etc/ietd.conf.

openfilerbug2.gif

You see a 2-line record for each volume, and each one has Lun id 0.

openfilerbug3.gif

Change the Lun id’s to unique ascending numbers and save/close the file.

Restart the iSCSI services with the following command: service iscsi-target restart

openfilerbug4.gif

The final step, start a “Rescan” with the option “Scan for New Storage Devices”

openfilerbug5.gif

VI3 with NFS through Openfiler


vmware_openfiler1.gif

Nadat ik getest had met iSCSI wilde ook het NFS onderdeel testen. Dit werkt nog simpeler dan iSCSI. Hieronder leg ik het uit.

Als eerst open je de openfiler admin page.

Klik op Expert View dit is nodig om bij een paar essentiele opties te kunnen komen.

nfs5.gif

Nadat de Expert View is aangezet ga je naar het tabblad Services en Enable je de service NFSv3.

nfs.gif

Vervolgens open je het tabblad Volumes en maak je daar een nieuwe volume aan met als bestands systeem EXT3.

nfs11.gif

Ga daarna naar het tabblad Shares en klik op de share welke je wilt gebruiken voor NFS share. Voer daarna de onderstaande instellingen door.

nfs6.gif

nfs7.gif

Nadat alles is geconfigureerd in openfiler open je de Virtual Infrastructure client om de ESX3 server te gaan configureren.

Als eerste moet je even inloggen op het Service Console en het volgende commando uitvoeren:

esxcfg-firewall -e smbClient

Het bovenstaande commando configureerd de esx firewall zodat deze smb filesharing mogelijk maakt.

Met het onderstaande commando kun je zien of de firewall goed geconfigureerd is.

esxcfg-firewall -q

Voordat ik met NFS aan de gang ging had ik al getest met iSCSI. Omdat ik iSCSI gebruik maakt van een VMKernel port heb ik deze niet aan hoeven maken voor NFS. Let erop als je NFS voor het eerst configureerd dien je een VMKernel netwerk switch aan te maken. Dit doe je bij ConfigurationNetworking en daar voeg je een nieuwe switch toe.

Nadat je de VMKernel switch aangemaakt hebt of al geconfigureerd had. Kun je verder gaan met de volgende stap.

Klik op “Hosts & Clusters” daarna op je ESX3 host. Nu ga je naar het Tabblad Configuration en opent daar Storage (SCSI, SAN, and NFS). Klik nu op Add Storage.

De onderstaande wizard word gestart.

nfs2.gifVoeg het ip- address of dns naam in van je nfs server gevolgd door het voledige pad naam. Als laatste geef je een logische naam aan de nieuwe datastore in mijn geval was dit nfs. klik op finish om de wizard te voltooien.

nfs3.gif

VI3 with iSCSI through Openfiler


vmware_openfiler.gif

In deze guide leer je hoe eenvoudig het is om een iscsi target te configureren en deze vervolgens te koppelen met VMware ESX3 en Windows Server 2003.

Voor het configureren van de iscsi target gebruik ik openfiler. Deze software maakt het heel eenvoudig om een iscsi target op te zetten tevens kan deze software meer dan alleen als iscsi target te fungeren.

Hieronder een paar key features:

Openfiler is a Storage Management Operating System. It is powered by the Linux 2.6 kernel and Open Source applications such as Apache, Samba, LVM2, ext3, Linux NFS and iSCSI Enterprise Target. Openfiler combines these ubiquitous technologies into a small, easy to manage solution fronted by a powerful web-based management interface. Openfiler allows you to build a Network Attached Storage (NAS) and/or Storage Area Network (SAN) appliance, using industry-standard hardware, in less than 10 minutes of installation time.

De software kun je hier downloaden: openfiler tevens kun je daar ook een Virtual Appliance downloaden, deze kun je gebruiken binnen VMware software.

Na het installeren kom je in het onderstaande scherm via: https://ipaddress:446

openfiler.gif

Voor installatie tips lees de installatiehandleiding: graphical_install
Voor het configureren van openfiler lees de admin guide: admin guide

Even een paar korte tips voor het aanmaken van een iscsi target.

Stap 1: Een volume group aanmaken (Volume Group Mgmt):

openfiler1.gif

In mijn geval maak ik een volume group aan met daaran gekoppelt een hardeschijf van 15GB.

Stap 2: Een volume aanmaken (Create New Volume):

Volume Name: vmfs_lun
Volume Description vmfs storage
Required Space (MB) 10067
Filesystem type iSCSI

vervolgens maak ik nog een volume aan voor gebruik binnen Windows.

Volume Name: windows_lun
Volume Description windows storage
Required Space (MB) 10067
Filesystem type iSCSI

Overzicht:

openfiler2.gif

openfiler4.gif

Stap 3: de iSCSI target service aanzetten

Ga naar het tabblad Services en zet de service op enable

openfiler5.gif

Stap 4: het iSCSI netwerk instellen

Ga naar het tabblad General en klik daarna op Local Networks. Hier voer je het netwerk segment in wat toegang mag hebben tot de iSCSI appliance.

openfiler6.gif

In mijn geval was dit LAN 192.168.123.0 255.255.255.0 Share

Stap 5: iSCSI host access configureren

Ga terug naar het tabblad Volumes en open daarna het tabblad Volume’s properties. Vervolgens klik je op de edit knop achter het volume wat je wilt gaan aanpassen.

Hier kun je via het dropdown menu access aan of uit zetten. Druk op update om het process te voltooien.

openfiler7.gif

Nu is het zover, het is tijd om ESX zo te configureren zodat deze gebruik van iSCSI kan maken.

Stap 1:

Als eerste moet er een VMkernel port geconfigureerd worden. Deze netwerk port wordt gebruikt door de VMkernel. Zo is het mogelijk om Virtual Machines te plaatsen op iSCSI target.

Op het plaatje hieronder zie je hoe ik de VMkernel port heb geconfigureerd.

esxiscsinetwork.gif

Voor de slimme kijkers onder ons, de VMkernel staat inderdaad op 100MBit geconfigureerd. Dit heb ik zo gedaan omdat deze configuratie puur voor test doeleinden gebruikt word. Het is echter wel een vereiste om de VMkernel op 1000MBit te zetten als je van plan bent iSCSI in productie te nemen.

Stap 2: Klik op je ESX3 server en ga naar het tabblad Configuration. Klik nu op Storage adapters en vraag de properties op van de iSCSI Software Adapter. Klik vervolgens op Configure.

esxiscsi.gif

Zet het vinkje aan voor Enabled.

esxiscsi1.gif

Zoals je op het onderstaande plaatje ziet is de iSCSI Software Adapter geconfigureerd.

esxiscsi2.gif

Stap 3: Nu de iSCSI Software Adapter is geconfigureerd moet het nieuwe LUN nog zichtbaar worden. Dit doe je door rechts te klikken op iSCSI Software Adapter en klik op Rescan.

esxiscsi3.gif

Na enkele seconden verschijnt het onderstaande scherm en is het LUN gevonden. Is dit niet het geval dan is er iets fout gegaan bij het configureren in de voorgaande stappen.

esxiscsi4.gif

Stap 4: De nieuwe storage toevoegen. Klik op het tabblad Storage (SCSI, SAN, and NFS) vervolgens op Add Storage.

esxiscsi5.gif

De onderstaande wizard verschijnt. Klik op VMFS Lun gevolgt door next.

esxiscsi6.gif

Nu kun je de nieuwe storage een passende naam geven. Ik heb gekozen voor iSCSI_LUN.

esxiscsi7.gif

Bij de optie voor het formatteren laat je de defaults staan. Klik vervolgens op Finish.

esxiscsi8.gif

Het nieuwe VMFS volume is klaar voor gebruik.

esxiscsi9.gif

Ik hoop dat deze guide helder en leerzaam is geweest. Succes met VI3.