LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-01-2019, 08:11 AM   #1
abbas_qamar
LQ Newbie
 
Registered: Sep 2010
Posts: 4

Rep: Reputation: 0
Seagate 5TB External USB - EXT4 - Mounting Read-Only


Hello there,

I just purchased a Seagate 5TB External USB hard drive. Using gdisk, I made partitions and formatted them as EXT4 file system. The partitions auto-mount, but are read-only.

Earlier, the same partitions would mount with read-write. However, the earlier partitions were created using parted and I was seeing alignment errors while formatting with mkfs.ext4 and also while looking at details in fdisk.

So, I deleted the partitions and created them again using gdisk. No alignment issues now. But partitions are mounting read-only.

mkfs.ext4 /dev/sdb1
mke2fs 1.42.13 (17-May-2015)
/dev/sdb1 alignment is offset by 512 bytes.
This may result in very poor performance, (re)-partitioning suggested.

fdisk output
Device Start End Sectors Size Type
/dev/sdb1 65535 976733639 976668105 465.7G Linux filesystem
/dev/sdb2 976733640 1953532814 976799175 465.8G Linux filesystem
/dev/sdb3 1953532815 2930266454 976733640 465.8G Linux filesystem
/dev/sdb4 2930266455 3907000094 976733640 465.8G Linux filesystem
/dev/sdb5 3907000095 4883799269 976799175 465.8G Linux filesystem
/dev/sdb6 4883799270 5860532909 976733640 465.8G Linux filesystem
/dev/sdb7 5860532910 6837266549 976733640 465.8G Linux filesystem
/dev/sdb8 6837266550 7814000189 976733640 465.8G Linux filesystem
/dev/sdb9 7814000190 8790799364 976799175 465.8G Linux filesystem
/dev/sdb10 8790799365 9767533004 976733640 465.8G Linux filesystem

Partition 1 does not start on physical sector boundary.
Partition 3 does not start on physical sector boundary.
 
Old 06-01-2019, 08:19 AM   #2
ugjka
Member
 
Registered: May 2015
Location: Latvia
Distribution: Arch, Centos
Posts: 368
Blog Entries: 5

Rep: Reputation: 264Reputation: 264Reputation: 264
Probably nothing to do with how you format the drive but rather what is the ownership and permissions for the root folder of that drive

Post the output of ls -l /path/to/your/mountpoint/
 
1 members found this post helpful.
Old 06-01-2019, 08:44 AM   #3
abbas_qamar
LQ Newbie
 
Registered: Sep 2010
Posts: 4

Original Poster
Rep: Reputation: 0
xxx@xxx-laptop /media $ ls -lh
total 4.0K
drwxrwxrwx+ 12 root root 4.0K Jun 1 18:19 xxx
xxx@xxx-laptop /media $ ls -lh xxx/
total 40K
drwxr-xr-x 3 root root 4.0K Jun 1 11:54 0bfd2076-d34e-4b16-aa6a-8efd3e519402
drwxr-xr-x 3 root root 4.0K Jun 1 11:54 22c3076a-6109-49d2-8a94-4c82fb706f2c
drwxr-xr-x 3 root root 4.0K Jun 1 11:54 56670e2d-317e-46d7-93ec-0234237f8137
drwxr-xr-x 3 root root 4.0K Jun 1 11:54 69f8ac8c-1970-458e-8cab-a85ced3d7908
drwxr-xr-x 3 root root 4.0K Jun 1 11:53 7f9279aa-666d-4446-aa8b-8aefc43f0583
drwxr-xr-x 3 root root 4.0K Jun 1 11:53 924e7d6c-7e4f-4ef5-bab7-f3f89792974f
drwxr-xr-x 3 root root 4.0K Jun 1 11:53 9ad55055-d40e-4f37-8ef5-9d8ddc80cdd5
drwxr-xr-x 3 root root 4.0K Jun 1 12:41 9df7397c-ec18-4f77-9d2f-f833367f255d
drwxr-xr-x 3 root root 4.0K Jun 1 11:53 bf29f217-bcf8-4a71-aac1-fc549f2607f3
drwxr-xr-x 3 root root 4.0K Jun 1 11:53 d10d677f-3e19-4510-b532-4e2a85cc040a
xxx@xxx-laptop /media $

