Wednesday, July 25, 2012

Mouning Readynas Drives on X86 systems

http://home.bott.ca/webserver/?p=306

copied here for archival

Update – Thanks to Peter Schlesinger in the comments section below:
Simple step by step guide to mounting Sparc-based ReadyNAS Drives in x86-based Linux:
Tested on brand new install of Ubuntu 10.10 (32bit x86), no other dependencies- 23rd Jan 2011
In a terminal window:
(1) sudo su
(2) apt-get install fuseext2
(3) apt-get install lvm2
(4) modprobe fuse
(5) vgscan
(6) vgchange -ay c
(7) fuseext2 -o ro -o sync_read /dev/c/c /mnt
That’s it!!!
You can now see the mounted files in the /mnt directory
(NB: Without the “-o sync_read” option to fuseext2 I had problems with copying large files. It kept saying the source file wasn’t found. After adding this option everything worked fine).
************************************************
Original Post
When the ReadyNAS developers changed the default block size in RAIDiator 4.x to 16 KB (from 4 KB in version 3.x), there was concern from the community that users would be unable to mount drives from a failed ReadyNAS into a Linux computer.  The concern is that the ReadyNAS Duo, NV+, X6, 600 & 1100 use a Sparc-based processor and that an x86-based PC cannot read 16 KB blocks.  One of the developers, Skywalker, has provided some details and I have taken the liberty of editing his posts into an easy-to-follow step-by-step set of instructions.

Quoting Skywalker:

There is no “proprietary” filesystem running on any ReadyNAS.  It is “straight”, ordinary, unmodified EXT3.  You can even run all the e2fsprogs (debugfs, e2fsck, etc) on a 16KB ReadyNAS filesystem on a standard Linux PC with no modifications.  Mounting a 16KB ReadyNAS filesystem on an x86 PC requires about the same amount of work as mounting an NTFS filesystem read/write on Linux — using a FUSE driver to mount it.
The ext2fuse driver won’t come on any LiveCDs,  so you’d need a full distro running with the necessary build tools installed.
Ubuntu, Fedora, Debian… it doesn’t really matter.  Once you get those installed, you need to get the ext2fuse source code from sourceforge.net.
  1. Using Debian, you can install the build tools by issuing the following command as root:
  2. apt-get install build-essential
  3. Download the ext2fuse package and extract it:
  4. tar xvzf ext2fuse-src-0.8.1.tar.gz
  5. Change to the directory of the extracted program
  6. Run the following command:
  7. ./configure
  8. Before compiling, open src/Makefile in an editor.
  9. Remove the lines that look like this:
  10. ext2fuse_DEPENDENCIES = ../lib/et/libcom_err.a \
    ../lib/ext2fs/libext2fs.a

  11. Change this line:
  12. ext2fuse_LDADD = ../lib/et/libcom_err.a ../lib/ext2fs/libext2fs.a
  13. To this:
  14. ext2fuse_LDADD = -lcom_err -lext2fs
  15. Then build the executable by running make:
  16. make
  17. Next, install the package by running make install:
  18. make install
  19. After compiling and installing the package, you’ll need to load the fuse module:
  20. modprobe fuse
  21. Next, run the following commands to recover the volume group information and then activate it:
  22. vgscan
    vgchange -ay c

  23. Create a directory to mount the array:
  24. mkdir /mnt/lvm
  25. Mount the array:
  26. ext2fuse /dev/c/c /mnt/lvm
  27. If successful, you should see:
  28. /dev/c/c is to be mounted at /mnt/lvm
    fuse-ext2 initialized for device: /dev/c/c
    block size is 16384

  29. At this point, your ReadyNAS data volume should be mounted on /mnt/lvm and you should be able to access your data.
I haven’t tried this myself (I gave my NV+ to my dad), but welcome any feedback on making it better.
Update (May 22, 2010) – Have a look at this for additional information:
http://greyproc.blogspot.com/2010/04/readynas-600-raid-recovery-with-ubuntu.html

Alternative Method

If you are trying to recover data from a Duo (or from a disk with only 1 or 2 disks in the array), then you may be able to recover the data using the following method:
  1. Connect your faulty disk to PC using a SATA to USB cable
  2. Download, install & run the free software R-Linux from www.r-tt.com
  3. Copy the recovered data from the faulty disk

13 Responses to “Mounting Sparc-based ReadyNAS Drives in x86-based Linux”

  1. dbott Says:
    October 29th, 2009 at 11:18 am
    User dekkit at the ReadyNAS forums has built a VMWare image that can mount drives from a ReadyNAS in a USB enclosure:
    http://www.readynas.com/forum/viewtopic.php?f=11&t=35153
  2. jastronomy Says:
    May 19th, 2010 at 9:13 am
    root@PC038:/tmp/ext2fuse-src-0.8.1/src# make
    if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/fuse -I/usr/local/include/fuse -I../lib -I../lib/et -I../lib/ext2fs -D_FILE_OFFSET_BITS=64 -g -O2 -MT ext2fuse-readdir.o -MD -MP -MF “.deps/ext2fuse-readdir.Tpo” -c -o ext2fuse-readdir.o `test -f ‘readdir.c’ || echo ‘./’`readdir.c; \
    then mv -f “.deps/ext2fuse-readdir.Tpo” “.deps/ext2fuse-readdir.Po”; else rm -f “.deps/ext2fuse-readdir.Tpo”; exit 1; fi
    In file included from readdir.c:1:
    readdir.h:6:27: error: fuse_lowlevel.h: No such file or directory
    In file included from readdir.c:1:
    readdir.h:8: error: expected ‘)’ before ‘req’
    readdir.c:7: error: expected ‘)’ before ‘req’
    readdir.c:46: error: expected ‘)’ before ‘req’
    make: *** [ext2fuse-readdir.o] Error 1
  3. apnea Says:
    May 29th, 2010 at 10:42 pm
    Thanks dbott – very useful and clear site! Currently backing up thousands of pics off my 3 NAS drives from an Ubuntu box :-)
    I managed to bypass the compilation step by using an older pre-built ext2fuse 0.5 from here:
    http://www.jamesandclare.net/2009/12/06/mounting-readynas-duo-drives-in-ubuntu/
    Best
    apnea
  4. dbott Says:
    May 31st, 2010 at 3:13 pm
    From the blog linked to above:
    Choosing a NAS solution where you can’t mount the storage media outside of the NAS is asking for trouble. I was worried I’d made the wrong choice when I found that mounting the ReadyNAS do ext3 drives is not trivial, mainly because they use a 16kb block size with their SPARC cpus.
    A bit of routing around found various solutions, but the one which worked for me was as follows.
    1. Fire up ubuntu vm (running on OS X for me and in my case 9.10 Karmic)
    2. install lvm2 using: apt-get install lvm2
    3. Download ext2fuse 0.5 (from here for example)
    http://linux.softpedia.com/progDownload/ext2fuse-Download-29820.html
    http://sourceforge.net/projects/ext2fuse/files/ext2fuse/0.5/ext2fuse-0.5.src.tgz/download
    4. run vgscan to locate drives
    5. vgchange -ay c to allow access to drive
    6. mkdir /mnt/lvm
    7. ext2fuse /dev/c/c /mnt/lvm (where ext2fuse will have been downloaded)
    8. drive can now be accessed on /mnt/lvm
  5. Relic Says:
    January 10th, 2011 at 7:50 pm
    ext2fuse is no longer active and apparently redundant based on comments on the project itself. It seems to be superseded by a another project called fuse-ext2.
    I’m using ubuntu 10.10 and I found a ‘fuseext2′ package in the repository and it worked with no problems. Although it complained that it’s experimental and to only use write option at your own risk, and so because I only need this to get my data off the disk I simply mounted it are read only:
    fuseext2 -o ro /dev/c/c /mnt/lvm/
  6. Peter Schlesinger Says:
    January 22nd, 2011 at 9:48 pm
    Simple step by step guide to mounting Sparc-based ReadyNAS Drives in x86-based Linux:
    Tested on brand new install of Ubuntu 10.10 (32bit x86), no other dependencies- 23rd Jan 2011
    In a terminal window:
    (1) sudo su
    (2) apt-get install fuseext2
    (3) apt-get install lvm2
    (4) modprobe fuse
    (5) vgscan
    (6) vgchange -ay c
    (7) fuseext2 -o ro -o sync_read /dev/c/c /mnt
    That’s it!!!
    You can now see the mounted files in the /mnt directory
    (NB: Without the “-o sync_read” option to fuseext2 I had problems with copying large files. It kept saying the source file wasn’t found. After adding this option everything worked fine).
  7. Brian Ost Says:
    February 6th, 2011 at 6:58 am
    Hi
    I’v tried to mount a disk from a 2 disk Duo with Ubuntu 10.10. vgscan dosent locate the disk but I can se it in the diskutility. How can I find the name of the disk so that I can run “vgchange -ay c” ?
  8. Richard Millington Says:
    March 30th, 2011 at 6:01 am
    Thanks. Peter Schlesinger’s method works fine for me in LinuxMint 9, even though (4) modprobe fuse returned an error.
    Installed fuseext2 and lvm2 from the repositories.
    In terminal ran 5,6, and 7.
    Copy needed files.
    Change owner. (Copied files will be root)
    chown -R (user) /home/user/folder_name
    May need to changed permissions also.
    chmod -R a=rwx /home/user/folder_name
    Maybe Peter Schlesinger could make this a ‘sticky’ in the ReadyNas forums.
    Again – Thanks
  9. Mathias Says:
    March 30th, 2011 at 9:58 am
    @Brian Ost
    did you found a solution? I have the same problem.
  10. Bilal Says:
    April 3rd, 2011 at 9:30 am
    Hi, just like ext2fuse, fuseex2 on Ubuntu 10.10 is not allowing me to copy files > 4GB onto another ext3 system. The portion of file >4gb is rewritten from the start, so that files never end up greater than 4GB.
    Has anyone managed to work around this? I tried compiling fuse-ext2-0.0.7 on Ubuntu, but the compile doesn’t produce an executable. The changelog said it had fixed the >4gb problem
  11. Brian Ost Says:
    April 10th, 2011 at 3:13 pm
    Hi Mathias
    The free software for windows “R-Linux” did the job for me.
    http://www.r-tt.com/free_linux_recovery/
    It took some time for it to scan my disk, but it found all my data with folders and the right file names and extensions.
    Try it !!
  12. Maurice Says:
    April 12th, 2011 at 7:17 am
    @Peter Schlesinger ,
    Brian Ost has already said:
    “vgscan dosent locate the disk but I can see it in the diskutility. How can I find the name of the disk so that I can run “vgchange -ay c” ?”
    What are we doing wrong?
    Do we have to make Local Volumes?
    I used fresh installed Ubuntu 10.04 LTS
  13. Frederic Says:
    April 30th, 2011 at 12:03 am
    The method doesn’t work for me.
    The vgscan doesn’t detect my drive.
    # vgscan
    Reading all physical volumes. This may take a while…
    #
    When I try to mount it manually the system return to me:
    # mount /dev/sdb1 /mnt/lvm
    mount: unknown filesystem type ‘linux_raid_member’
    This drive was used previously as RAID but not in my last configuration.
    Have you any idea to help me to mount this drive? Something is wrong with vgscan but I don’t know what.

Wednesday, July 18, 2012

NTP tips

setting time with ntp and other tools.

http://www.linuxhomenetworking.com/

see if ntp running:  pgrep ntpd

stop service if running:  service ntpd stop

set from known server  ntpdate -u  64.250.177.145

Determining If NTP Is Synchronized Properly:  ntpq -p


ntpd notes


http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1339


service ntpd stop
ntpdate <server>
ntpq -p
servers
0.vmware.pool.ntp.org
1.vmware.pool.ntp.org
2.vmware.pool.ntp.org 

Saturday, July 7, 2012

Symantec anti virus removal

Symantic anti-virus client removal when there is a password required is accomplished as in this article.

article

1. Open Registry Editor (regedit).
2. Navigate to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusPro tect6\CurrentVersion\Administrator Only\Security\

3. Change the value for useVPuninstallpassword key from 1 to 0.
4. Exit Registry Editor and now you can uninstall Symantec AntiVirus Client.

Thursday, July 5, 2012

vmware esxi network adapters

vmware

vlance, vmxnet, flexible, e1000, e1000e, vmxnet2, vmxnet3

Available Network Adapters
Only those network adapters that are appropriate for the virtual machine you are creating, are available configuration options in the Choose Networks window.
  • Vlance — An emulated version of the AMD 79C970 PCnet32- LANCE NIC, an older 10Mbps NIC with drivers available in most 32-bit guest operating systems except Windows Vista and later. A virtual machine configured with this network adapter can use its network immediately.
  • VMXNET — The VMXNET virtual network adapter has no physical counterpart. VMXNET is optimized for performance in a virtual machine. Because operating system vendors do not provide built-in drivers for this card, you must install VMware Tools to have a driver for the VMXNET network adapter available.
  • Flexible — The Flexible network adapter identifies itself as a Vlance adapter when a virtual machine boots, but initializes itself and functions as either a Vlance or a VMXNET adapter, depending on which driver initializes it. With VMware Tools installed, the VMXNET driver changes the Vlance adapter to the higher performance VMXNET adapter.
  • E1000 — An emulated version of the Intel 82545EM Gigabit Ethernet NIC. A driver for this NIC is not included with all guest operating systems. Typically Linux versions 2.4.19 and later, Windows XP Professional x64 Edition and later, and Windows Server 2003 (32-bit) and later include the E1000 driver.

    Note: E1000 does not support jumbo frames prior to ESX/ESXi 4.1.
  • E1000e - This feature emulates a newer model of Intel gigabit NIC (number 82574) in the virtual hardware. This is known as the "e1000e" vNIC. e1000e is available only on hardware version 8 (and newer) VMs in vSphere5. It is the default vNIC for Windows 8 and newer (Windows) guest OSes. For Linux guests, e1000e is not available from the UI (e1000, flexible vmxnet, enhanced vmxnet, and vmxnet3 is available for Linux).

  • VMXNET 2 (Enhanced) — The VMXNET 2 adapter is based on the VMXNET adapter but provides some high-performance features commonly used on modern networks, such as jumbo frames and hardware offloads. This virtual network adapter is available only for some guest operating systems on ESX/ESXi 3.5 and later.

    VMXNET 2 is supported only for a limited set of guest operating systems:

    • 32- and 64-bit versions of Microsoft Windows 2003 (Enterprise, Datacenter, and Standard Editions).

      Note: You can use enhanced VMXNET adapters with other versions of the Microsoft Windows 2003 operating system, but a workaround is required to enable the option in VMware Infrastructure (VI) Client or vSphere Client. See
      Enabling enhanced vmxnet adapters for Microsoft Windows Server 2003 (1007195) if Enhanced VMXNET is not offered as an option.
    • 32-bit version of Microsoft Windows XP Professional
    • 32- and 64-bit versions of Red Hat Enterprise Linux 5.0
    • 32- and 64-bit versions of SUSE Linux Enterprise Server 10
    • 64-bit versions of Red Hat Enterprise Linux 4.0
    • 64-bit versions of Ubuntu Linux
    In ESX 3.5 Update 4 or higher, these guest OS are also supported:
    • Microsoft Windows Server 2003, Standard Edition (32-bit)
    • Microsoft Windows Server 2003, Standard Edition (64-bit)
    • Microsoft Windows Server 2003, Web Edition
    • Microsoft Windows Small Business Server 2003
Note: Jumbo Frames are not supported in the Solaris Guest OS for VMXNET 2.
  • VMXNET 3 — The VMXNET 3 adapter is the next generation of a paravirtualized NIC designed for performance, and is not related to VMXNET or VMXNET 2. It offers all the features available in VMXNET 2, and adds several new features like multiqueue support (also known as Receive Side Scaling in Windows), IPv6 offloads, and MSI/MSI-X interrupt delivery.

    VMXNET 3 is supported only for virtual machines version 7 and later, with a limited set of guest operating systems:
    • 32- and 64-bit versions of Microsoft Windows XP,7, 2003, 2003 R2, 2008, and 2008 R2
    • 32- and 64-bit versions of Red Hat Enterprise Linux 5.0 and later
    • 32- and 64-bit versions of SUSE Linux Enterprise Server 10 and later
    • 32- and 64-bit versions of Asianux 3 and later
    • 32- and 64-bit versions of Debian 4
    • 32- and 64-bit versions of Ubuntu 7.04 and later
    • 32- and 64-bit versions of Sun Solaris 10 U4 and later
    Notes:
    • In ESX/ESXi 4.1 and earlier releases, Jumbo Frames are not supported in the Solaris Guest OS for VMXNET 2 and VMXNET 3. The feature is supported starting with ESXi 5.0 for VMXNET 3 only.

      For more information, see Enabling Jumbo Frames on the Solaris Guest OS (2012445).
    • Fault Tolerance is not supported on a virtual machine configured with a VMXNET 3 vNIC in vSphere 4.0, but is fully supported on vSphere 4.1.