Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just updated the bios (Dell t3500) to support this drive, it finally shows up as 4TB in the bios. However Linux Lite it's still showing the 1.8TB.
Not exactly sure how to fix this. From search results I've tried:
Code:
fschk -a /dev/sdb1
fschk -y /dev/sdb1
That did nothing. Also:
Code:
sfdisk -s /dev/sdb1
1759526912
I could be wrong, but that too says 1.8TB?
There is an issue with this drive, somehow it got erased sometime ago. I avoid writing to it because it contains several hundred gigs of art that I've created over the past several years. I want to see if I can recover those files. But first I need to get the correct size...
Depends how out of date your distro/tools are - both fdisk and cfdisk support gpt disk nowadays.
Lets's see the parted output - no matter how big the disk the partition size can be arbitrary - granted that msdos structured disk has a (2G-1) limit per partition. And for someone wanting to recover potentially at-risk data, fsck (sp !) is not a good idea.
Last edited by syg00; 04-30-2018 at 06:11 PM.
Reason: granted ...
Model: Unknown (unknown)
Disk /dev/sdb1: 1802GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 1802GB 1802GB ntfs
It was used on a windows computer. It's just mounted, I've written nothing to it. Os is on another drive.
Still showing correctly in bios, shows up normal in a usb drive on windows.
That's what that does... I had a hell of a time flashing a usb because I kept putting the number on the end. Leaving it off fixed it. Thanks for that information.
Here it shows that it's 4TB not 1.8, so I'm not crazy. Just need to get it corrected now.
Code:
Model: ATA ST4000DM000-1F21 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1802GB 1802GB primary ntfs boot
@MensaWater : Not sure what you mean with "change partition table (type)", when the disk contains files to be saved ...
And : Partition table doesn't matter for printing size :
# parted /dev/sdX print
The 3TB disk in my example has a DOS partition table = 2073MB.
-
Your example doesn't show the partition table type which for parted I think means it is msdos.
I mean the table not the individual partition. the msdos table doesn't recognize beyond 2 TB. The gpt table does. See mklabel in parted man page:
Quote:
mklabel label-type
Create a new disklabel (partition table) of label-type.
label-type should be one of "bsd", "dvh", "gpt", "loop",
"mac", "msdos", "pc98", or "sun".
After setting the table to gpt when you do parted and print it will show "Partition Table: gpt"
Just to be clear:
/dev/sd[letters] is the entire disk e.g. /dev/sda, /dev/sdb, /dev/sdea
/dev/sd[letters][numbers] are partitions on the disk (e.g. /dev/sda1 = first partition on first disk, /dev/sda2 = second partition on same disk, /dev/sdc5 = fifth partition on third disk)
You gave us partition information for sda which is presumably your main disk used for boot and OS (one of them is used for swap). You didn't give us the information for sdb which is presumably your new disk.
You'd want to verify you can see all the space on the disk and its partitions. To do that run "parted /dev/sdb print".
Even if the entire disk shows the 4TB if you had then created a first partiton (/dev/sdb1 as mentioned in your first post) of 1.8 TB it would not immediately inherit all the space on the entire disk. You'd need to change the size of the partition itself. If you don't have a partition 2 (/dev/sdb2) you can just modify partition 1 to change its end to use all the space possible (again assuming the entire disk [/dev/sdb] shows all the space).
To restate it: partitions are subdivisions of disks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.