Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using a hotswap rack[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
A.S. Pushkin
Guru
Guru


Joined: 09 Nov 2002
Posts: 418
Location: dx/dt, dy/dt, dz/dt, t

PostPosted: Mon Jan 23, 2017 7:17 pm    Post subject: Using a hotswap rack[SOLVED] Reply with quote

I hate to pose this question, but searches have not yielded an answer.

Last year I built a new box. My system is loaded on a Samsung 850 PRO SSD, with home partition on a Seagate Baracuda.
I decided to include a hotswap rack and currently have a Seagate 1TB installed there. The intent is primarily for files from CAD(Blender and Freecad), video and audio editing.

Currently it it does work, but I don't like the way it is mounted and wonder how I might alter that. Right now it mounts like this:

/dev/sdd2 437G 71M 414G 1% /run/media/pushkin/389cf391-5608-4b9f-be33-84939c3f37f2
/dev/sdd1 481G 70M 456G 1% /run/media/pushkin/9a84a5b7-8b2f-48ab-a5a8-6bf68365a6b7

I have a two partitions on that drive right now. I had hoped to have the rack mount under other than /mnt or /media.

Any suggestions would be appreciated.
_________________
ASPushkin

"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell


Last edited by A.S. Pushkin on Sun Apr 01, 2018 12:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Mon Jan 23, 2017 9:06 pm    Post subject: Reply with quote

Quote:
I have a two partitions on that drive right now. I had hoped to have the rack mount under other than /mnt or /media.


mounting as /media is bad in my eyes. it was introduced with those automounters a few years ago, before it was usually alawys /mnt

When you want it to be mounted somewhere else, create a fstab entry with the uuid!

I do not rely on automounting. I mount stuff myself, or have fstab entries
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Mon Jan 23, 2017 9:30 pm    Post subject: Reply with quote

A.S. Pushkin,

Make mount points wherever you want. Under /mnt is traditional.
Add entries to /etc/fstab to perform the mount.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
A.S. Pushkin
Guru
Guru


Joined: 09 Nov 2002
Posts: 418
Location: dx/dt, dy/dt, dz/dt, t

PostPosted: Mon Feb 13, 2017 2:54 pm    Post subject: Using a hotswap rack Reply with quote

Thanks for the responses.

Roman_Gruber I'm beginning to agree with you on the automount. I'm embarrassed to say I've never fully grasped mounting
so I initially was happy with it, but see this as a small problem.

NeddySeagoon thank you, too.

May I pose a question to you both? I've tried setting fstab to handle this hotswap rack. When I built this current box, I created
a special location, but I suspect Roman_Gruber is right, that is to mount at /mnt. The question I have is if I add an fstab entry can I make a generic one
that would function for any sata drive I would install in the hotswap rack, at /mnt regardless of partition schemes that may be used? Currently
the 1TB drive has two partitions, but that might vary depending on the use. The current drive is just extra space, but others might be used for
audio editing and video editing. I'm working with Blender, Freecad, ardour and kdenlive. I may jump into a commercial CAD program BricsCAD as well.

Thanks!
_________________
ASPushkin

"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Mon Feb 13, 2017 3:14 pm    Post subject: Re: Using a hotswap rack Reply with quote

A.S. Pushkin wrote:

May I pose a question to you both? I've tried setting fstab to handle this hotswap rack. When I built this current box, I created
a special location, but I suspect Roman_Gruber is right, that is to mount at /mnt. The question I have is if I add an fstab entry can I make a generic one
that would function for any sata drive I would install in the hotswap rack, at /mnt regardless of partition schemes that may be used?


Code:
blkid


It all depends on the use case.

USE gpt when dealing with uefi and (or) Drives bigger as 2.2TB
use e.g. UUID (check with blkid), PARTUUID? or any other unique way to name a partition.

Just generate several fstab entries. You 'll probably need ot initialize it anyway. Let'S say create gpt partition table, file system. I recommend that you will use lvm2 "Containers" (lv / vg) and creatre those fstab entries. Your can use the same mountpoint anyway because the hotswap will only allow a set of drives anyway at a point of time. I also write the lvm2 names on the drives with a marker these days

lvm2 is more flexible as the common used partition thing. IT also depends if you are using af file system which allows growing or shrinking of the partition.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Mon Feb 13, 2017 3:38 pm    Post subject: Reply with quote

A.S. Pushkin,

You cannot make a generic fstab entry for any hard drive.
You don't mount drives, you mount the filesystems that they contain. To do that, you need to know something about either the partition that holds the filesystem, or the partition itself.
It follows that you need to know how many partitions are on the drive at a minimum.

You can cheat a little though. If you know that several partitions are all mutually exclusive, because, say, you can only put one drive into the hot swap bay at a time, you can have several fstab entries poinitng to the same mount point.

e.g.
Code:
UUID=1c981da8-f0f6-4953-b485-8dbc9e7c6879  /mnt/music                    ext4  noatime,nofail    1 0
UUID=24e36648-f410-40b8-931f-41ad46741a47  /mnt/music                    ext4  noatime,nofail    1 0
UUID=c486b7cc-6df4-4a55-8add-0691db3bbc02  /mnt/music                    ext4  noatime,nofail    1 0


If somehow to manage to have all three filesystems online at the same time, they would be mounted on top of each other at /mnt/music
You need to be sure that can't happen.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3489

PostPosted: Mon Feb 13, 2017 8:44 pm    Post subject: Reply with quote

Hint: LABEL is a very convenient feature.
I don't swap drives nearly often enough to care, but if I needed automount I'd go with a cheat script creating directories named after labels on filesystems then mounting there.
Maybe - just maybe - you could even use already existing helpers. GUI tools are doing something similar. It can be good enough unless they depend on half of the DE :)
Back to top
View user's profile Send private message
A.S. Pushkin
Guru
Guru