The partitions mount to /media/xxx/
I chmod /media/xxx/ giving 777 permissions thinking it would inherit to the folders underneath. However, the partitions that mount in this path, don't inherit the permission.
 
Old 06-01-2019, 08:49 AM   #4
ugjka
Member
 
Registered: May 2015
Location: Latvia
Distribution: Arch, Centos
Posts: 368
Blog Entries: 5

Rep: Reputation: 264Reputation: 264Reputation: 264
It seems all files belong to both root user and root group

I suppose your user is xxx, so you could try changing the ownership:

Code:
chown -R xxx:xxx /media/xxx
You'll need root permission to perform that action
 
2 members found this post helpful.
Old 06-01-2019, 09:06 AM   #5
abbas_qamar
LQ Newbie
 
Registered: Sep 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Many thanks for your help and guidance, ugjka!
I can mount the partitions with read/write.
 
Old 06-02-2019, 06:57 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926
Great to hear. If you want, you can mark the thread as "Solved" (see "Thread Tools" at the top of the thread).
 
Old 06-03-2019, 12:11 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
$ mount

If it's actually read-only it'll show (ro,... ) to the side of where it was mounted. Otherwise it's a permissions issue as previously discovered. I didn't even know that you could change the root of an ext* partition. I always just created a sub-directory and chown'd that. But probably more of an effort to avoid lost+found in the usable path with the temptation to delete it. With a 2nd mount to bind the /mnt/ location with where I actually wanted it, like /home/username/.

# mount --rbind /mnt/p1/subdir /home/username

With systemd, you can boot with the / of your distro NOT specified in /etc/fstab. But it will mount read-only when that is the case. Which was my first thought when I read the thread title.
 
Old 06-03-2019, 01:50 PM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,788

Rep: Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674Reputation: 2674
I have this in my /etc/fstab for sdb1

Code:
/dev/sdb1	 /mnt/hd	  auto	      noauto,relatime,diratime,user,exec,dev,suid,nofail     0   0
A lot of those options are for usb keys, but 'user' 'noauto' and suid (I think) help with user writes as long as it's ext2/3/4. I can mount sdb1 if it's ext or vfat (until recently anyhow) but not ntfs-3g. With a user option in sr0, I can mount that too as a luser. But if I let it mount automatically, root mounts it and my luser is locked out. If I don't have it mount automatically, and it's in fstab, a luser can mount it.

If I wasn't so half-assed, I'd go to uuids and have each disk mounted on it's own location. I'm in Slackware, where you do your own thing. If you have a distro that makes up your mind for you, this could be a lot messier.
 
Old 06-03-2019, 08:12 PM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
My stab has UUID=... / ext4 defaults 1 0 and all that jazz. But I set my UUID to something simple to remember / type.

UUID=20190603-1000-1111-1111-111111111111

Where that's the YYYYMMDD that I created it and the HHMM, although I always put 00 for minutes. I don't normally do more than one install in a day, much less per hour. And mostly UUID because I boot from USB and /dev/??? is an unknown depending on how many other devices, hubs, and whatnots are in play. And the rest is what partition it's on.
 
  


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
[SOLVED] Reading Data from Seagate hard drive extracted from Seagate Central acct_nael Linux - Newbie 18 09-20-2018 08:20 PM
Problemas com hd seagate 5tb em um servidor hp ml350 g6 e fedora 20 zanoello Linux - Hardware 3 12-01-2015 03:38 PM
[SOLVED] External USB hard drives no longer mounting read/write -- now read only revbish Puppy 2 01-28-2013 05:44 PM
Seagate goflex home network drive mounting as read only need fix percivalbragg Ubuntu 1 08-29-2012 09:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:12 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
Open Source Consulting | Domain Registration