vSphere4 & NTFS – How To, and Why It’s A Bad Idea

Disclaimer: Just because you can do a thing, does not mean it is smart. What is described here is a “Bad Idea” for any number of reasons, the least of which is running non supported 3rd party code on your service console. Further, as you’ll see below, the kernel version ntfs-3g expects, is not the one the SC runs, and thus, you are taking your data into your own hands.

Now that’s out of the way… First a shot of the freshly formatted disk in Windows:

2009-06-02_0841

Cool, like so many other USB disks, it’s NTFS. While not a problem when you’re using VMware Server on Windows, when you need to ship the disk (because UPS is faster than the internet) this will be a problem for the folks at your remote colo loading the vmdk onto your ESX host.

So how do we read it? We load up ntfs-3g:

$ lwp-download http://marush.com/wp-content/uploads/2009/04/ntfs-3g-200944-el5i686.rpm
Saving to ‘ntfs-3g-200944-el5i686.rpm’…
193 KB received in 2 seconds (96.5 KB/sec)             

[root@localhost ~]# ls
ks.cfg  ntfs-3g-200944-el5i686.rpm
[root@localhost ~]# rpm -i ntfs-3g-200944-el5i686.rpm

Reading that, we’ve used lwp-download to pull down the bits from the ntfs-3g site. Curl can be used as well, if you prefer. Next we use it to mount the drive in question (pay attention to the warning!):

[root@localhost ~]# ntfs
ntfs-3g        ntfs-3g.probe  ntfsmount     
[root@localhost ~]# ntfs-3g /dev/sde1 /mnt/usb
WARNING: Deficient Linux kernel detected. Some driver features are
         not available (swap file on NTFS, boot from NTFS by LILO), and
         unmount is not safe unless it’s made sure the ntfs-3g process
         naturally terminates after calling ‘umount’. If you wish this
         message to disappear then you should upgrade to at least kernel
         version 2.6.20, or request help from your distribution to fix
         the kernel problem. The below web page has more information:
http://ntfs-3g.org/support.html#fuse26

[root@localhost ~]# mount
/dev/sde1 on /mnt/usb type fuse (rw,allow_other)

Cool, lets make sure it works (note: I got bored waiting so broke out of the dd early):

[root@localhost usb]# dd if=/dev/zero of=/mnt/usb/test bs=1MB count=300
120+0 records in
120+0 records out
120000000 bytes (120 MB) copied, 9.96755 seconds, 12.0 MB/s

[root@localhost usb]# ls -alh
total 115M
drwxrwxrwx 1 root root 4.0K Jun  2 03:08 .
drwxr-xr-x 5 root root 4.0K Jun  1 02:51 ..
-rwxrwxrwx 1 root root 115M Jun  2 03:08 test

Woot! Now remember. Use this at your own risk.

  • What is described here is a “Bad Idea” for any number of reasons, the least of which is running non supported 3rd party code on your service console. Further, as you’ll see below, the kernel version ntfs-3g expects
  • I use FAT32. I wonders whats the difference...
  • I did not test Fat32 against esx3.5/esx4. Let me know if you've run into any
    hiccups.

    -C
  • tyomitch
    Why doesn't our installation of vSphere 4.0 have lwp-download nor rpm?
  • ESX or ESXi 4?
  • No wonder I got the same errors again and again. Thanks for giving my thick-skulled head a nudge, now it all makes sense!
  • cw
    a better idea, install EXT2/3 drivers on your windows system and ship the USB disk formated ext2/3 with your vmdk's on that
  • I used the same idea and it worked for me, So I would agree here!

    Rina
  • Indeed. Indeed. Not always practical. Then again, neither is loading 3rd party RPMs.
blog comments powered by Disqus