{"id":7371,"date":"2021-01-07T23:02:28","date_gmt":"2021-01-08T04:02:28","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=7371"},"modified":"2021-01-07T23:03:25","modified_gmt":"2021-01-08T04:03:25","slug":"notes-on-adding-drive-to-linux-host","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=7371","title":{"rendered":"Notes on Adding Drive to Linux Host"},"content":{"rendered":"<p>Create partition, format, find UUID, and add line to fstab to mount the volume<\/p>\n<p>[lisa@linuxhost ~]# <strong>parted \/dev\/sdb<\/strong><br \/>\nGNU Parted 3.2.153<br \/>\nUsing \/dev\/sdb<br \/>\nWelcome to GNU Parted! Type &#8216;help&#8217; to view a list of commands.<br \/>\n(parted) <strong>mklabel GPT<\/strong><br \/>\nWarning: The existing disk label on \/dev\/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?<br \/>\nYes\/No? <strong>y<\/strong><br \/>\n(parted) <strong>mkpart primary 2048s 100%<\/strong><br \/>\n(parted) <strong>q<\/strong><br \/>\nInformation: You may need to update \/etc\/fstab.<\/p>\n<p>[lisa@linuxhost ~]# <strong>mkfs.xfs -f \/dev\/sdb1<\/strong><br \/>\nmeta-data=\/dev\/sdb1 isize=512 agcount=4, agsize=163839872 blks<br \/>\n= sectsz=512 attr=2, projid32bit=1<br \/>\n= crc=1 finobt=1, sparse=1, rmapbt=0<br \/>\n= reflink=1<br \/>\ndata = bsize=4096 blocks=655359488, imaxpct=5<br \/>\n= sunit=0 swidth=0 blks<br \/>\nnaming =version 2 bsize=4096 ascii-ci=0, ftype=1<br \/>\nlog =internal log bsize=4096 blocks=319999, version=2<br \/>\n= sectsz=512 sunit=0 blks, lazy-count=1<br \/>\nrealtime =none extsz=4096 blocks=0, rtextents=0<\/p>\n<p>[lisa@linuxhost ~]# <strong>lsblk<\/strong><br \/>\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br \/>\nsda 8:0 0 20G 0 disk<br \/>\n\u251c\u2500sda1 8:1 0 1G 0 part \/boot<br \/>\n\u2514\u2500sda2 8:2 0 19G 0 part<br \/>\n\u251c\u2500fedora-lisa 253:0 0 17G 0 lvm \/<br \/>\n\u2514\u2500fedora-swap 253:1 0 2G 0 lvm [SWAP]<br \/>\nsdb 8:16 0 2.5T 0 disk<br \/>\n<span style=\"color: #ffff00;\">\u2514\u2500sdb1 8:17 0 2.5T 0 part<\/span><br \/>\nsr0 11:0 1 650M 0 rom<br \/>\n[lisa@linuxhost ~]# <strong>blkid | grep sdb1<\/strong><br \/>\n\/dev\/sdb1: <span style=\"color: #ffff00;\">UUID=&#8221;801ebed3-ddd6-459d-bd62-04a0a75f91b8&#8243;<\/span> TYPE=&#8221;xfs&#8221; PARTLABEL=&#8221;primary&#8221; PARTUUID=&#8221;b9a9a340-28f5-4efb-b649-af804ef5bc4c&#8221;<\/p>\n<p>Add a line to \/etc\/fstab to mount the volume &#8212; here I&#8217;m mounting it to \/mnt\/data\/mythtv:<\/p>\n<p>UUID=801ebed3-ddd6-459d-bd62-04a0a75f91b8 \/mnt\/data\/mythtv xfs defaults 0 0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create partition, format, find UUID, and add line to fstab to mount the volume [lisa@linuxhost ~]# parted \/dev\/sdb GNU Parted 3.2.153 Using \/dev\/sdb Welcome to GNU Parted! Type &#8216;help&#8217; to view a list of commands. (parted) mklabel GPT Warning: The existing disk label on \/dev\/sdb will be destroyed and all data on this disk will &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[1250,294,1251],"class_list":["post-7371","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-gptd","tag-linux","tag-partitions"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/7371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7371"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/7371\/revisions"}],"predecessor-version":[{"id":7372,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/7371\/revisions\/7372"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}