How to mount PiDrive on your Raspberry pi?

So, you bought a PiDrive from WD Labs and you want to mount it to yours Raspberry Pi? So, this tutorial might help. Note: I'm using my Raspberry Pi 3 and ordered PiDrive from NextCloud Box. And I will be using entire PiDrive as a one giant partition instead of partitioning it into several partitions.

Follow these steps:
- Connect your PiDrive to Raspberry, boot your Raspberry. Then find where your Raspberry Pi is mounted:
$ sudo fdisk -l
<... Lots of input here ...>
Disk /dev/sda: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


So, our Raspberry lives on /dev/sda. Good.

- Format this partition by using ext4:
$ sudo mkfs.ext4 /dev/sda1 -L "PiDrive"

- Mount partition to your system to /mnt/data
$ sudo mkdir /mnt/data
$ sudo mount -t ext4 -o "noatime" /dev/sda /mnt/data

 
- You need to setup correct user permissions on your mounted drive. First of all, find your UID/GID:
$ id
uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio)

So, in my case, UID/GID are 1000/1000.

Set permissions on drive:
$ sudo chown -R 1000:1000 /mnt/data
$ sudo chmod -R 775 /mnt/data


And you're done!

But you might want to permanently mount our PiDrive. So, you need to edit /etc/fstab file to do this.

- Find UUID of your drive:
$ sudo blkid
/dev/mmcblk0: PTUUID="6f92008e" PTTYPE="dos"
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="947B-B89A" TYPE="vfat" PARTUUID="6f92008e-01"
/dev/mmcblk0p2: UUID="eda95d8a-9cdd-4224-96d0-890b4791600c" TYPE="ext4" PARTUUID="6f92008e-02"
/dev/sda: LABEL="PiDrive" UUID="0562789e-5f04-44c6-b36e-c64bb4e340bf" TYPE="ext4"


So, in my case UUID is 0562789e-5f04-44c6-b36e-c64bb4e340bf.

- Edit /etc/fstab and add the following entry:
$ sudo nano /etc/fstab
/dev/disk/by-uuid/0562789e-5f04-44c6-b36e-c64bb4e340bf /mnt/data ext4 defaults,noatime,nofail 0 0


Now you're finally done :)

Komentarai

Awesome blog! Is your theme custom made or did
you download it from somewhere? A theme like yours with a few simple tweeks
would really make my blog stand out. Please let me know where you got your design.
Kudos

Greetings I am so excited I found your weblog, I really found you by accident, while
I was browsing on Yahoo for something else, Regardless
I am here now and would just like to say kudos for a incredible
post and a all round enjoyable blog (I also love the
theme/design), I don’t have time to read through it all at the moment but I have bookmarked it and also added
your RSS feeds, so when I have time I will be back
to read a great deal more, Please do keep up the superb b.

A motivating discussion is worth comment.
I think that you need to publish more about this subject, it may not be a
taboo matter but usually folks don't speak about these topics.
To the next! Cheers!!

Today, while I was at work, my sister stole my apple ipad
and tested to see if it can survive a thirty foot drop, just so she can be a
youtube sensation. My apple ipad is now broken and she has 83 views.

I know this is completely off topic but I had to share it with someone!

Link exchange is nothing else however it is only placing the other person's web site link on your page at proper place and other person will
also do same for you.

Definitely believe that which you stated. Your favorite reason appeared to
be on the web the easiest thing to be aware of.
I say to you, I definitely get annoyed while people consider worries that
they plainly don't know about. You managed
to hit the nail upon the top and also defined out the whole thing without having
side effect , people can take a signal. Will likely
be back to get more. Thanks

Good information. Lucky me I recently found your website by accident (stumbleupon).

I've book-marked it for later!

Wonderful blog! I found it while searching on Yahoo News.
Do you have any tips on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Many thanks

I just couldn't go away your website before suggesting that I
actually loved the usual info a person provide to your visitors?

Is gonna be back often to inspect new posts

Sweet blog! I found it while searching on Yahoo News.

Do you have any tips on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Many thanks

Thanks for sharing such a fastidious opinion, article is good, thats why i have read
it fully

I like what you guys are up too. Such clever work and
exposure! Keep up the superb works guys I've included you guys to
blogroll.

A person necessarily help to make significantly articles I might state.
This is the first time I frequented your website page
and so far? I amazed with the research you made to make this actual post
amazing. Wonderful task!

Nice response in return of this issue with genuine
arguments and explaining the whole thing regarding that.

Asking questions are actually good thing if you are not understanding anything totally, however this piece of writing
provides good understanding even.

Quality posts is the crucial to interest the users to pay a
quick visit the website, that's what this website is providing.

I have been exploring for a little for any high quality articles
or weblog posts in this kind of house . Exploring in Yahoo I finally stumbled upon this web site.

Reading this information So i'm glad to convey that I've an incredibly excellent uncanny
feeling I came upon exactly what I needed. I such a lot certainly will make certain to do not forget this web
site and give it a glance on a continuing basis.

Hey there! I'm at work browsing your blog from my new iphone!
Just wanted to say I love reading your blog and look
forward to all your posts! Carry on the outstanding
work!

Hello would you mind letting me know which web host you're utilizing?
I've loaded your blog in 3 completely different internet browsers
and I must say this blog loads a lot quicker then most.
Can you suggest a good web hosting provider at a reasonable
price? Cheers, I appreciate it!

There's certainly a great deal to learn about this topic.

I really like all of the points you've made.

Hi there to every single one, it's actually a pleasant for me to go to see this web site, it includes priceless
Information.

Incredible! This blog looks just like my old one! It's on a entirely
different topic but it has pretty much the same page layout and design. Superb choice of colors!

Thanks for every other informative web site. The place else could
I am getting that kind of info written in such an ideal way?
I've a project that I am just now running on, and I have been on the glance out for such info.

Wonderful post! We are linking to this particularly great content
on our site. Keep up the good writing.

That is very fascinating, You're an excessively skilled blogger.
I have joined your rss feed and stay up for searching for more of your wonderful post.
Also, I have shared your web site in my social networks

Hello there, I discovered your site by means of Google at the same time as searching for a similar subject, your web
site got here up, it seems great. I have bookmarked it in my google bookmarks.

Hello there, simply became alert to your weblog via Google,
and located that it's truly informative. I am going to watch out for brussels.
I'll be grateful when you continue this in future.
Lots of other folks will likely be benefited from your writing.

Cheers!

Thanks for ones marvelous posting! I definitely enjoyed reading
it, you might be a great author. I will make certain to bookmark your
blog and will come back down the road. I
want to encourage yourself to continue your great writing, have a nice day!

I'm gone to tell my little brother, that he
should also go to see this blog on regular basis to obtain updated from hottest information.

Hi there, for all time i used to check blog posts here in the early hours in the morning, for
the reason that i enjoy to find out more and more.

magnificent points altogether, you simply gained a brand new reader.

What could you suggest in regards to your post that you made a few days in the past?

Any positive?

I'm really inspired along with your writing
abilities as neatly as with the format in your blog.
Is that this a paid theme or did you customize it yourself?
Either way stay up the excellent high quality writing, it's rare to see a nice weblog like this one these days..

Why viewers still make use of to read news papers
when in this technological globe the whole thing is available on net?

hello!,I really like your writing so a lot! share we keep up
a correspondence more about your article on AOL? I require an expert in this area to solve my problem.

May be that is you! Looking ahead to see you.

My family always say that I am wasting my time here at web,
except I know I am getting know-how every day by reading thes
fastidious articles or reviews.

Hi to every , as I am really eager of reading this web site's
post to be updated daily. It contains fastidious material.

What's up it's me, I am also visiting this website
regularly, this website is genuinely pleasant and the users are genuinely sharing fastidious thoughts.

Asking questions are truly fastidious thing if you are not understanding anything totally,
except this piece of writing provides good understanding even.

This paragraph will assist the internet visitors for building up
new blog or even a weblog from start to end.

Howdy! This blog post could not be written much better!
Reading through this post reminds me of my previous roommate!
He always kept talking about this. I will send this post to him.

Pretty sure he's going to have a great read. I appreciate you for sharing!

Spot on with this write-up, I absolutely believe that this website needs a great deal more attention. I'll probably
be returning to read through more, thanks for the info!

Hey! This is kind of off topic but I need some advice from an established blog.

Is it very hard to set up your own blog? I'm not very techincal but I can figure things out pretty fast.
I'm thinking about setting up my own but I'm not sure where
to start. Do you have any tips or suggestions? Thanks

Hi! I'm at work browsing your blog from my new
iphone! Just wanted to say I love reading through your blog and look forward to all your posts!
Keep up the outstanding work!

I always spent my half an hour to read this website's content everyday along with a mug of coffee.

I've read a few just right stuff here. Certainly value bookmarking for revisiting.
I wonder how much attempt you set to create such a magnificent informative website.

I really like it when individuals get together and share ideas.

Great website, continue the good work!

You are so cool! I don't think I have read through anything like that before.
So good to find another person with genuine thoughts
on this subject. Really.. thanks for starting this up. This website is one thing that is
required on the web, someone with some originality!

Very nice post. I simply stumbled upon your weblog and wanted
to say that I have really loved browsing your weblog posts.

In any case I will be subscribing for your feed and I
am hoping you write again very soon!

If you desire to get a good deal from this post then you
have to apply such techniques to your won webpage.

I'm amazed, I have to admit. Rarely do I encounter a blog that's both equally
educative and engaging, and without a doubt, you have hit the nail on the head.
The problem is an issue that not enough men and women are speaking intelligently about.
I am very happy that I stumbled across this in my search
for something relating to this.

Greetings! Very useful advice in this particular article!
It's the little changes that make the greatest changes. Thanks a lot for sharing!

Komentuoti