A problem today with backing up Raw Mapped Disks (RMDs) using the latest version of esxpress (which followers of this blog will know I am seriously impressed with).
If you have an RMD which you want to back up (ie, you are running it in ESX virtual mode, not physical mode) it can sometimes fail, and cause the whole machine backup to fail.
Some machines seem to work fine and others always fail. Weird one!
Anyway, it seems that there's something new about change block tracking that requires the RMD file (the vmdk file that sits on the VMFS volume and looks like it's the whole size of the RMD but actually just maps straight to the RMD) to fit within the block size of the volume you're using.
This hasn't been a problem before, but now you need to make sure that your VM sits on a volume with a suitable blocksize. For ease, I am now setting all volumes to a blocksize of 8Mb (which gives 2TB of addressable space). The small number of files that go to make up a VM mean that isn't as inefficient at it sounds, and may really help you later.
I had to live migrate the VMs to another volume, delete and recreate the volume, this time using 8Mb blocks, then migrate the machine back. Not ideal and a real waste of time, but now it backs up nicely.
N
Monday, 6 September 2010
Friday, 3 September 2010
SQL - using DISTINCT on only some columns
OK - so the need arose today to use an SQL DISTINCT command, but only be distinct on some columns.
That meant that the non-distinct columns would normally more than one row, and obviously since we're asking for distinct, that data is irrelvant in this case. We could, of course, create a new view that only shows the columns we need distinct, and that's probably the best way.
However, since we have hundreds of views already, I wanted to reuse an existing view (and existing code). To to this you need to group the data by the fields that you want to be distinct. The other field's data could be any of the possible rows, so use the MAX(fieldname) function to return the highest value.
So, to get a list of all students but ignore multiple tutors (and just return one, random tutor - in fact the one with the highest name) you get something like this:
select PersonalID, Name, max(TutorName) from Table
Group By PersonalID, Name
Order By Name
That meant that the non-distinct columns would normally more than one row, and obviously since we're asking for distinct, that data is irrelvant in this case. We could, of course, create a new view that only shows the columns we need distinct, and that's probably the best way.
However, since we have hundreds of views already, I wanted to reuse an existing view (and existing code). To to this you need to group the data by the fields that you want to be distinct. The other field's data could be any of the possible rows, so use the MAX(fieldname) function to return the highest value.
So, to get a list of all students but ignore multiple tutors (and just return one, random tutor - in fact the one with the highest name) you get something like this:
select PersonalID, Name, max(TutorName) from Table
Group By PersonalID, Name
Order By Name
Subscribe to:
Posts (Atom)