{"id":2739,"date":"2012-03-15T13:45:32","date_gmt":"2012-03-15T18:45:32","guid":{"rendered":"http:\/\/icesquare.com\/wordpress\/?p=2739"},"modified":"2016-10-15T01:57:28","modified_gmt":"2016-10-15T06:57:28","slug":"how-to-install-a-3tb-drive-on-linux","status":"publish","type":"post","link":"https:\/\/icesquare.com\/wordpress\/how-to-install-a-3tb-drive-on-linux\/","title":{"rendered":"How to Install a 2.5TB, 3TB drives on Linux"},"content":{"rendered":"<p>Recently I got a new hard drive (3TB) for my Linux box at work. I didn&#8217;t realize that it is problematic \/ nightmare to do such a simple work.<\/p>\n<p>First, if you try to use fdisk to add the drive, it won&#8217;t work. Or I should say&#8230; it works, but it only give you a 2TB usable space. This is a limitation of fdisk, because it can handle up to 2^32 -1 sectors (or 2TB). That&#8217;s why fdisk is not a solution here.<\/p>\n<p>It seems that the only solution is using <strong>parted<\/strong>.<\/p>\n<pre>\r\nsudo parted \/dev\/sdd\r\n<\/pre>\n<p><\/p>\n<p>It will return something like this:<\/p>\n<pre>\r\nGNU Parted 2.3\r\nUsing \/dev\/sdd\r\nWelcome to GNU Parted! Type 'help' to view a list of commands.\r\n(parted)\r\n<\/pre>\n<p>First, we want to create a label:<\/p>\n<pre>\r\n(parted) mklabel gpt\r\nWarning: The existing disk label on \/dev\/sdd will be destroyed and all data on this disk will be lost. Do you want to continue?\r\nYes\/No? Yes\r\n<\/pre>\n<p>Then, we want to specify the unit:<\/p>\n<pre>\r\n(parted) unit TB\r\n<\/pre>\n<p>And tell parted to use all available space:<\/p>\n<pre>\r\n(parted) mkpart primary 0 -0\r\n<\/pre>\n<p>Next, we need to review the summary:<\/p>\n<pre>\r\n(parted) print\r\nModel: ATA WDC WD30EZRX-00M (scsi)\r\nDisk \/dev\/sdd: 3.00TB\r\nSector size (logical\/physical): 512B\/4096B\r\nPartition Table: gpt\r\n\r\nNumber  Start   End     Size    File system  Name     Flags\r\n 1      0.00TB  3.00TB  3.00TB  ext2         primary\r\n<\/pre>\n<p>As you can see, the size is 3TB. Don&#8217;t worry about the file system for now (ext2). If it looks good to you, now we need to leave parted.<\/p>\n<pre>\r\n(parted) quit\r\nInformation: You may need to update \/etc\/fstab.\r\n<\/pre>\n<p>Next, we need to format the partition:<\/p>\n<pre>\r\n#CentOS 6\r\nsudo mkfs.ext4 \/dev\/sdd1\r\n\r\n#CentOS 7\r\nsudo mkfs.xfs \/dev\/sdd1\r\n<\/pre>\n<p>After few seconds, it will give you some more information about your drive:<\/p>\n<pre>\r\nmke2fs 1.41.14 (22-Dec-2010)\r\nFilesystem label=\r\nOS type: Linux\r\nBlock size=4096 (log=2)\r\nFragment size=4096 (log=2)\r\nStride=1 blocks, Stripe width=1 blocks\r\n183148544 inodes, 732566272 blocks\r\n36628313 blocks (5.00%) reserved for the super user\r\nFirst data block=0\r\nMaximum filesystem blocks=4294967296\r\n22357 block groups\r\n32768 blocks per group, 32768 fragments per group\r\n8192 inodes per group\r\nSuperblock backups stored on blocks:\r\n        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,\r\n        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,\r\n        102400000, 214990848, 512000000, 550731776, 644972544\r\n\r\nWriting inode tables: done\r\nCreating journal (32768 blocks): done\r\nWriting superblocks and filesystem accounting information: done\r\n\r\nThis filesystem will be automatically checked every 35 mounts or\r\n180 days, whichever comes first.  Use tune2fs -c or -i to override.\r\n<\/pre>\n<p>Now you can use your drive, such as mounting or putting it into \/etc\/fstab<\/p>\n<pre>\r\nsudo mount \/dev\/sdd1 \/mnt\/\r\ndf\r\n\/dev\/sdd1             2.8T   42G  2.6T   2% \/mnt\r\n<\/pre>\n<p>That&#8217;s it! Enjoy your new disk.<\/p>\n<p>&#8211;Derrick<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I got a new hard drive (3TB) for my Linux box at work. I didn&#8217;t realize that it is problematic \/ nightmare to do such a simple work. First, <a class=\"more-link\" href=\"https:\/\/icesquare.com\/wordpress\/how-to-install-a-3tb-drive-on-linux\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1319,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[94,144,6,69],"tags":[48],"class_list":["post-2739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-problems-computer-help-pc-support","category-sever-problem","category-technology","category-troubleshooting-technology","tag-linux"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-Ib","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4152,"url":"https:\/\/icesquare.com\/wordpress\/linuxdevsdb1-more-filesystems-detected-this-should-not-happen\/","url_meta":{"origin":2739,"position":0},"title":"[Linux]\/dev\/sdb1: more filesystems detected. This should not happen,","author":"Derrick","date":"September 12, 2016","format":false,"excerpt":"I had a hard drive sitting around, and I decided to format it such that I could use it in my Linux CentOS box. When I decided to mount it, I got the following error message: mount: \/dev\/sdb1: more filesystems detected. This should not happen, use -t to explicitly specify\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1640,"url":"https:\/\/icesquare.com\/wordpress\/freebsd-unable-to-find-device-node-for-devad0s1b-in-dev\/","url_meta":{"origin":2739,"position":1},"title":"FreeBSD: Unable to find device node for \/dev\/ad0s1b in \/dev!","author":"Derrick","date":"September 30, 2011","format":false,"excerpt":"While I reinstalled the FreeBSD on my FreeBSD box, I got the following error message: Unable to find device node for \/dev\/ad0s1b in \/dev! I searched online and I found different solutions. The most popular one is about using the command, dd, to clean up the first and the last\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1214,"url":"https:\/\/icesquare.com\/wordpress\/building-a-super-large-and-reliable-file-server-with-mixed-size-of-harddisks\/","url_meta":{"origin":2739,"position":2},"title":"Building a Super Large and Reliable File Server with Mixed Size of Harddisks","author":"Derrick","date":"January 17, 2011","format":false,"excerpt":"In this article, I am going to show you how to build a super large, ultra reliable, expandable file server with mixed size of hard drives. Here is my criteria: Large Storage Capacity. At this moment, the largest hard drive is 2TB. I am looking for at least 10TB. Great\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"\/wordpress\/wp-content\/uploads\/2011\/01\/zfs_logo-150x150.jpg","width":350,"height":200},"classes":[]},{"id":4286,"url":"https:\/\/icesquare.com\/wordpress\/how-to-install-zfs-on-rhel-centos-7\/","url_meta":{"origin":2739,"position":3},"title":"How to install ZFS on RHEL \/ CentOS 7","author":"Derrick","date":"January 4, 2017","format":false,"excerpt":"A friend of mine likes to try ZFS on CentOS 7, therefore I decide to make a guide for him. The following instructions have been well tested on CentOS 7. Before you decide to put ZFS in a production use, you should be aware of the following: ZFS is originally\u2026","rel":"","context":"In &quot;Everyday Computer Problem&quot;","block_context":{"text":"Everyday Computer Problem","link":"https:\/\/icesquare.com\/wordpress\/category\/everyday-computer-problem\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/icesquare.com\/wordpress\/wp-content\/uploads\/2011\/01\/zfs_logo.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4648,"url":"https:\/\/icesquare.com\/wordpress\/zfs-on-linux-what-to-do-when-resilver-takes-very-long\/","url_meta":{"origin":2739,"position":4},"title":"[ZFS On Linux] What to Do When Resilver Takes Very Long","author":"Derrick","date":"January 13, 2020","format":false,"excerpt":"If you check your Zpool health status and you notice an error like the following: sudo zpool status pool: myzpool state: DEGRADED status: One or more devices are faulted in response to persistent errors. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Replace the\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3914,"url":"https:\/\/icesquare.com\/wordpress\/zfs-linux-vs-freebsd\/","url_meta":{"origin":2739,"position":5},"title":"Running ZFS on Linux: Things you should know and be aware of","author":"Derrick","date":"February 29, 2016","format":false,"excerpt":"First Published: Feb 29, 2016 Last Revised: January 10, 2026 ZFS is a next-generation file system renowned for its reliability and advanced features. However, due to legal and licensing issues, it is not included by default in most Linux distributions. Fortunately, you can still install (ZFS on Linux) with just\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"https:\/\/icesquare.com\/wordpress\/wp-content\/uploads\/2011\/02\/Hardware.png","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2739"}],"version-history":[{"count":15,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2739\/revisions"}],"predecessor-version":[{"id":4193,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/2739\/revisions\/4193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media\/1319"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}