Joined: 09 Nov 2002
Posts: 418
Location: dx/dt, dy/dt, dz/dt, t

PostPosted: Mon Feb 20, 2017 7:16 pm    Post subject: Using a hotswap rack Reply with quote

NeddySeagoon, szatox, and Roman_Gruber, thanks for the input. It's clear I've been playing a Windose
user with my Linux box.

I like the idea of LVM, too.

I should add that I've used Clonezilla very successfuly.

Thanks.
_________________
ASPushkin

"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
Back to top
View user's profile Send private message
A.S. Pushkin
Guru
Guru


Joined: 09 Nov 2002
Posts: 418
Location: dx/dt, dy/dt, dz/dt, t

PostPosted: Wed Mar 28, 2018 7:05 pm    Post subject: Foruther questions on Hotswap rack Reply with quote

Until my recent update, which ever drive was in the hotswap rack would be auto mounted. With that update it no longer does.
if I run the mount command I can mount it at /mnt.

When I built my current box I opted to move my distfiles to a separate drive to save space on my / drive.
Currently fstab has it mounted at /mnt, which is a problem as when I mount manually to drive in my hotswap
rack. I typically use that for CAD files and Video/audio files. I'd like to mount the distfiles drive another way.
I'm not certain if I should create a directory off of / or what, so that I can leave /mnt free. My optical drive
mounts at /media.

Suggestions would be appreciated.

TIA.
_________________
ASPushkin

"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Wed Mar 28, 2018 7:20 pm    Post subject: Reply with quote

A.S. Pushkin,

/mnt is not intended to be used as a mount point itself.
Its directory containing other mount points.
Code:
$ ls /mnt
bluray  floppy  media   usb2_32_mini  usb3_16
cdrom   gentoo  oldvar  usb2_64       usbstick



My filesystem tree is
Code:
$ df -Th
Filesystem                 Type   Size  Used Avail Use% Mounted on
/dev/mapper/static-root    ext4   976M  761M  149M  84% /
/dev/mapper/static-usr     ext4   158G  109G   42G  73% /usr
/dev/dm-12                 ext4   5.8G 1002M  4.5G  18% /var
tmpfs                      tmpfs  1.6G  180K  1.6G   1% /run
shm                        tmpfs  7.9G   34M  7.8G   1% /dev/shm
cgroup_root                tmpfs   10M     0   10M   0% /sys/fs/cgroup
/dev/mapper/vg-home        ext4   1.5T  1.1T  357G  76% /home
/dev/shm                   tmpfs  7.9G   20K  7.9G   1% /tmp
/dev/mapper/static-opt     ext4   976M  273M  636M  31% /opt
/dev/mapper/static-local   ext4   976M  6.5M  903M   1% /usr/local
/dev/mapper/static-portage ext4   3.0G  319M  2.5G  12% /usr/portage
/dev/mapper/vg-distfiles       ext4   148G  117G   25G  83% /usr/portage/distfiles
/dev/shm                   tmpfs  7.9G     0  7.9G   0% /var/tmp/portage
/dev/mapper/vg-var         ext4    58G   21G   35G  38% /mnt/oldvar


As long as you can describe the filesystem tree in /etc/fstab, you can use it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
A.S. Pushkin
Guru
Guru


Joined: 09 Nov 2002
Posts: 418
Location: dx/dt, dy/dt, dz/dt, t

PostPosted: Sat Mar 31, 2018 3:19 pm    Post subject: Using a hotswap rack Reply with quote

Thanks for the feedback! You may have covered this here, but let me ask this question
as it clearly will vary with each drive.

As I noted, with my recent upgrade the automounter is no longer working on my hotswap rack.


I'll have to get my Unix book out as now I've been reminded that everything is about "files"
and that applies in Linux as well.

NeddySeagoon thanks for the refresher, too, about /mnt.

I've never used LVM, though I would like to have done so, but this raises still another question.
If my Linux box is not using LVM, can I set LVM up on what amounts to a portable drive, that is
a drive in a hotswap rack?

As I think about it, though I like the automounter, I do prefer having more control on what I attach to
my system.

Thanks for the help in this.
_________________
ASPushkin

"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
Back to top
View user's profile Send private message
A.S. Pushkin
Guru
Guru


Joined: 09 Nov 2002
Posts: 418
Location: dx/dt, dy/dt, dz/dt, t

PostPosted: Sun Apr 01, 2018 12:47 pm    Post subject: Reply with quote

NeddySeagoon thanks for this reminder!
Quote:
/mnt is not intended to be used as a mount point itself.
Its directory containing other mount points.


I created a directory at /mnt and running the mount command gave me access to the hotswap rack drive.

Often time Gentoo is painful, but the forum is one reason I continue with Gentoo as my primary Linux distro!

Thanks for the help, all who responded to my post! NeddySeagoon, your reminder was particularly important!

Thanks to all.
_________________
ASPushkin

"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum