The past week has given me major troubles. I was tasked with performing a restore of a large database from our offsite storage. Upon getting the tapes back I found that their indexes were no longer available and I would need to read them in from the tapes…there were only 107 tapes. Not knowing the software well enough to accomplish this quickly I contacted support, where things began to get more…”interesting”.
After four hours on the phone I was able to determine the two tapes that would be needed to recover the 79Gb database file and started reading in the specific saveset that was needed. Two hours later I was able to start a restore, which failed. 2Gb of the restore file was missing. After another two hours on the phone with support I was told “Let’s reposition the tape. It could take a while, on newer technology I’ve seen it take an hour, on LTO1 and LTO2 drives I’ve seen it take 8 hours.” You guessed it, I have LTO2 drives. Fortunately I have a multitude of drives to reposition the tapes with so it won’t impact backups, unfortunately I have a time limit on the restore that’s fast approaching.
So what do you do when you backup your file systems? Do you simply believe that the software you backup with validates your tapes or do you test them regularly? Are you satisfied with seeing an email at the end of a backup routine stating “SUCCESS”? Then answer is simply NO. Your backups are only as good as your ability to restore from them. Keeping that in mind and all the different technologies and services available what do you choose?
For us the answer is simple. We require low cost, reliable, offsite secure data storage as do most companies nowadays. TAPE. We’ve looked into collocated services and replicated SANs with virtual tape backup but the cost far exceeds it’s benefits. Tape technology has been proven over and over for decades. There is no cost effective replacement for a good old fashioned tape, even taking into consideration the troubles it can give you. Our entire datacenter can be put onto 6 tapes costing $25 each. 4.8TB for $150.
Any good backup initiative should be followed up with an equally adequate restore plan. So next time you recommend a backup solution plan a regular restore plan to test because there’s nothing worse than spending an entire week restoring one file.
We’ve had a few customers and Open users posting about problems with machine accounts trying to access Samba shares and getting denied with:
smbd/sesssetup.c:reply_spnego_kerberos(439) Username DOM\COMPUTER1$ is invalid on this system
The “$” at the end of the account name means it’s a computer account, not a user. We’re seeing this for Citrix MetaFrame application servers on shared storage, startup scripts not stored on a DC, and several other cases.
On a Samba server joined to AD with winbind, this is easy to deal with because Samba’s winbind can treat the computer accounts just like user accounts, and assign them access to the unix filesystem with whatever backend has been configured. When a Samba server is joined with Likewise, however, the machine accounts are not visible, and the “username is invalid” message comes up.
Fortunately, Samba gives us a method to handle this, in form of the “username map” directive in /etc/samba/smb.conf. There are two ways to use this, the first is with the username map file.
In smb.conf, to simply add:
[global ]
username map = /etc/samba/smbusers
then create a file named /etc/samba/smbusers and populate it with localuser=aduser pairs, like:
COMPUTER1$ = compacct
COMPUTER2$ = compacct
CITRIXFARM1$ = citrxact
and so on. Lastly, you’ll have to add the local accounts from the pairs above:
useradd -c "Account for AD Computers to use Samba" compacct -G users -u 998
useradd -c "Account for AD Citrix Servers to use Samba" citrxact -G users -u 999
Then, whenever one of the AD computers in the list attempts to access the Samba share, it’ll be mapped to the local account.
The problem with this is when you have a lot of servers, like a Citrix MetaFrame farm, or a Windows Server 2008 R2 Remote Desktop Services farm, that may be changing frequently, because managing that file could get hard. In this case there is the username map script directive, which is added to smb.conf as:
[global ]
username map script = /usr/lib/samba/auth/machine-acct-map.pl
Then download this script and save it in /usr/lib/samba/auth/ and make it executable (chmod +x /usr/lib/samba/auth/machine-acct-map.pl). Then run:
useradd -c "Account for AD Computers to use Samba" compacct -G users -u 998
Now, all computers which access the share will be remapped to the “compacct” user, and you won’t have to manage a file for every time the server farm changes.
Get the file here.