You are not logged in.
Hello, i have a new SSD which i'd like to mount for extra space capacity. I already have Arch linux installed on an SSD and just trying to mount this new one for more space and confused on how to do this. I think i want to use fstab but i'm a noob and not really sure how to do this, I have used google for help but all the results are for installing arch on a SSD which ive already done.
Here's my output for
fdisk -l
:
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x99067fe8
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 10487807 8388608 4G 82 Linux swap / Solaris
/dev/sda3 10487808 976773167 966285360 460.8G 83 Linux
Disk /dev/sdb: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SPCC Solid State
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Any help will be appreciated, thanks!
EDIT:
To noobs of the future that come across this wondering the same here is how I did it:
View the drives/disks find the one you want to add
fdisk -l
then run the following command to create a partition for the desired drive/disk:
sudo fdisk
while in fdisk use the m command for any help, but ideally you want to create a new partion with `n` and I just went with all the defaults then press `w` to save it. Then you want to create a filesystem I went with ext.4 with the following command
sudo mkfs.ext4 [*name of your drive/disk*]
Then run the command `blkid` to get the UUID of the drive/disk and edit your /etc/fstab file to add it in there with your desired options. I accidentally set the mount directory to /home at first which was a bad idea and did not allow me to log in after restarting so i had to open terminal from desktop manager and make a new directory and mount it there. Hopes this helps any one shout out to the guy who helped me in the replies down below!
Last edited by 0xl1ickster (2021-09-24 05:00:30)
Offline
Format /dev/sdb (create a partition and/or filesystem) and then check the UUID using `blkid`. You can then use the UUID to create an entry in /etc/fstab and mount it where you like (/home/data, for example).
If you are wanting to create system space, the you'll need a diffeent approach...
Offline
Format /dev/sdb (create a partition and/or filesystem) and then check the UUID using `blkid`. You can then use the UUID to create an entry in /etc/fstab and mount it where you like (/home/data, for example).
If you are wanting to create system space, the you'll need a diffeent approach...
How do I create a partition and/or filesystem? like what commands would i run sorry im a noob
Offline
You use exactly the same commands that you used when you installed Arch. There is no magic about it:
Offline
You use exactly the same commands that you used when you installed Arch. There is no magic about it:
Ok thanks for your help btw , so i think i created the partition successfully heres the output of `fdisk -l` now:
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x99067fe8
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 2099199 2097152 1G 83 Linux
/dev/sda2 2099200 10487807 8388608 4G 82 Linux swap / Solaris
/dev/sda3 10487808 976773167 966285360 460.8G 83 Linux
Disk /dev/sdb: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SPCC Solid State
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xea488cd4
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1000215215 1000213168 476.9G 83 Linux
but when i run `blkid` i dont get a UUID for this drive heres my output on that command:
/dev/sdb1: PARTUUID="ea488cd4-01"
/dev/sda2: UUID="8ebadb72-2098-4109-9fb8-5db52c29a930" TYPE="swap" PARTUUID="99067fe8-02"
/dev/sda3: UUID="4fd53cb2-4042-4ca4-bb42-d90579d478c8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="99067fe8-03"
/dev/sda1: UUID="e4d8fa8e-52dd-413d-b363-60bce8a58d69" BLOCK_SIZE="4096" TYPE="ext2" PARTUUID="99067fe8-01"
Offline
Offline
You use exactly the same commands that you used when you installed Arch. There is no magic about it:
ahh nvm im stupid lol disregard last reply i forgot to create filesystem, but final questions can i mount this anywhere for example /work even though thats not a premade directory? like will it automatically create said directory ?
ohh and what should i make the options and dump, pass?
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdb1
UUID=bfd00092-bf79-4e1b-8e3d-d60103774b5c /work ext4 ??? ? ?
# /dev/sda3
UUID=4fd53cb2-4042-4ca4-bb42-d90579d478c8 / ext4 rw,relatime 0 1
# /dev/sda1
UUID=e4d8fa8e-52dd-413d-b363-60bce8a58d69 /boot ext2 rw,relatime 0 2
# /dev/sda2
UUID=8ebadb72-2098-4109-9fb8-5db52c29a930 none swap defaults 0 0
Last edited by 0xl1ickster (2021-09-24 04:20:07)
Offline
Yes, you can mount it at any pre-existing mountpoint.
See man fstab for a description of all of the fields.
Offline
Yes, you can mount it at any pre-existing mountpoint.
See man fstab for a description of all of the fields.
Alright got it up and running thanks for the help my friend!
Offline
Cool. Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
Another small tip: use bind mounts to have a directory available somewhere else (transparently for all software). Read the mount man page and fstab man page. I.e. something like this in fstab:
# Binds from other HDDs to /data...
/from/some/path /to/some/path none user,bind 0 0
/from/another/path /to/some/other/path none user,bind 0 0
In practice, the need to do this may arise sooner or later. Another alternative is to use symlinks, but some software might not like it. Bind mounts are more reliable in my experience.
LVM is another handy alternative to have a filesystem on several block devices - but keep in mind that if a filesystem resides on several block devices, if any one of them fails you will lose all data (unless you've configured some redundancy).
Offline
I know your topic is already solved but I hate the fstab syntax. I tried adding some other drives to it and it destroyed my system, I had to chroot into it and remove those drives from the file. I don't know why it happened, but now i just use the arch-install-scripts package and use the genfstab command after I have the drives mounted, to avoid that happening again.
Offline