R7000 USB drive mounted as 2 partitions (kind of solved)

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Thu Jan 09, 2020 14:51    Post subject: R7000 USB drive mounted as 2 partitions (kind of solved) Reply with quote
Hello, I was a happy user for an year now, using R7000 as a minidlna server. However after a recent firmware update from end of December I noticed minidlna crashing. I used Ubuntu to scan the flash drive, which had some file corruption but was fixed. However minidlna was still crashing. So I decided I'll try to scan it again through the router - fsck. But first disabled automount through the GUI and restarted the router, just in case. And when finished, I enabled automount and restarted. Issue remains and I noticed the flash drive is mounted twice. There's just one partition on it really. Here's how the mount info looks like:
--- /dev/sda
Block device, size 57.81 GiB (62075699200 bytes)
DOS/MBR partition map
Partition 1: 57.81 GiB (62074650624 bytes, 121239552 sectors from 2048)
Type 0x83 (Linux)
Ext4 file system
Volume name "Optware"
UUID 1C93FBAE-C1BE-4386-A95F-136D8BA4C531 (DCE, v4)
Last mounted at "/opt"
Volume size 57.81 GiB (62074650624 bytes, 15154944 blocks of 4 KiB)
/dev/sda not mounted Unsupported Filesystem

Partition sda:
--- /dev/sda
--- /dev/sda1
Block device, size 57.81 GiB (62074650624 bytes)
Ext4 file system
Volume name "Optware"
UUID 1C93FBAE-C1BE-4386-A95F-136D8BA4C531 (DCE, v4)
Last mounted at "/opt"
Volume size 57.81 GiB (62074650624 bytes, 15154944 blocks of 4 KiB)
/dev/sda1 mounted to /opt

--- /dev/sdb
Block device, size 57.81 GiB (62075699200 bytes)
DOS/MBR partition map
Partition 1: 57.81 GiB (62074650624 bytes, 121239552 sectors from 2048)
Type 0x83 (Linux)
Ext4 file system
Volume name "Optware"
UUID 1C93FBAE-C1BE-4386-A95F-136D8BA4C531 (DCE, v4)
Last mounted at "/opt"
Volume size 57.81 GiB (62074650624 bytes, 15154944 blocks of 4 KiB)
/dev/sdb not mounted Unsupported Filesystem

--- /dev/sdb1
Block device, size 57.81 GiB (62074650624 bytes)
Ext4 file system
Volume name "Optware"
UUID 1C93FBAE-C1BE-4386-A95F-136D8BA4C531 (DCE, v4)
Last mounted at "/opt"
Volume size 57.81 GiB (62074650624 bytes, 15154944 blocks of 4 KiB)
/dev/sdb1 mounted to /opt

Previously it was working with sda1 mounted.
Any suggestions?
Thanks!


Last edited by unicastbg on Thu Feb 27, 2020 13:07; edited 1 time in total
Sponsor
portsup
DD-WRT User


Joined: 20 Oct 2018
Posts: 85

PostPosted: Thu Jan 09, 2020 23:34    Post subject: Reply with quote
I have the same I think it is a side effect of using windows to partition.
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Fri Jan 10, 2020 6:58    Post subject: Reply with quote
I would agree, but it used to work for quite some time before another partition appeared. What I can think of in terms of changes I made - I updated the firmware with a version from December. I have OpenVPN server running and lost LAN access. I read that's because of a vulnerability found and I simply need to run another firewall command at startup. So that fixed it.
What troubles me is I have a new partition that I haven't created, with the exact same UUID. Minidlna fails to start and opt cannot be shared through the network anymore.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6199
Location: Netherlands

PostPosted: Fri Jan 10, 2020 12:26    Post subject: Reply with quote
A reason why you cannot see your shares any more could be that NT1(SMB1) is deprecated and not set by default.

You can enable NT1 as MIN version in the SAMBA GUI, however there are real safety concerns with using NT1 (SMB1)

What you see in mounted volumes seems normal to me and can be seen when you partitioned from Windows at least it looks the same as on my USB stick.

OpenVPN server is documented in the guide in my signature (bottom of the post) there is also a paragraph about the CVE 14899 patch and workarounds in step "8a firewall settings"

