Tuesday, August 26, 2014

Reveal File System of WD My Cloud

This page reveals the file system of the cloud HDD product, WD My Cloud. I poof that the product is just a mini PC with HDD where Linux installing. The page teaches us to use linux commands (df, fdisk, parted, mdadm) to reveal the secret.


I suppose the product is a mini PC. To proof it, I create a file, aa.txt in /etc/samba.

  > echo aaa > aa.txt
  
> shutdown -r now  

The aa.txt still exists after restarting. Therefore the rootfs is in HDD and the assumption is proofed.


Let's use df -ahT command to report file system. We make sure that sda4 is a partition in a HDD. We are interested in rootfs and /dev/root.

df
     -a     include dummy file systems
     -h     print size in human readable format
     -T     print file system type




The following commands show that the /dev/root is linked to a device named md1. So the next question is what/where is md1.

  > ls -al /dev/root                                    
  lrwxrwxrwx 1 root root 3 Aug 26 03:05 /dev/root -> md1
  > ls -al /dev/md1                                     
  brw-rw---T 1 root disk 9, 1 Aug 26 03:05 /dev/md1     


Please use fdisk -l to list partition tables. It appears that the HDD is parted as GPT.


Therefore we change to use parted -l to get more information of the partition tables on all block devices. It apears that ,sda1 and sda2 partitions are combined as RAID, and md1 is a RAID with 2048M bytes. We suppose that md1 is composed of sda1 and sda2 partitions.


We use mdadm --detail /dev/md1 to proof the assumption. The sda1 and sda2 partitions are combined as RAID named md1 where is rootfs.


We can use the following commands to get more information for each partition.
fdisk /dev/sda
fdisk /dev/sda1
fdisk /dev/sda2
fdisk /dev/sda3
fdisk /dev/sda4

1 comment:

  1. I have a broken MyCloud Mirror showing:

    Number Major Minor RaidDevice State
    0 8 1 0 active sync /dev/sda1
    1 8 17 1 active sync /dev/sdb1

    Can this be fixed? If so how? I would gladly pay to learn or have someone do it... Sent you a request on Hangouts.

    ReplyDelete