Linux disk hardware question.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Linux disk hardware question.
Linux disk hardware question.
20-08-2014 9:51 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Currently the two present disks are called /dev/sda & /dev/sdb
Is the name got from the physical SATA port on the motherboard?
This is quite important as I want the present /dev/sda to be referenced as /dev/sdc (or higher)
and the new disk as /dev/sda.
(I'm replacing a disk which is predicted to fail soon, with a newer one, but on a gradual basis).
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Linux disk hardware question.
20-08-2014 10:02 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You're better off editing your fstab and using uuid as identifiers to hard code mount points. That way they won't mind which ports they are on and always get mounted in the right place.
Re: Linux disk hardware question.
20-08-2014 10:03 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You could change your /etc/fstab to mount based on the UUID of the filesystems instead.
UUID=1cb270f0-7ad9-4654-91b2-a49938de2905 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=142b6da3-ecc3-424f-a6d6-1a5be1f1b369 none swap sw 0 0
UUID=2a446d37-ae69-4888-8a6d-d8050a7f6d0d /home ext4 errors=remount-ro
You find the uuid's with blkid
Re: Linux disk hardware question.
20-08-2014 10:40 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I have to re-install Mint because I've managed to semi-screw up both the graphics drivers and X and have a drive which is on it's way out.
So I can do this - but I was trying to avoid too much scribbling of uuids (which work at the disk partition level).
Because I want to copy some of the data, I will get 3(?) new uuids to use in my fstab.

Present fstab - which looks a mess:
Which is plain horrible.
Quote # /dev/sda1
UUID=51fe6ca2-9ab9-4b52-8ae5-35770fede582 / ext4 rw,errors=remount-ro,noatime 0 1
# /dev/sda2
#UUID=0648d2d1-9a41-4257-8b79-dfc7bc227e82 /home ext4 rw,errors=remount-ro 0 0
/dev/sda2 /home ext4 defaults,noatime,user_xattr 0 2
/dev/sda3 /mnt/video ext4 defaults,noatime 0 2
/dev/sdb2 /mnt/backup ext4 defaults,noatime 0 2
/dev/sdb3 /mnt/filestore ext4 defaults,noatime 0 2
/swapfile none swap sw 0 0
NAS:/mnt/C/ /media/NAS nfs rw,hard,intr,users,noauto,noatime,namlen=250 0 2
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Linux disk hardware question.
21-08-2014 5:16 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If you use "mount by label" (temporarily), it is easy to change disks/partitions and then change to "uuid" or "by-id" for running. I tend to use "by-id" as it is "human friendly" and you can cut/paste/modify the partition reference easily - including for "/"

The only "difficult" bit is "repairing" grub to use a new boot disk/partition

Using a TP-Link Archer VR600 modem-router.
Re: Linux disk hardware question.
21-08-2014 5:44 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
This is a default install then the added 2 drives:
# / was on /dev/sda1 during installation
UUID=c00e34f9-a66d-4686-8304-b0da2a7ffb14 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda3 during installation
UUID=69c1ff4e-ac61-41a5-9c31-c51ff0650dad /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=ffb4980e-a4a2-48fc-8e33-da4b5f9b9138 none swap sw 0 0
LABEL=Tosh /mnt/Avi ext4 defaults 0 0
LABEL=TV /mnt/TV ext4 defaults 0 0
I let it install ignoring all additional drives then after install I make the mount points and load them in fstab.
These are on my "server" and then mounted to /exports for nfs shares. (I use /exports as an easy point to mount from)
This pc only has one drive so no extra mounts other than /home on a different partition.
Re: Linux disk hardware question.
21-08-2014 6:04 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
So I've decided to do a totally fresh install - which solves my GRUB problem.
I shall have to read up about that LABEL idea.
However, many utilities still use the /dev/sdxy notation e.g. (different PC)

Quote jeremy@NETBOOK ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 20G 7.7G 11G 43% /
udev 1.8G 4.0K 1.8G 1% /dev
tmpfs 369M 1.1M 367M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.8G 684K 1.8G 1% /run/shm
/dev/sda7 366G 5.3G 342G 2% /home
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Linux disk hardware question.
21-08-2014 6:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
E.g. in the case above TV is /dev/sdc1 etc.
But to answer you original Q, it is normally the first discovered disk is a then b etc. So plugging the new drive into the old a slot will make it the default to install to. Just watch your bios isn't clever and swaps the boot order about.
To use label when you partition it using gparted give the disk/partition a label, you can then use LABEL= in fstab, great for home etc.
Re: Linux disk hardware question.
21-08-2014 6:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Linux disk hardware question.
21-08-2014 9:40 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I mount everything by fstab, but all partitions have a label. There are a number of benefits to assigning labels - firstly (in Ubuntu at least), removable USB disks mount automatically in /media/<label> when connected without needing to manually mount or put details in fstab. You always know where they will be mounted, by a logical human-readable (or not, if you so wish) name. I also use labels in some scripts for obtaining /dev/sdx in a multiple disk system to pass to hdparm or smartctl.
Re: Linux disk hardware question.
22-08-2014 2:01 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'm not planning on using different partition numbers for / and /home so hopefully GRUB will be OK on the reinstall.
Currently USB sticks automount as USB1, USB2 etc
I've been playing with LVM in a small way, which effectively uses labels to reference volumes (filesystems).
I've got an external disk with 20 volumes on it and any attempt to mount a volume manually is rather fraught.
I have to use a script to reliably access the right volume.
So I will standardise most of my fstab with UUID's (+ comment lines).

I hope to try all this in the next few days when my spare SATA cable arrives...
"In The Beginning Was The Word, And The Word Was Aardvark."
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Linux disk hardware question.