_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Sat Jan 11, 2020 17:46    Post subject: Reply with quote
Thanks egc for the reply.
I've already enabled SMB1 in the router's GUI. Shares where OK until I did a firmware upgrade.
I'm not really a Linux pro but I'd be suspicious if I have two different partitions reported with the exact same UUID. Anyway, I used Kali to completely delete any partitions on the USB drive and format it as ext4, just for the test. I've used GParted for that. As soon as I install entware, things get bad - the other (cloned?) partitions show up. They cannot be seen in Gparted.
The network share shows up for a second, I was even able to copy a file, but then it's no longer available. Minidlna also shows a dead status.
OpenVPN works without issues, I've mentioned it as a possible time stamp for what my previous FW version was, compared to what I have installed.
I'm running out of ideas now. I can always reset the router and start from scratch, but I'd really leave that for last resort.
Just as a short summary - what I see now mounted is 2 partitions with equal size and both mounted to /opt. One is sda1 and one is sdb1 with exact same UUIDs. I have just one flash drive with just one partition on it.
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Sun Jan 12, 2020 10:45    Post subject: Reply with quote
I can confirm I don't see ghost partitions until I run the Entware script:
wget http://bin.entware.net/armv7sf-k3.2/installer/generic.sh
sh generic.sh
As soon as I run generic.sh, the sdb partition appears.
I'm currently on build 41954.
Any suggestions are welcome Smile
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Tue Jan 14, 2020 11:51    Post subject: Reply with quote
And another update - this time I managed to install Entware without getting the ghost partitions. However the moment minidlna starts working, the /opt share is not accessible anymore. So I ssh-ed into the router and noticed the only folder available in /opt was lib.
This is either a bug with the recent R7000 builds or I have come up to a complete config mess, given by the fact I switched from Korg's builds to BS' builds without factory reset. I know that's what I'll do next, but really wanted to avoid all that.
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Wed Jan 15, 2020 13:43    Post subject: Reply with quote
Ok, router reset and now with build 41954.
I thought of using the built in Minidlna server. I've set up the NAS share and left it for a while before using the Minidlna server. This way I can see if the NAS share will disappear. So I was able to access the share on Win10, browse it, look through files. Then I wanted to move a big movie file to the share. All through Windows. It copied the 1/3 of the file and gave an error and now the NAS share is unreachable until router restart. Previously the NAS share was accessible for roughly 5 minutes after router restart. Will see if this is still the case.
By the way, one of the reasons of posting so many details, is one day someone else might have the same problem and they might find some ideas or solutions here. I've personally came across a few forums where the user posted the issue, found the answer and posted it and that solution solved it for me as well.
djk44883
DD-WRT Novice


Joined: 04 Jan 2009
Posts: 6

PostPosted: Sat Jan 25, 2020 14:09    Post subject: Re: R7000 USB drive mounted as 2 partitions Reply with quote
unicastbg wrote:
Issue remains and I noticed the flash drive is mounted twice. There's just one partition on it really. Here's how the mount info looks like:
--- /dev/sda
--- /dev/sda1
UUID 1C93FBAE-C1BE-4386-A95F-136D8BA4C531

--- /dev/sdb
--- /dev/sdb1
UUID 1C93FBAE-C1BE-4386-A95F-136D8BA4C531

Previously it was working with sda1 mounted.
Any suggestions?
Thanks!


This doesn't necessarily show "the flash drive". You have TWO (2) devices /dev/sda and /dev/sdb each with a single partition. It doesn't so a single drive with two partitions - it shows two separate devices.

It gets real screwy since they both appear to have the same UUID ?!? When mounting, system looks for UUID to mount in /opt. Might mount one over the other or just picks the first one it finds, or whatever not the one you want.

I don't know where you'd want to go from here, but I hope this provides some useful info.
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Sat Jan 25, 2020 14:12    Post subject: Reply with quote
Well, I can tell how many USB drives I've inserted. If anything, a visual inspection shows one drive connected to the front (USB 3.0) and nothing connected to the back of the router.
There's a Samba issue with the recent builds, I'll wait for that to be resolved and then move on with the troubleshooting.
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Tue Jan 28, 2020 15:07    Post subject: Reply with quote
Short update - I've formatted again the USB stick and disabled the Samba service before plugging it in the router. The USB drive got mounted (named it Optware, so that worked automatically), and stayed mounted for 2 days. I haven't touched anything on the router during this time. Today I enabled the Samba service, tried to open it up from a Windows 10 PC and failed with redundancy check error. Currently I've enabled SMB 2.10 up to the latest 3.11 protocols.
Redundancy check would usually mean the drive is bad. But it just passed a surface test.
Conclusion - if I'm not messing something up, there's an issue with the Samba service and the drive mount.
No warnings or errors in Syslog.
Or, hypothetically speaking, the Win10 SMB client messes up the flash drive somehow. I'll give it a test on a Linux machine later tonight or tomorrow.
Info for Win10 Pro - both SMB 1.0, 2 and 3 are enabled and checked using PowerShell.
unicastbg
DD-WRT Novice


Joined: 18 Mar 2016
Posts: 13

PostPosted: Thu Feb 27, 2020 13:05    Post subject: End of story Reply with quote
Here's the last update that I'm providing for this thread, as I think it's working more or less acceptable now.
First I updated the R7000 FW to the latest available these days (r42460). I can't get Samba to work with Windows 10 no matter of the protocol version, so I gave up on that.
The flash drive had no problems being just plugged in the router for more than a week. No ghost partition. So I installed Entware and Minidlna. All working well now for more than a day. I used WinSCP to upload the content I needed on the flash drive. Slow as hell (between a few KBs and 4-5MB/s), but working OK.
For some reason formatting the flash drive using Gparted ended up in bad mounting by the router. Must be something I'm doing, cause it doesn't make sense a native Linux environment to fail to mount something formatted under more or less the same Linux env. Anyway, I used Partition Wizard under Win10 just for formatting the drive (ext2). All file manipulations were later done with WinSCP. Not ideal, but it works. With this I think I'll close the thread and call it a day.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum