Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

How to read Windows SBS2008 volume name from Linux

I have a Western Digital USB drive attached to my SBS 2008 computer. I use this drive for backups. The volume is shared and is named "Castor".

I have this drive cifs mounted from a linux host in the LAN. I want to access the volume name for backup logging purposes. An "ls -l" of this volume from Linux gives:

drwxrwxrwx 1 root root          0 2009-10-05 14:40 System\ Volume\ Information/

as a directory supposedly containing the volume name, further supposedly in Windows format. However, I cannot see the contents of this folder. I get a permission error:

> ls /offsite/System\ Volume\ Information/
/bin/ls: reading directory /offsite/System Volume Information/: Permission denied

How can I see the volume name of this drive?
Avatar of Philip Elder
Philip Elder
Flag of Canada image

SBS 2008 native backup only supports a directly connected USB drive. That is, a cable is connected between the drive and the server. SBS backup is then configured to use that drive as a destination.

Once that process has completed the drive becomes essentially useless to all other systems except the SBS server.

You could possibly use the native Windows Server 2008 backup to back up to a network share on that drive but this is not supported.

Third party backup software is another method.

Philip
Avatar of Mark
Mark

ASKER

Sorry I confused the issue by mentioning "backup". This question has nothing to do with backup. The drive is not used by SBS backup, nor was it ever formatted or name by SBS backup. Btw - I am using a 3rd party backup program (Acronis), but I repeat, this drive has nothing to do with that sort of backup and the Acronis backup is NOT going to that drive.

It is a normal 'ole 5TB, USB drive. I named the volume myself using Windows, Computer > right click on device > rename.

So, my question is, how do I read the volume label created BY WINDOWS on this drive from Linux? I want to read the volume name because I want to detect when the user switches drives.

Also, please don't respond with solutions having to do with creating another file on the drive from Linux (or wherever) that I can read. I am already doing that and for various reasons I want to be able to read the actual volume name, not an artificially created substitute.

THX
Although I have not completely understand what are you trying to do, you are looking for a way to see what is the name of this external drive from linux?! If that is the case, then please clarify what Linux distribution are you using? When you say that you have CIFS mounted the drive you mean through SMB (smbmount) or what?

In general what is see is that the error you get is logical, since the System Volume Information folder is a system folder. After all I don't understand why you need to access this folder since (and I copy from Microsoft site) "The System Volume Information folder is a hidden system folder that the System Restore tool uses to store its information and restore points. There is a System Volume Information folder on every partition on your computer."
Avatar of Mark

ASKER

I am using the slackware distribution, kernel 2.4.29. cifs is similar to smb, but is newer (as I understand) and works for large files whereas smb can only handle files of 2GB. See https://www.experts-exchange.com/questions/26400199/how-to-copy-large-files-from-to-smbfs-file-system.html?cid=1575&anchorAnswerId=33427077#a33427077 for the discusion on this.

Why I want to do this isn't that interesting. This is a USB drive connected to SBS 2008 and I basically want to detect when someone changes the drive. I can create little tag files on the drive(s), but I'd really rather read the volume lable.

Windows creates the System Volume Information folder, as you say. I want to read the info in that folder from Linux. Surely there is a way.
IIRC, because that folder is a system folder it cannot be touched at the user level.

Philip
By "change the drive" you mean putting an other drive or changing the drive contents. If it's the first, then why don't you use different drive names from drive 1 and drive 2. If it is the second one, then you could propably use a script to check the time a file was last modified.
In any case I don't think there is a way to check the contents of the System Volume directory.
Avatar of Mark

ASKER

sorry about the delay in responding. webSynthesis: yes, by "changing the drive" I mean your first scenario: putting another drive. Your suggestion: "use different drive names" is exactly what I'm doing. Each of the drives has a different name. Now the trick is to be able to read that name! How do I do that? The name appears to be kept in the System Volume directory, which I can't seem to read.
ASKER CERTIFIED SOLUTION
Avatar of webSynthesis
webSynthesis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

OK, webSynthesis, I will throw in the towel on this. If it is impossible to read the Windows volume name I'll accept that. In fact, I had been doing something quite similar to your solution using a plain 'ole file to hold the name, so I will keep that as the solution.

Thanks!