Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rock64] 6 devices detected while there is 1 external HDD only #614

Closed
prog-amateur opened this issue Sep 2, 2018 · 13 comments
Closed

[Rock64] 6 devices detected while there is 1 external HDD only #614

prog-amateur opened this issue Sep 2, 2018 · 13 comments
Assignees
Labels

Comments

@prog-amateur
Copy link

Hello, I can't format and change Nextcloud Data directory, I can't change the label too, and I can't use my HDD (actually, it is an external RAID 1, I mean 2 drives set up like it was 1 drive only) as data location.

Message is something like 6 devices detected, and when I unplug the drive, it shows 5 devices.
I have already read some similar issues and I know that there is some command to do on the CLI (including sudo-ncp-report), however, when I try to connect through the display connected to the Rock64, I can't login as ncp and admin password, because just after accepting the login, it tells me that the account does not exist yet.

How can I do please ? Thank you very much for your help.

@nachoparker
Copy link
Member

nachoparker commented Sep 2, 2018

Enable SSH from ncp-web, and you will be able to log in. The user ncp is not for SSH access, but you can enable a password for root.

Once inside the terminal, you can give us the output of

lsblk -ln 

, so we can try to figure out what is going on.

That would help fixing it. Thanks!

@prog-amateur
Copy link
Author

prog-amateur commented Sep 2, 2018

Hi, thank you very much !

I have accessed to SSH, please find the result of lsblk -ln :

mtdblock0     31:0    0    4M  0 disk 
mtdblock1     31:1    0  256K  0 disk 
mmcblk0      179:0    0 14.5G  0 disk 
mmcblk0p1    179:1    0 14.3G  0 part /
mmcblk0boot0 179:32   0    4M  1 disk 
mmcblk0boot1 179:64   0    4M  1 disk 
mmcblk0rpmb  179:96   0    4M  0 disk 

There are many partitions for only one eMMC ^^ Thank you for your help

EDIT :
I was trying to understand the way the Rock64 works, we can have a short answer here :
http://opensource.rock-chips.com/wiki_Partitions#Default_storage_map
Source is here :
ayufan-rock64/linux-build#229 (comment)
It is said that some partitions are needed for the rock64 boot process. I still don't understand exactly the way it works (I am not an expert), but I hope it will help.

@nachoparker
Copy link
Member

I can't see your hard drive in that list. is it mounted?

@prog-amateur
Copy link
Author

prog-amateur commented Sep 10, 2018

@nachoparker sorry, I did not see your message. You are right, I have given the list with the hard drive UNmounted. Please find the same list with the hard drive (sda) mounted :

sda            8:0    0  3.7T  0 disk 
mtdblock0     31:0    0    4M  0 disk 
mtdblock1     31:1    0  256K  0 disk 
mmcblk0      179:0    0 14.5G  0 disk 
mmcblk0p1    179:1    0 14.3G  0 part /
mmcblk0boot0 179:32   0    4M  1 disk 
mmcblk0boot1 179:64   0    4M  1 disk 
mmcblk0rpmb  179:96   0    4M  0 disk 

When I try nc-automount, the USB label is visible. Then when I try to change Nextcloud data directory in nc-datadir it say :

[ nc-datadir ]
Refusing to move to the SD card. Abort

What do you think ? Thank you very much.

@nachoparker
Copy link
Member

assuming that automount works, you will have your device available at /media/USBdrive or /media/label. Where are you trying to move it to with nc-datadir?

@nachoparker
Copy link
Member

Also, I fixed the detection, but I still have to try it out. If you want, you can try changing this line manually and see if that doesn't detect too many USBs.

Fix -> 6954e12

@nachoparker nachoparker self-assigned this Sep 11, 2018
@prog-amateur
Copy link
Author

prog-amateur commented Sep 11, 2018

assuming that automount works, you will have your device available at /media/USBdrive or /media/label. Where are you trying to move it to with nc-datadir?

I have labelled the drive as NCP, so when I do cd /media, and ls, I have the following answer :

NCP USBdrive

If I try to put /media/NCP in the field of nc-datadir through ncp-web gui, then I have the following message :

[ nc-datadir ]
Refusing to move to the SD card. Abort

Also, I fixed the detection, but I still have to try it out. If you want, you can try changing this line manually and see if that doesn't detect too many USBs.

Fix -> 6954e12

I have tried to copy paste the lines manually but the folder ncp-config.d does not exist. Shall I make a new folder (and the script too) manually ?
Thank you very much !

EDIT :

  1. OK, the file nc-format-USB.sh was in /usr/local/etc/ncp-config.d/. So I have succeed to edit the file, and now when I do lsblk -ln, I have the following answer :
sda            8:0    0  3.7T  0 disk /media/NCP
mtdblock0     31:0    0    4M  0 disk 
mtdblock1     31:1    0  256K  0 disk 
mmcblk0      179:0    0 14.5G  0 disk 
mmcblk0p1    179:1    0 14.3G  0 part /
mmcblk0boot0 179:32   0    4M  1 disk 
mmcblk0boot1 179:64   0    4M  1 disk 
mmcblk0rpmb  179:96   0    4M  0 disk 
  1. I have tried again to fill in the web GUI (in nc-datadir) : /media/NCP but still have the following issue :
[ nc-datadir ]
Refusing to move to the SD card. Abort
  1. If I run the wizard, and try to "format as ext4", then I have the following error message (with or without zram has no difference) :
[ nc-format-USB ]
ERROR: counted 0 devices. Please, only plug in the USB drive you want to format
  1. Also after rebooting, the ncp-format.sh appeard in the web GUI which shall not be normal I think.

  2. As I have also some time left, I have also tried the trick on issue Unable to use 1TB hard drive as data location #305 by changing the field from /media/NCP into /media/NCP/ncdata, but I have the following message :

[ nc-datadir ]
ERROR: the user www-data does not have access permissions over /media/NCP

Thank you for your help.

@nachoparker
Copy link
Member

nachoparker commented Sep 12, 2018

If I try to put /media/NCP in the field of nc-datadir through ncp-web gui, then I have the following message

Yes, that is by design because we don't want people to leave ther NC data scattered on the root of the USB drive: you should select a folder inside of it.

Admittedly the error message is not clear and also you are not the first one to try, so I implemented support for this.

Ok, since you are being patient with this, maybe you can help me test this. If you type

sudo ncp-update devel

, you will get two fixes: one for the format issue and another one for being able to move to /media/NCP. This will overwrite any manual changes you did to those files above.

If you try to move it now to /media/NCP it should move it to /media/NCP/ncdata. I haven't been able to test it myself but it should work and it would be very useful if you could confirm this. nc-format-USB should also work now for you.

Also after rebooting, the ncp-format.sh appeard in the web GUI which shall not be normal I think

No, that must be something you did when editing files directly. You can safely delete that file from /usr/local/etc/ncp-config.d/. Don't worry, every time you do sudo ncp-update devel you will have any files that you accidentally remove restored.

Cheers

@prog-amateur
Copy link
Author

Thank you for helping me and maybe other people with Rock64 like me. I have a good and a bad news.

  • Good news first ^^ : ncp-format.sh disappeard from the web GUI after deleting it from SSH, then reboot, then launch sudo ncp-update devel from SSH, then reboot.

  • Bad news : trying to put /media/NCP on the field of web GUI > nc-datadir still gives the following error (even after the update v0.59.2) :

[ nc-datadir ]
ERROR: the user www-data does not have access permissions over /media/NCP

So I have made a new folder names NCP : in SSH cd /media/NCP, then mkdir NCP, and put in web GUI > nc-datadir /media/NCP/NCP but I have the same error message :

[ nc-datadir ]
ERROR: the user www-data does not have access permissions over /media/NCP

I am afraid we still have nightmare to solve ^^

@nachoparker
Copy link
Member

No nightmares, you have a permissions issue, probably because you were messing around doing things manually. Just do

sudo chmod ugo+x /media/NCP

, and try again.

Also, are you able to use nc-format-USB now?

@prog-amateur
Copy link
Author

YESSSSS !!!!!! Nightmare becomes a dream now it works, thank you so much.

Using sudo chmod ugo+x /media/NCP and put /media/NCP/ in the field of web GUI > nc-datadir gives me :

[ nc-datadir ]
Maintenance mode enabled
moving data dir from /var/www/nextcloud/data to /media/NCP/ncdata...
Nextcloud is in maintenance mode - no apps have been loaded

System config value datadirectory set to string /media/NCP/ncdata
Nextcloud is in maintenance mode - no apps have been loaded

System config value logfile set to string /media/NCP/ncdata/nextcloud.log
Nextcloud is in maintenance mode - no apps have been loaded

Maintenance mode disabled

And System info gives now :

USB devices	sda
datadir	/media/NCP/ncdata
data in SD	no
data filesystem	ext2/ext3
data disk usage	148M/3.6T

So I have 2 (easy) questions :

  1. About nc-format-USB, will it format into BTRFS ? Because I would like to keep ext4 as format. And I see on the wizard that it is proposed to format the USB drive to ext4. So ext4 or BTRFS ?
  2. Last but not least, will it be possible to change the iso in order to not have to put manually sudo chmod ugo+x /media/NCP and avoid SSH ? Because what I really like in your Raspberry iso version is that it is ready out of the box. It is very useful for beginners like me compared to Rock64 iso where we have to use SSH and some commands, what do you think ?

Thank you very much !

@nachoparker
Copy link
Member

Great!

  1. I recommend BTRFS because it is more advanced and some neat features of NCP use it like nc-snapshots, but it is not required. ext is also supported, but if you want to use it you have to format it manually to ext4

  2. You normally don't need to do anything, it works out of the box, but you have to follow the wizard if you want everything to "just work" automatically. You had to do chmod because probably at some point permissions became weird during your experiments.

@prog-amateur
Copy link
Author

prog-amateur commented Sep 13, 2018

Thank you for your feedback.
So just for your information :

  1. I have tried to format, but not successfully
  2. I have tried to re-install from scratch (iso to eMMC via Etcher > format the external drive into ext4 with another computer > installation & setup of NextcloudPi). Firstly, after update, nc-datadir to external drive works well but only by using the chmod trick.

So I conclude NextcloudPi for Rock64 still not work out of the box, maybe it is the eMMC which lead to this issue (maybe it works well with micro SD card) but anyway, I really appreciate what to did to help us so far !

Also, last but not least, you will not like me (sorry for that !!!!!) but I have raised another issue that I think is really important (about passwords) : #629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants