DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th March 2015
kerasi kerasi is offline
Shell Scout
 
Join Date: Mar 2013
Location: Germany
Posts: 90
Default External USB Drive suddenly Read only

Hello together,

i hope someone can help me. I plugged in my External drive it is an trancend Storejet 25M3 1 TB and i mounted it with

mkdir /mnt/usbdrive

mount /dev/sd1i/ /mnt/usbdrive/

and i could always tranfer files from my home account to it, but today i make an pkg_add -u and after it i could only Transfer files from my drive to the home Directory. When i

mv file.mp3 newfile.mp3

i get the answer filesystem read-only

what happend? how can i fix that?

i plugged the same drive into my Windows 7 OS and all works fine

many thanks in advance
Reply With Quote
  #2   (View Single Post)  
Old 16th March 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I'm going to make guesses:
  1. You are using partition "i" -- this is a foreign filesystem.
  2. Previously, this foreign filesystem was FAT.
  3. Now, this foreign filesystem is NTFS.
NTFS filesystems must be mounted read-only when using the built-in mount_ntfs(8), called by mount(8) for NTFS filesystems.

You can either reformat the filesystem as FAT, or install sysutils/ntfs-3g, which permits NTFS filesystem writes using fuse(4).

If my guesses are wrong, please provide the output of # fdisk sd1 -- that will tell how the MBR partition table is defined.

Last edited by jggimi; 16th March 2015 at 03:25 PM. Reason: typo
Reply With Quote
  #3   (View Single Post)  
Old 16th March 2015
kerasi kerasi is offline
Shell Scout
 
Join Date: Mar 2013
Location: Germany
Posts: 90
Default

thank you jggimi

iam at work now when i went home i Show you the Output

fdisk sd1

thank you
Reply With Quote
  #4   (View Single Post)  
Old 17th March 2015
kerasi kerasi is offline
Shell Scout
 
Join Date: Mar 2013
Location: Germany
Posts: 90
Default

Hi

Code:
# fdisk sd1                                                                    
Disk: sd1       geometry: 121601/255/63 [1953525168 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 07      0  32  33 - 121601  25  24 [        2048:  1953519616 ] NTFS        
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
Code:
# fdisk sd1i
Disk: sd1i      geometry: 121601/255/63 [1953525168 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 0A  85926  53  36 - 200213  18  49 [  1380404564:  1836018464 ] OS/2 Bootmgr
 1: 69  81499   1  39 - 203112 174  43 [  1309281536:  1953723749 ] Novell      
 2: 6D 108033  63  18 - 229617 137  22 [  1735554131:  1953251627 ] <Unknown ID>
 3: 66 185418  33  34 - 185421 145  15 [  2978742282:       55233 ] NetWare 386
Reply With Quote
  #5   (View Single Post)  
Old 17th March 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I guessed correctly:
Code:
 0: 07      0  32  33 - 121601  25  24 [        2048:  1953519616 ] NTFS
I'll repeat what I said above, for clarity.

  • OpenBSD does not permit NTFS partitions to be mounted read/write with its native tools. Please see the BUGS section of the mount_ntfs(8) man page referenced above.
  • As I mentioned above, you have two choices for sharing partitions with Windows:
    1. Reformat this filesytem as FAT instead of NTFS. Since the size of the partition is just below one terabyte, I recommend FAT32. FAT32 filesystems can have a maximum size of just under two terabytes on drives with 512-byte disk sectors. You can do this from Windows more easily than from within OpenBSD. On OpenBSD it is a two-step process which is likely beyond your current skills.
    2. Use the ntfs-3g package I mentioned above with your NTFS filesystem. This add-on application allows read/write access to NTFS filesystems. It is significantly slower in access than using FAT, since it requires fuse(4) to operate.
Reply With Quote
  #6   (View Single Post)  
Old 17th March 2015
kerasi kerasi is offline
Shell Scout
 
Join Date: Mar 2013
Location: Germany
Posts: 90
Default

thank you

if i reformat it under windows do i loose all my files?
Reply With Quote
  #7   (View Single Post)  
Old 17th March 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Yes. If you want to retain files, back them up before reformatting, then restore afterwards.

Before converting, please note, there are two restrictions for FAT filesystems.
  1. Individual files cannot be larger than 4GB. Larger files cannot be stored on FAT filesystems.
  2. FAT filesystems do not have any file permissions settings. When mounted on OpenBSD, file permissions are emulated.
Reply With Quote
  #8   (View Single Post)  
Old 17th March 2015
kerasi kerasi is offline
Shell Scout
 
Join Date: Mar 2013
Location: Germany
Posts: 90
Default

good morning

so jggimi would you formated the drive with FAT if this drive is for sharing files between openbsd,windows etc?

ps: the strange thing before i could share files between openbsd and windows with that drive but now it wont work anymore and i dont know why :-(

Last edited by kerasi; 17th March 2015 at 11:18 AM.
Reply With Quote
  #9   (View Single Post)  
Old 17th March 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by kerasi View Post
so jggimi would you formated the drive with FAT if this drive is for sharing files between openbsd,windows etc?
OpenBSD only has built-in support for three foreign filesystems: FAT, NTFS (read only), and Ext2. Ext2 is for sharing of filesystems with Linux.

If I were still sharing drives with Windows and wanted to share filesystems, I would use FAT, unless I had a need for individual files larger than 4GB, or a mapping of NTFS access control lists (file permissions) to BSD permissions. In that case I would use ntfs-3g.

I have used both FAT amd ntfs-3g in the past. I am not using either at this time.
Quote:
ps: the strange thing before i could share files between openbsd and windows with that drive but now it wont work anymore and i dont know why :-(
Either you were mounting an NTFS filesystem read-only without being aware of it, and never trying to write, or you previously had a FAT filesystem and reformatted it as NTFS. There are no other possiblities.*

---

* NTFS was experimental from 2003-2010, requiring a custom kernel. Mounting NTFS for write was experimental from 2003-2011, and was finally eliminated entirely in 2011. The man page would warn you not to mount read/write unless you were an NTFS driver developer, as mounting an NTFS filesystem for write access was more likely to damage the filesystem then successfully write to any file.

Last edited by jggimi; 17th March 2015 at 02:30 PM. Reason: revised NTFS read/write history footnote
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
External HD seen as drive 0 by OpenBSD MBR moosejaw OpenBSD General 4 25th July 2013 04:58 PM
backing up to external drive unixjingleman OpenBSD General 5 28th February 2011 12:05 AM
errors re-mounting external drive amorphousone OpenBSD General 3 12th March 2010 05:34 PM
looking for external drive buy suggestions gosha General Hardware 20 5th September 2009 05:32 AM
WD Passport Portable external drive Beastie General Hardware 7 25th April 2009 12:50 PM


All times are GMT. The time now is 03:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick