LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2011, 02:44 PM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,398

Rep: Reputation: 101Reputation: 101
Remotely accessing a mounted SD card


The why behind this is a little long winded so let me get to the technical question. I have a 16 GB SD card in my netbook as additional storage to the 16 GB SSD drive. The SD card is formatted fat32 (by a utility from sdcard.org which is supposed to and does make the card read and write faster than if it was formatted by the OS). The card mounts when I login to the netbook. The entry from mtab shows
Quote:
/dev/sdb1 /media/SD16 vfat rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush 0 0
If I look at the permissions on SD16 I find
Quote:
ken@taylor13:/media$ ls -l
drwx------ 3 ken ken 32768 1969-12-31 19:00 SD16
sudo chmod 777 SD16 does not change the permissions.

The problem is I need to connect to the machine with a different user (due to a security hole in gnome-commander). As the card is formatted fat I cannot assign group permissions to it and my second user cannot access it.

I had previously had the card formatted as ext3 and it was so slow as to be unusable. It needs to be formatted fat. I am stumped. Any suggestions?

TIA,

Ken

p.s. The gnome-security issue is described here http://www.linuxquestions.org/questi...29#post4401629
 
Old 07-01-2011, 03:19 PM   #2
gremlin-touch
LQ Newbie
 
Registered: Jun 2011
Distribution: Slackware
Posts: 12

Rep: Reputation: Disabled
I'm new at this, so a second opinion is advised.

I noticed that "nosuid" is part of the mtab. Perhaps this is preventing you from using user substitution commands.

Hopefully someone with more experience can confirm or deny this.
 
Old 07-01-2011, 03:51 PM   #3
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,398

Original Poster
Rep: Reputation: 101Reputation: 101
Thanks gremlin-touch,

I am familiar with suid - a real security danger if (ab)used. Not the same thing as sudo so I don't think that is the issue. I notice that nosuid is on a lot of system stuff in mtab
Quote:
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/ken/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=ken 0 0
That said I have not made an entry in /etc/fstab for the SD card because it might not be in the netbook when I boot it up. The mtab entry is made by Ubuntu based on its "Hey! I just found something to mount!" functionality.

Ken
 
Old 07-01-2011, 04:23 PM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Quote:
Originally Posted by taylorkh View Post
...
I had previously had the card formatted as ext3 and it was so slow as to be unusable. It needs to be formatted fat. I am stumped. Any suggestions?
...
I can't believe that if it was slow the reason was ext3. I have an USB-memorystick formatted with ext3 (2GB) which is normally useable. At least reading data from the card should work with normal speed, can you confirm this?

Markus
 
Old 07-02-2011, 08:30 AM   #5
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,398

Original Poster
Rep: Reputation: 101Reputation: 101
Thanks Markus. I would not have believed it either. In response to your comment I decided to quantify the situation. Here is what I did:

I created a directory on the Western Digital Velociraptor drive in my quad core desktop. It is a rather speedy drive and thus should not be a factor in slowing down the transfer.

I added to the directory a collection of about 1,500 files of various size from 100 bytes to 1.4 GB. Some in the directory itself and some in subdirectories. The total data volume was 11 GB.

I plugged the SD card into the built in reader in the PC and allowed Linux to mount it.

I ran the following script and then examined the times
Quote:
#!/bin/bash
echo Starting copy to SD >> sd_speed.log
echo $(date +%y/%m/%d_%r) >> sd_speed.log

cp -r /data/from/* /media/SD16/
sync

echo Finished copy to SD >> sd_speed.log
echo $(date +%y/%m/%d_%r) >> sd_speed.log

echo Starting copy from SD >> sd_speed.log
echo $(date +%y/%m/%d_%r) >> sd_speed.log

cp -r /media/SD16/* /data/to
sync

echo Finished copy from SD >> sd_speed.log
echo $(date +%y/%m/%d_%r) >> sd_speed.log
Here are the results:in hours:minutes:seconds

SD card formatted as fat with the SD utility

copy to SD card: 23:12
copy from SD card 10:12

SD card formatted as fat from Linux

copy to SD card: 32:20
copy from SD card 10:27

SD card formatted as ext3 with the SD utility

copy to SD card: 3:32:07
copy from SD card 10:21

I am running the test now with the SD card formatted as ext2. It has been running for 2 hours so I do not think ext2 is the answer. Perhaps it has something to do with sector size or alignment of sectors to the logical layout of the card.

While setting up the test and checking the script I found out/recalled why I had formatted the card to ext3 in the first place. The netbook is my download box. If I am downloading a large volume of data such as a CentOS DVD iso I will do it on the netbook as it only draws 7 - 8 Watts as compared to 180 Watts for the quad core (not counting 2 large monitors). Unfortunately fat has a limitation on file size so I cannot store a 4 - 5 GB image. Well I guess it is time for plan B. Perhaps a larger SSD drive for the netbook or a little external USB hard drive.

Ken
 
Old 07-02-2011, 08:43 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
I remeber I've read (probably in a thread here at LQ) that writing to an SD-drive is relatively slow (at least slower than reading) because the sectors have a limited number of writeaccesses within their livetime and the system tries to distribute the writeaccesses over the drive. But I can't remember that this has anything to do with the filesystem on the disk. You may read here: http://en.wikipedia.org/wiki/Solid-s...rd_disk_drives or here http://www.storagesearch.com/ssdmyths-endurance.html

Markus
 
Old 07-02-2011, 09:19 AM   #7
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,398

Original Poster
Rep: Reputation: 101Reputation: 101
Thanks again Markus. A couple of interesting reads. The SD card is from Kingston and has a lifetime warranty so I don't care if I write it till it dies The netbook is a Dell Latitude 2100 from their outlet store (about $225 a year and a half ago). It came with Utuntu 9.04 installed and I have upgraded it to 10.04. The 16 GB SSD is FAST. It boots as fast or faster than my Studio XPS with the Velociraptor and 8 GB of RAM (also running 10.04). If I burn the SSD out I will simply stick another one in but I am not too worried.

Those comments aside, I did just discover something. I am backing up my netbook with g4l. I have the SD card, a USB flash drive for the backup and a second USB flash drive with boot and g4l. When I go to select the partition for the backup from the g4l menu it shows me that the 8 GB flash drive is formatted "Win95FAT32" but the SD card, just now reformatted with the SD utility as "Win95FAT32(LBA)" I recall that if Windoze 9x was presented with a hard drive bigger than (don't remember the value but not very big by today's standards) it would format it with Logical Block Addressing. I guess that applies to larger SD cards as well.

Ken
 
Old 07-05-2011, 08:47 AM   #8
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,398

Original Poster
Rep: Reputation: 101Reputation: 101
The root (pardon the pun) cause of this fiasco has been addressed. I have gotten gnome-commander working with the Gnome Keying and can connect to the netbook using my own account. I can address the directories on the SD card with no problem. For the time being I will keep it formatted as SD special fat for performance reasons.

Ken
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing desktop remotely mehnaz Linux - Desktop 4 06-08-2009 01:00 AM
Accessing display remotely neothephoenix Linux - Desktop 4 07-29-2007 03:51 PM
accessing my computer remotely paul44 Linux - Newbie 3 05-06-2004 09:17 AM
Accessing Samba Remotely vcheah Linux - Networking 14 05-17-2003 03:11 PM
Accessing server remotely keymoo Linux - General 2 01-25-2002 02:45 PM


All times are GMT -5. The time now is 12:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration