Blue light fixed on wd mycloud, (not quite) - need to rebuild access to files1

#21

according to the dmesg your raid is working. You problem is that the Public folder is not shared.
Wait I just though an easier way to fix this problem.
cd /mnt/HD/HD_a2
mv Public Public-old
go to the dashboard and create a share Public
Now
cd /mnt/HD/HD_a2/Public-old
mv * …/Public
Now you files should be available.

#22

Let me recap because I’m kinda lost and being so close I don’t want to mess things up (Once again, I have no linux knowledge, except for the very little that I’ve learned from this ordeal)

  • I finally got blue STEADY light, but the dashboard informs that there are NO VOLUMES mounted
  • The drive is on IP address 192.168.33.103.
  • Using windows Explorer I can go to \\192.168.33.103 but I see nothing. If I type \\192.168.33.103\Public (or anything else after the IP) Windows Explorer returns an error
  • I know the data is there, in all the things I did / (was told to do), I never touched /dev/sda2, and if I boot using the USB flash drive, typing the following commands
    mkdir /mnt/sda
    mkdir /mnt/sdb
    mount /dev/sda2 /mnt/sda
    mount /dev/sdb1 /mnt/sdb
    cd /mnt/sda
    ls

I see the directory structure of my files and using cp command was able to copy one file to the pendrive. The problem is that I have nearly 1Tb of data and the biggest pendrive that I have is 8Gb…

  • I enabled SSH on MyCloud’s dashboard

  • Using PuTTY I made a ssh connection to the ip of the drive and run
    *dsmeg *
    mdadm --detail /dev/md0

  • After rac8006 analyzed the output (above, on the thread), he told me that /dev/sda2 is not mounted, so he told me to run

mkdir /mnt/HD/HD_a2
mount /dev/sda2 /mnt/HD/HD_a2
cd /mnt/HD/HD_a2/Public
ls

And, once again, I SEE THE DATA (Good)

  • Then I run
    df -h (the output is above, on the thread)
    ps -eaf|grep (output above,on the thread))
    cat /etc/samba/smb.conf (output above, on the thread)

NOW THE QUESTIONS - ALL OF THIS I did whithout turning off Mycloud, nor closing the ssh connection.
BUT NOW, I HAVE… So, before doing the next steps, should I mount and mkdir again? (do I have to run sync and reboot -f so the changes are permanent?) and to make things worst, I have 2 set of instructions that I’m not sure if I’m supposed to do one AFTER the other, or one INSTEAD of the other

INSTRUCTION 1

So, rac8006 told me first to add a the followind lines to smb.conf
[ Public ]
comment =
path = /mnt/HD/HD_a2/Public
browseable = yes
public = yes
available = yes
oplocks = yes
map archive = no
guest ok = yes
writable = yes

I’ll try doing this following his instructions as follows

With the drive booted withOUT the pendrive, I’ll open a ssh connection (pls tell me if before I have to repeat any mount & mkdir commands)
I’ll plug the USB bootable pendrive type df to find the where the pendrive is, what name does it have

cd /etc/samba
cp smb.conf /mnt/USB/ — This should copy smb.conf to the pendrive?

Next, remove the pendrive - Use notepad and add the needed lines. Plug the pendrive back to MyCloud

HOW CAN I COPY smb.conf back from the pendrive to /etc/samba?

And then? sync? reboot? nothing and just use Windows Explorer to find \192.168.33.103\Public?

INSTRUCTION 2: (Do I do this, following INSTRUCTIONS 1 or INSTEAD?)

cd /mnt/HD/HD_a2
mv Public Public-old
go to the dashboard and create a share Public
Now
cd /mnt/HD/HD_a2/Public-old
mv * …/Public

And then? sync? reboot? nothing and just use Windows Explorer to find \\192.168.33.103\Public?

Thanking all once again and again for your help!

#23

Do instruction 2. It is the easy way.

#24

OK, just Instruction 2 (Nothing of Instruction 1). I’ll do this when I get back home. BUT, since MyCloud Dashboad does not see any volumes, how can I create a share?

#25

It will create the share. Just do the steps in instruction 2.
You can do the sync then reboot. After that the share should be visible.

