Monday, May 30, 2011

Taking file ownership

There are many reasons you could need setting file and folder ownership on a Windows file server. In my case I had to take care of the file ownership because I have been migrating our users' home folders to a NetApp volume with user quotas set. A quota is intended to limit the amount of disk space and the number of files that a particular user or group can consume. As far as I have understood, Netapp quota application mechanism is not based on home folders size but, and this is new to me, on real file ownership

In fact, as stated on the NetApp website, quota calculation of NTFS qtrees is always allocated to the user’s Windows SID. This means that the NetApp is aware of all the files that belong to a user no matter where they are located on the volume. So, even if these files are scattered about your file system and not located in a single place, the NetApp will be able to tell you exactly how much space is allocated to a Windows user (through his SID) via the "quota report" command.

Unfortunately, in my case I had robocopied all the contents and ACLs from our old Windows file server to a brand new NetApp filer and discovered that the NetApp wasn't reporting any user quota. This is due to the fact that I did not had copied the owner flag when I used Robocopy and so the filer reported that every file was owned by builtin\administrators... and that no user quotas where enforced...

File ownership tab under Windows Security
After a short investigation I found out that I had to re-apply correct file onwership for the filer to be aware of real user quota usage.

Monday, May 23, 2011

Critical Patch for ESX and ESXi 3.5 Hosts

If you are the happy owner of ESX or ESXi 3.5 boxes, the time has come to apply a specific patch to your hosts in order to be able to continue updating these after June 1st, 2011. 

The patch is not exactly the same for ESX or ESXi hosts.

For ESX apply patch ESX350-201012410-BG as indicated here. This patch for ESX hosts is a small one with a size of 11KB and it does not require you to reboot anything.

For ESXi, the situation is different. You have to install a bigger (238 MB) patch (found here) named ESXe350-201012401-I-BG and to do so all the VMs on the ESXi host must be shutdown or migrated to another host. A reboot of the ESXi host is also mandatory.

Again, this patch MUST be installed to continue patching hosts after June 1st, 2011.

Welcome to a virtual world with physical reboots.

Friday, May 20, 2011

How to enable DNS for DFSN Referrals

I have recently discovered that when you set up a DFSN path on a Windows 2008 R2 server, clients get the referrals to the linked shares with the short NETBIOS name instead of the FQDN of a fileserver.

You are probably thinking "What's the matter with that?"....

Well, this is not an issue if you have a small organization, but if you are the sysadmin for an international company with a big Active Directory forest and sites scattered around the world, it could happen that your DNS infrastructure is made up of many different suffixes (referring for instance to geographical locations such as italy.yourcompany.com or argentina.yourcompany.com).

In this cases it is unlikely that any workstation around your company has all of the tens or hundreds of DNS suffixes. So, if you try to mount a stand-alone DFS Namespace from a different site, you could get this confusing error event id 1002:

Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.

Wednesday, May 4, 2011

Ebook : WMI Query Language via PowerShell

I have just finished reading this excellent ebook about using and running WMI queries inside Powershell:


As mentioned in the author's blog post,this ebook has the following 9 chapters:
  1. Introduction
  2. Tools for the job
  3. WMI Data queries
  4. WMI Event Queries: Introduction
  5. Intrinsic Event Queries
  6. Extrinsic Event Queries
  7. Timer Events
  8. WMI Schema Queries
Happy reading, Windows sysadmins!

How to backup files to a FTP server using cURL

To easily backup files to your local FTP server directly from your bash shell, you have one simple option which requires not much work: just use cURL.

cURL, which you can find here, is a command line tool for transferring data using FTP, FTPS, HTTP, HTTPS, TELNET, TFTP and many more protocols.

# Configuration section
HOST="my_ip_address"
USER="username"
PASS="password"
PATH_REMOTE="/folder/distant"
FILENAME="/folder/local/filename"

# Data transfer
curl -T $FILENAME -u $USER:$PASS $HOST/$PATH_REMOTE

This script can be useful to backup data to another server, if used together with another gzip command that takes care of preparing the tar archive to send. Once you have run gzip, just cURL the newly created gzipped tar file up to a different server running FTP.

Nothing better than a simple solution.
Related Posts Plugin for WordPress, Blogger...