What's new

USB 3.0 HD write permissions

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

What is the native filesystem type of the drive plugged into the Asus?

Try issuing this command interactively and see if it works or you get error messages. (I suspect you just need to specify the version)
Code:
mount -t cifs //Asus/Media /mnt/Media -o "vers=2.0,username=Media,password=XXXX"
If that works try unmounting the share and using your credentials file. You can remove the uid and gid options because the router ignores them.
Code:
umount /mnt/Media
mount -t cifs //Asus/Media /mnt/Media -o "vers=2.0,credentials=/home/pi/.smbcredentials"
 
Thought about this during dinner. Had a test to prove to myself that this is all about permissions. Issued a couple of commands that proved it does NOT work with a user, but does with root:

pi@PiMC:/mnt/BuyVM/zDL/transmission $ ll
total 4
-rw-r--r-- 1 root root 29 Feb 16 19:16 test.mp4
pi@PiMC:/mnt/BuyVM/zDL/transmission $ cp *.mp4 /mnt/Media/*deo/TV
cp: cannot create regular file '/mnt/Media/My Video/TV/test.mp4': Operation not permitted
pi@PiMC:/mnt/BuyVM/zDL/transmission $ sudo cp *.mp4 /mnt/Media/*deo/TV
pi@PiMC:/mnt/BuyVM/zDL/transmission $
 
Thought about this during dinner. Had a test to prove to myself that this is all about permissions. Issued a couple of commands that proved it does NOT work with a user, but does with root:
Ah, that makes sense. IIRC with NFS the (non-root) client account must have a matching account on the server side which has the same uid and gid.
 
What is the native filesystem type of the drive plugged into the Asus?
NTFS formatted in Windows. Originally, this external drive was my backup drive. Still need to disconnect it from the Asus when backing up configurations (i.e. my parents house).

Try issuing this command interactively and see if it works or you get error messages. (I suspect you just need to specify the version)

I have the gist of what you wanted. Changed slightly, here's the command I used:
Code:
 sudo mount -t cifs //Asus/Media /mnt/Test -o "vers=2.0,username=David,password=pw"
sudo to mount it with root; created /mnt/Test so it doesn't interfere with anything else. David instead of Media (David was full r/w permissions; Media was to mount read-only on Media servers, like my Pivos Aios).

Mounted fine. Tested:
Code:
pi@PiMC:/mnt $  sudo mount -t cifs //Asus/Media /mnt/Test -o "vers=2.0,username=David,password=pass"
pi@PiMC:/mnt $ ls /mnt
BuyVM/  Media/  Orico1/  Orico2/  Orico3/  Orico4/  Orico5/  Public/  Test/
pi@PiMC:/mnt $ cd Test
pi@PiMC:/mnt/Test $ ls
My Digital/  My Music/  My Photo/  My Video/  zDL/
pi@PiMC:/mnt/Test $ cd zDL
pi@PiMC:/mnt/Test/zDL $ ls
pi@PiMC:/mnt/Test/zDL $ date >> test
-bash: test: Permission denied

Seems to be read-only. But cifs mount might be the way to go. Next? :D
 
Ah, that makes sense. IIRC with NFS the (non-root) client account must have a matching account on the server side which has the same uid and gid.
I do own all three systems, so theoretically, could create a "cavalli" account with the same ID's maybe. That's not my expertise, so don't know how hard that is, especially since the Asus has so much NOT able to be controlled as easily I think.

Happy to go either route if you have the time / inclination to help. Hoping the cifs one just eliminates all these type of issues and just gives me r/w control as defined in the Samba page of the Asus firmware.

Thanks! :D
 
NTFS formatted in Windows. Originally, this external drive was my backup drive. Still need to disconnect it from the Asus when backing up configurations (i.e. my parents house).
Permissions issues are quite common when using NTFS on the router. I strongly recommend using a Unix-type filesystem if at all possible (i.e. ext4).
 
Permissions issues are quite common when using NTFS on the router. I strongly recommend using a Unix-type filesystem if at all possible (i.e. ext4).
Happy to admit defeat if this really is a bad uphill fight. I can always get a dedicated ext4 external HD to replace the one there.

That being said, I have to keep the NTFS drive as-is for now. It's the only one with unique data on it. I can dump off a lot of it to the Orico, but I never intended this to be the final drive, unless it worked like it currently does.

I have an externalizing kit with a spare empty HD. Assuming I *do* want to make a new dedicated ext4 partition with Asus as the only goal, what's the best way to start? I don't see a 'format' in the web page (yet). Might be because it already has a formatted HD in the USB 3.0 slot now.

Suggestions? I even have an empty identical Seagate which I might be able to use/format tonight, if it's not hard.

And once again, thanks! If this resolves everything, I'll be a very happy guy and the extra hardware isn't an issue.
 
Was industrious. Found the amtm script center on my own. Loaded it successfully and put in the backup Seagate drive. (Stated capacity 2 TB) Ran 'fd' on amtm, but it says the device is over 2TB and cannot be formatted by amtm.

I see the manual instructions. They look intimidating. I see a post that says "format possible up to 4 TB. Both look hard but doable.

That being said, I don't want to waste my night on something that ultimately is a fool's errand. I see your name on the credits of a lot of this, so figure I'll wait for your counsel on how/what to do next.

The HD is a Seagate Expansion USB 3.0 External 9SEAN2-500, just like the NTFS one I was using for the Asus. Cleaned off the data on it and will mirror the data of the NTFS one once it is running. I put the NTFS one back for now.

No rush. Thanks again for the help! :D
 
Was industrious. Found the amtm script center on my own. Loaded it successfully and put in the backup Seagate drive. (Stated capacity 2 TB) Ran 'fd' on amtm, but it says the device is over 2TB and cannot be formatted by amtm.

I see the manual instructions. They look intimidating. I see a post that says "format possible up to 4 TB. Both look hard but doable.

That being said, I don't want to waste my night on something that ultimately is a fool's errand. I see your name on the credits of a lot of this, so figure I'll wait for your counsel on how/what to do next.

The HD is a Seagate Expansion USB 3.0 External 9SEAN2-500, just like the NTFS one I was using for the Asus. Cleaned off the data on it and will mirror the data of the NTFS one once it is running. I put the NTFS one back for now.

No rush. Thanks again for the help! :D

AMTM should be able to fd that 2tb disk so we need to investigate...

Can you please view the disk information with the fdisk -l command and post it here. This wiki step shows you how:

https://github.com/RMerl/asuswrt-merlin/wiki/Disk-formatting#4-view-disk-information

Next, did you use Windows to reformat the hdd to fat32 with blocksize 512kb before connecting to router to fd it? Do that then try fd again.

Sorry the wiki guide looks intimidating. It is actually quick and easy to complete the step-by-step. Just start at step 1 and type the commands in order. It looks like a lot to read only because we’ve documented every known quirk and bug and explained our reasons for doing things a certain way..

https://github.com/RMerl/asuswrt-merlin/wiki/Disk-formatting#1-preparations

I haven’t added anything to the guide yet about formatting 4tb disks because it is extra complicated requiring entware/gdisk and 2 USB devices (1 to format, 1 to hold entware and gdisk). I will add a little mention of it soon.
 
Can you please view the disk information with the fdisk -l command and post it here.
Since I didn't think I was formatting tonight, I put back the original NTFS drive, so my wife and I can watch TV. This is one of three identical Seagate external HD's I bought at the same time, so the specs for size should be the same for the eventual target one.

Thanks for the response! Happy to help improve that script. Looking forward to playing with some of the other functions. Let me know what to do next.

Code:
cavalli@Asus:/tmp/home/root# fdisk -l

Disk /dev/mtdblock0: 0 MB, 524288 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock0 doesn't contain a valid partition table

Disk /dev/mtdblock1: 1 MB, 1572864 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock1 doesn't contain a valid partition table

Disk /dev/mtdblock2: 65 MB, 65011712 bytes
255 heads, 63 sectors/track, 7 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock2 doesn't contain a valid partition table

Disk /dev/mtdblock3: 63 MB, 63316480 bytes
255 heads, 63 sectors/track, 7 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock3 doesn't contain a valid partition table

Disk /dev/mtdblock4: 65 MB, 65798144 bytes
255 heads, 63 sectors/track, 7 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock4 doesn't contain a valid partition table

Disk /dev/mtdblock5: 1 MB, 1310720 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock5 doesn't contain a valid partition table

Disk /dev/sda: 2000.3 GB, 2000398931968 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1      243202  1953512032+  7 HPFS/NTFS
cavalli@Asus:/tmp/home/root#
 
Next, did you use Windows to reformat the hdd to fat32 with blocksize 512kb before connecting to router to fd it? Do that then try fd again.
Sorry the wiki guide looks intimidating. It is actually quick and easy to complete the step-by-step. Just start at step 1 and type the commands in order. It looks like a lot to read only because we’ve documented every known quirk and bug and explained our reasons for doing things a certain way..
https://github.com/RMerl/asuswrt-merlin/wiki/Disk-formatting#1-preparations
Ironically, it looks intimidating becuase I literally don't know what to do for step one. To quote the link, step 1 says:
  • Format disk with FAT32 filesystem before beginning to ensure it is clean and detectable by ASUSWRT firmware.
That says WHAT to do, but not HOW. :D I plugged my Seagate into my Win 10 computer. Ran Control Panel >> Administrative Tools >> Computer Management >> Storage >> Disk Management. Disk 2 currently is NTFS, basic, 1863.02 GB. Selected Disk 2, selected "Format". The three "File system" choices are "NTFS", "exFAT", and "REFS". None say FAT32. Said "intimidated" because FAT32 is either exFAT, I'm formatting the HD with the wrong tool, or something else beyond my current knowledge base. :D

Ready for my next marching orders! :D Thanks!
 
Hmm Well that’s weird Windows says your disk has a storage capacity of 1863.02GB whereas the fdisk utility thinks it’s 2000.3 and I’m not sure which is true. Perhaps some advice from @ColinTaylor please?

Code:
if [ "$devtfsize" ] && [ "$devtfsize" -gt 2000000000000 ]; then
            show_amtm " Device is over 2TB and cannot be\\n formatted by $thisScript."
        fi

I can tell you what’s happening is that as seen above the AMTM script checks the target disk doesn’t have a storage capacity greater than 2000000000000 bytes (2 tebibytes) before allowing fd because our research shows disks larger than 2TB don’t support the MBR partition table AMTM creates with fdisk. (See wiki). Unfortunately fdisk may be falsely detecting your disk as being larger. You could modify AMTM to pass the check and see what happens but I’d wait for word from the other guys.

https://github.com/RMerl/asuswrt-merlin/wiki/Disk-formatting#partition-tables

Thanks for the response! Happy to help improve that script.
Code:
cavalli@Asus:/tmp/home/root# fdisk -l

Disk /dev/sda: 2000.3 GB, 2000398931968 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1      243202  1953512032+  7 HPFS/NTFS
cavalli@Asus:/tmp/home/root#

I don’t use Windows but if FAT32 isn’t available I wouldn’t overthink it and just try exfat. It’s just general advice so people start with a clean disk that uses a known compatible format.
 
I don’t use Windows but if FAT32 isn’t available I wouldn’t overthink it and just try exfat. It’s just general advice so people start with a clean disk that uses a known compatible format.
I see various articles on how to make FAT32 work, but decided to go exFAT instead of use a third party alternative. Posting the end results of the Windows quick format. Now going to take down the NTFS drive and replace it with this one.

My turn to be up at 4 AM. Excited to finish this, before my wife wakes up and redirects my efforts. :D

Thanks guys! :D
 

Attachments

  • Seagate.png
    Seagate.png
    12.6 KB · Views: 305
Um... Really not good. The NTFS drive unmounted just fine. The exFAT one shows up as "Storage Unmounted". Powered the drive off/on. Nothing. Rebooted the router. Same. Tried to use the web page to unmount/remount. Nothing. Invisible.

*sigh* I woke up this early for THIS? :D

Waiting for advice now.
 
@David Cavalli Hi, I'm not sure where you are at the moment with your various disk swapping and formatting.... But if you can plug the drive you want to format back into the router, you should be able to do the following:

Check the hardware has been recognised and has 1 partition called /dev/sda1:
fdisk -l /dev/sda

If the above is true proceed as follows...

Unmount the drive if the router has mounted it:
umount /dev/sda1

Format the partition:
mke2fs -t ext4 /dev/sda1

Add a label:
tune2fs -L "yourDiskLabel" /dev/sda1

Reboot the router:
reboot
 
Um... Really not good. The NTFS drive unmounted just fine. The exFAT one shows up as "Storage Unmounted". Powered the drive off/on. Nothing. Rebooted the router. Same. Tried to use the web page to unmount/remount. Nothing. Invisible.


*sigh* I woke up this early for THIS?


Waiting for advice now.


Well instead of using your windows pc you could try use the router formatting options in the webui (see screenshot).

If that doesn’t work could you just start at step1 with NTFS instead of FAT32? We mainly advised people in the wiki guide to start with their disk formatted FAT32 so we’re all being consistent and everyone is guaranteed to start with a clean disk and it’s less likely to encounter weird undocumented problems. But you can try start as NTFS or exfat or whatever is supported by ASUS then follow the step-by-step wiki.

I do feel your frustration because we all hit these kind of errors and for me it’s a matter of doing what you’re doing. trial and error. making educated guesses about what might be going wrong. asking for advice. trying something different. Sometimes it takes a long time, but so does LEGO. If you’re having fun then stick at this. Otherwise you could just get it all working on whatever disk format is easy.
 

Attachments

  • D755B1CF-0931-413E-BBAA-ABB041B18051.jpeg
    D755B1CF-0931-413E-BBAA-ABB041B18051.jpeg
    38 KB · Views: 292
Last edited:
Not TOO frustrated. I like these type of projects. I just don't like when I'm not really in control of what/when I can continue. :D

Plugged the drive back into Windows. It didn't register there either. Formatted NTFS. Says 1.862 GB. Included web page view of what it shows. Won't web format FAT.

Putty terminal to Asus to run amtm. 2TB problem again. Posted picture here too.

Next? :D
 

Attachments

  • Seagate2.png
    Seagate2.png
    22.1 KB · Views: 347
  • Seagate3.png
    Seagate3.png
    16.9 KB · Views: 259
When I don't understand something, I try to research as much as possible. Here's an interesting web page which shows "hard drive size" vs. "actual capacity". Seems I have a 2 TB HD as advertised, with an actual capacity of 1.862 TB. If I understand right, it's because there's 1,024 as the base instead of 1,000 when converting bytes to GB.

http://www.ussscctv.com/hdccalc.html
 

Attachments

  • Seagate4.png
    Seagate4.png
    6.7 KB · Views: 276

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top