#26

I will try method / INSTRUCTIONS 1. Will let you know

#27

I suspect the problem is that the /mnt/HD/HD_a4 partition was zero’d out. Not sure how to reuild.
Once you modify the smb.conf file and reboot You shuld be able to map the data.

#28

Latest Update, I did everything. Using vi as an editor, the problem is that once the drive reboots, smb.conf returns to the previous state

Here’s what I did and the output.

root@WDMyCloud root # mkdir /mnt/HD/HD_a2
root@WDMyCloud root # mount /dev/sda2 /mnt/HD/HD_a2
root@WDMyCloud root # cd /mnt/HD/HD_a2/Public
root@WDMyCloud Public # cd /etc/samba
root@WDMyCloud samba # cp smb.conf smb.conf-sv
root@WDMyCloud samba # ls
msg.sock secrets.tdb smb.conf smb.conf-sv smbpasswd var

root@WDMyCloud samba # vi smb.conf-sv
veto files = /:2eDS_Store/.bin/Network Trash Folder/.systemfile/lost+found/Nas_P
workgroup = WORKGROUP
security = user
passdb backend = smbpasswd
ldap ssl = no
local master = no
os level = 0
preferred master = no
smb2 leases = yes
fruit:copyfile= yes
printing = bsd
printcap name = /dev/null
disable spoolss = yes
max protocol = SMB3
max xmit = 131072
max log size = 10
log level = 0
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=2097152 SO_SNDBUF=2097152
delete veto files = yes
unix charset = UTF8
encrypt passwords = yes
map to guest = bad user
null passwords = yes
guest account = nobody
dns proxy = no
use mmap = yes
use spnego = yes
disable netbios = no
strict allocate = yes
csc policy = disable
min receivefile size = 16k
allocation roundup size = 0
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
use sendfile = yes
smb passwd file = /etc/samba/smbpasswd
disable spoolss = yes
nt acl support = yes
acl map full control = yes
load printers = no
unix extensions = no
follow symlinks = yes
wide links = yes
printable = no
include = /etc/samba/tm_config.conf
[ Public ]
comment =
path = /mnt/HD/HD_a2/Public
browseable = yes
public = yes
available = yes
oplocks = yes
map archive = no
guest ok = yes
writable = yes

root@WDMyCloud samba # ls
msg.sock secrets.tdb smb.conf smb.conf-sv smbpasswd var
root@WDMyCloud samba # cat smb.conf-sv
[ global ]
netbios name = WDMyCloud
server string = WDMyCloud
veto files = /:2eDS_Store/.bin/Network Trash Folder/.systemfile/lost+found/Nas_Prog/mirrored/uploaded/.wdmc/.AppleDouble/
workgroup = WORKGROUP
security = user
passdb backend = smbpasswd
ldap ssl = no
local master = no
os level = 0
preferred master = no
smb2 leases = yes
fruit:copyfile= yes
printing = bsd
printcap name = /dev/null
disable spoolss = yes
max protocol = SMB3
max xmit = 131072
max log size = 10
log level = 0
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=2097152 SO_SNDBUF=2097152
delete veto files = yes
unix charset = UTF8
encrypt passwords = yes
map to guest = bad user
null passwords = yes
guest account = nobody
dns proxy = no
use mmap = yes
use spnego = yes
disable netbios = no
strict allocate = yes
csc policy = disable
min receivefile size = 16k
allocation roundup size = 0
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
use sendfile = yes
smb passwd file = /etc/samba/smbpasswd
disable spoolss = yes
nt acl support = yes
acl map full control = yes
load printers = no
unix extensions = no
follow symlinks = yes
wide links = yes
printable = no
include = /etc/samba/tm_config.conf
[ Public ]
comment =
path = /mnt/HD/HD_a2/Public
browseable = yes
public = yes
available = yes
oplocks = yes
map archive = no
guest ok = yes
writable = yes

root@WDMyCloud samba # mv smb.conf smb.conf-old
root@WDMyCloud samba # mv smb.conf-sv smb.conf
root@WDMyCloud samba # reboot

root@WDMyCloud samba # killall: quotacheck: no process killed
killall: op_server: no process killed
killall: fan_control: no process killed
cp: cannot stat `/etc/blockip’: No such file or directory
dry_total_size:1050
dry_total_size:567
dry_total_size:0
dry_total_size:883
country=0
lang_path=/usr/local/modules/language_Glacier
PID file /var/run/mediaserver.pid not found, stopping server anyway…
killall: twonkystarter: no process killed

sh: you need to specify whom to kill
killall: rsync: no process killed
Shutting down AFP services:
atopacct not running …
Stopping atop system monitor atop 2562
Stopping wdnotifier
wdnotifier failed to stop
Stopping wdphotodbmerger
Stopping wdmcserver
PHY_LAN_NUMBER=1
BOND_ENABLE=0
VLAN0_ENABLE=0
VLAN1_ENABLE=0
LLTD DISABLE**
killall: snmpd: no process killed
USER PID ACCESS COMMAND
/mnt/HD_a4: root kernel mount /mnt/HD_a4
USER PID ACCESS COMMAND
/mnt/HD/HD_a2: root kernel mount /mnt/HD/HD_a2
wdnotifier or wddispatcher is not running
sysinfod: full update begin…
sysinfod: disk connected: previous=0xffffffff, now=0x1
–2019-04-07 20:06:31-- http://download.wdc.com/nas/WDMyCloudGen2_HDD_Blacklist.xml
Resolving download.wdc.com… failed: Connection timed out.
wget: unable to resolve host address ‘download.wdc.com
sysinfod: Disk1(sda) detected.
sysinfod: inform: all drives status=Healthy.
sh: fan_control: not found

AFTER REBOOT,

root@WDMyCloud root # ls
root@WDMyCloud root # cd /etc/samba
root@WDMyCloud samba # ls
msg.sock secrets.tdb smb.conf smbpasswd var
root@WDMyCloud samba # cat smb.conf
[ global ]
netbios name = WDMyCloud
server string = WDMyCloud
veto files = /:2eDS_Store/.bin/Network Trash Folder/.systemfile/lost+found/Nas_Prog/mirrored/uploaded/.wdmc/.AppleDouble/
workgroup = WORKGROUP
security = user
passdb backend = smbpasswd
ldap ssl = no
local master = no
os level = 0
preferred master = no
smb2 leases = yes
fruit:copyfile= yes
printing = bsd
printcap name = /dev/null
disable spoolss = yes
max protocol = SMB3
max xmit = 131072
max log size = 10
log level = 0
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=2097152 SO_SNDBUF=2097152
delete veto files = yes
unix charset = UTF8
encrypt passwords = yes
map to guest = bad user
null passwords = yes
guest account = nobody
dns proxy = no
use mmap = yes
use spnego = yes
disable netbios = no
strict allocate = yes
csc policy = disable
min receivefile size = 16k
allocation roundup size = 0
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
use sendfile = yes
smb passwd file = /etc/samba/smbpasswd
disable spoolss = yes
nt acl support = yes
acl map full control = yes
load printers = no
unix extensions = no
follow symlinks = yes
wide links = yes
printable = no

… no changes

I REALLY feel that I’m close, REAL close, I just want to be able to copy the data to the notebook. Afterwards, I’ll format the damm drive, don’t care, actually I do prefer it that way, starting from scratch!

#29

OK I forgot that the gen2 rebuilds some files on reboot. since you have the smb.conf file on the USB now. You can just cp the file back to /etc/samba/smb.conf-sv to smb.conf.
instead of reboot type the following command.
smbcmd -l
Now see if you can map the drive.
PS also cp the smb.conf file that you modified to /etc/samba/smb.conf-good

#30

You indicated that you had to mount /mnt/HD/HD_a2. That partition is not mounted after a reboot?

#31

I guess no.

#32

Have you tried to copy the smb.conf-sv file and run the smbcmd -l command?

#33

SUCCESS!!! I finally could map the \PUBLIC folder using windows explorer !!!

THANK YOU
THANK YOU
THANK YOU
THANK YOU
I am copying its contents right now.

However I do have one more favor to ask you :smiling_face_with_three_hearts::smiling_face_with_three_hearts:

The IMPORTANT data was not on PUBLIC, but it is on /mnt/sda
(I got there by
mkdir /mnt/sda
mkdir /mnt/sdb
mount /dev/sda2 /mnt/sda
mount /dev/sdb1 /mnt/sdb
cd /mnt/sda
Here’s the content
root@WDMyCloud sda # ls
Fotos Nas_Prog Video sdb
Musica Public lost+found sda

VIDEO
and MUSICA
are the 2 folders that I REALLY WANT TO SAVE

Can you help me with this last part???

#34

sda2 is already mounted. before you do
mkdir /mnt/sda
mkdir /mnt/sdb
mount /dev/sda2 /mnt/sda
mount /dev/sdb1 /mnt/sdb
cd /mnt/sda
just cd to /mnt/HD/HD_a2
do an ls
your files should be there.
All you would need to do is mv Fotos Public

What is /dev/sdb1? That should be a USB device. You don’t need to mount /dev/sdb1

#35

YES!
YES!
YES!
:heart_eyes:

I’ve GOT IT!!!
:smiling_face_with_three_hearts:

THANK YOU SO MUCH!

Now, AFTER I finished copying everything. do you recommend me formatting the drive or just use the dashboard to create the volumes?

#36

Hooray!

1 Like
#37

Once you have your data saved. You should be able to use the unbrick procedure or trythis.

#38

Tonight it will be copying all night long…
Just one question, are these sizes right for the 4Tb drive?

parted /dev/sda
mklabel gpt
mkpart primary 1049kB 2149MB
mkpart primary 8591MB -1MB
mkpart primary 7517MB 8591MB
mkpart primary 2149MB 3222MB
mkpart primary 3222MB 4296MB
mkpart primary 4296MB 6443MB
mkpart primary 6443MB 7517MB

ONCE AGAIN, THANK YOU A MILLION+1

#39

Yes. Also found the smbcmd -c rebuilds the smb.conf with shares. On my system I deleted the shares from the smb.conf. Then ran smbcmd -c and my shares returned.
When you are done. Would you please reboot the device and then run smbcmd -c
Then cat the smv.conf file. See if the Public is back.

Glad I could help.

1 Like
#40

As I left this morning was still copyig files, It should be done in the next couple of hours

I’ll try dis that you’ve asked me before formatting the drive. The thread that you mentioned, indicates to use Debian/ubuntu or any other linux distro (USB/CD Live image), but I don’t have any of these. YET, in other tutorials, specially the one on https://drive.google.com/drive/folders/0B_6OlQ_H0PxVRXllYjY5RG1CZEU
talks about using the USB boot pendrive and …

  1. Use any USB Flash drive, format it to FAT32 (Important!)

  2. Unpack usbrecovery.tar.gz to this drive (You will get “boot” folder and 4 files inside)

  3. Plug this USB drive to WD MyCloud, turn on power. Wait yellow-red (blinking) light.

  4. Connect via Telnet (Search IP in your router, unde DHCP section.)

  5. Format HDD if need:
    parted /dev/sda
    mklabel gpt
    mkpart primary 1049kB 2149MB
    mkpart primary 8591MB -1MB
    mkpart primary 7517MB 8591MB
    mkpart primary 2149MB 3222MB
    mkpart primary 3222MB 4296MB
    mkpart primary 4296MB 6443MB
    mkpart primary 6443MB 7517MB
    q
    mkswap /dev/sda1
    mkfs.ext4 /dev/sda3

  6. Install original WD recovery and reboot:
    mkdir -p /mnt/usb /mnt/root
    mount /dev/sda3 /mnt/root
    mount /dev/sdb1 /mnt/usb
    cp -r /mnt/usb/boot /mnt/root/
    cd /mnt/root/boot
    rm uImage uRamdisk
    mv uImage-wdrecovery uImage
    mv uRamdisk-wdrecovery uRamdisk
    cd /
    umount /mnt/root /mnt/usb
    sync
    reboot -f

Will this work? (resetting ALL the partitions, leaving the disk as it were new?)