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-19-2020, 07:20 PM   #1
oldngray
LQ Newbie
 
Registered: Jan 2014
Location: SW Florida US
Distribution: LinuxMint; Fedora
Posts: 9

Rep: Reputation: Disabled
Question External HDD: couldn't open device. Permission denied.


I have an old LaCie 2TB Thunderbolt2 device which had been used by someone else in a RAID configuration. The original 2.5"HDD was removed from the RAID, partitioned and reformatted as HFS and working well in the LaCie enclosure. I removed it and replaced the HDD with a 2.5" SSD which is working well.

I am trying to connect the removed HDD as an external drive to my Linux laptop for backups etc. I have been trying (with my limited knowledge of Linux) to partition it and reformat it to Ext4 but the format continually fails.

Terminal readout from relative portion of parted command:

donmac@donmac-Inspiron-linux:~$ sudo parted -l
[sudo] password for donmac:
Model: ST2000LM 003 HN-M201RAD (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 2000GB 2000GB primary
------
Terminal readout from fdisk command:

donmac@donmac-Inspiron-linux:~$ fdisk /dev/sdb

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. w

fdisk: cannot open /dev/sdb: Permission denied
------
An internet page on formatting suggested using "blockdev".
Readout of suggested blockdev command:

donmac@donmac-Inspiron-linux:~$ sudo blockdev -v --setrw /dev/sdb
[sudo] password for donmac:
blockdev: cannot open /dev/sdb: No such file or directory
------
Every attempt to open the device indicates that it cannot be opened. Can anyone assist me with a command or series of commands that will enable the disk to be erased, partitioned and formatted as ext4?

Thanks.
 
Old 07-19-2020, 07:41 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,002

Rep: Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872
Quote:
fdisk /dev/sdb
If this is a direct copy/pasted you forgot to use sudo...

Any function you can do with fdisk you can do with parted.
 
1 members found this post helpful.
Old 07-19-2020, 08:41 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 17,066
Blog Entries: 27

Rep: Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230Reputation: 5230
This is a shot in the dark, but is the drive mounted? You cannot partition a mounted drive.

Also, please surround terminal output with "code" tags, which become available when you click the "Go Advanced" button beneath the compose/edit post window. It makes terminal output much easier to read.
 
1 members found this post helpful.
Old 07-19-2020, 09:12 PM   #4
oldngray
LQ Newbie
 
Registered: Jan 2014
Location: SW Florida US
Distribution: LinuxMint; Fedora
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you for the replies.

michaelk.. In your comment concerning the direct copy/paste... it was not. I did use sudo. Thanks for that reminder.

frank bell.. No, the disk was not mounted. Thanks also for tip concerning the "code" tags. I'll look that up. I can see where those would help a lot.
 
1 members found this post helpful.
Old 07-19-2020, 10:41 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,002

Rep: Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872Reputation: 3872
Actually, partitioning looks looks ok, all you need to do is format it with a filesystem using mkfs as desired i.e ext4, xfs etc.
 
1 members found this post helpful.
  


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
SFTP -- Couldn't get handle: Permission denied edimanic Linux - Newbie 3 12-09-2016 03:39 PM
ns: stop: couldn't execute "nam": permission denied while executing "exec nam Niraj Mishra Linux - Newbie 1 11-08-2014 07:57 AM
Couldn't create /home/emailaddress/.openwebmail/db (permission denied) sar_kasirye Linux - Newbie 4 05-01-2011 03:01 AM
[SOLVED] ChrootDirectory in sftp and "Couldn't get handle: Permission denied" errors brittonv Linux - Security 11 04-26-2010 12:08 PM
Couldn't create socket: Permission denied piforever Fedora 9 12-22-2005 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:03 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