Change mounted partition

Hi, I actually posted this in the technical assistance, but now think it is perhaps better suited here. I shifted to Manjaro (KDE) a few days ago and used architect for the installation. I made three partitions before (boot, root and a separate one that i called data), which during the installation I mounted, but it turns out I cannot write to the latter. I have since been looking into mounting a data partition, and now think the approach described in [wiki] HowTo - Permanent mount for partition was actually what I should have don/what I intended.

So I want to change my partition currently mounted as /data, but I have not been able to figure out whether I only have to change fstab (and how) or perhaps also the grub as /data was mounted during the installation with architect. Alternatively, the partition is actually still empty, so it could also easily be removed if that is a more straightforward approach.

some additional information:


~ >>> sudo parted -l                                                                                                                                                                                                                        
Model: ATA SAMSUNG MZYLF128 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  538MB   537MB   fat32              boot, esp
 2      538MB   32.8GB  32.2GB  ext4
 3      32.8GB  128GB   95.3GB  ext4


~ >>>     

~ >>> cat /etc/fstab                                                                                                                                                                                                                        
# /dev/sda2
UUID=22312046-fb10-46fa-920d-214696b1919c       /               ext4            rw,noatime,data=ordered 0 0

# /dev/sda3
UUID=a63d705a-bb97-4268-8cea-3ab20b8fb2e1       /data           ext4            rw,noatime,data=ordered 0 0

# /dev/sda1
UUID=BB7E-0FBE          /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 0

~ >>>

Personally i prefer to NOT use fstab for any DATA partitions to mount. If you are in KDE and want that partition to mount automatically, then you can trough System Settings > Removable Storage > Removable Devices and enable the automatic mounting and select that partition to mount at login ...

Right click inside it once is mounted -> Root Actions > Ownership to Active user

/dev/sda1 should be mounted with the noatime option I believe. I do not think you are supposed to mix the noatime and relatime options. It should be one or the other.

That could be reasoned for a removable drive-partition. For internal drives it sounds better IMHO.

1 Like

Sometimes i swap internal HDD's between my machines, also i prefer that some of them to not be mounted at boot, but rather when i need. "Better" is just a personal preference, there is no advantage one over the other in terms of performance. :slight_smile:

1 Like

/data
is not a valid mount point
you have to mount the partition to
/mnt
all partitions which are to be mounted are mounted in this location only
you can mount the partition in any directory in /mnt
but make sure you have created a directory in /mnt

eg

sudo mkdir /mnt/data

then you can have /mnt/data as mount point

Wow, that's fun! I take it that this is not a usual case...

This can be accomplished with fstab flags. Using fstab for removable drives, helps keeping the same naming/mount point.

1 Like

4 or 5 times per week ... depends what i have to work and from where i need the information quickly.

I didn't said is not possible, nor that in some situations might be useful ... Sometimes i need a running system and there is no other HDD attached than the one i have the system installed.

it will be a safe option if you use uuid for designating your partitions not labels eg /dev/sda1 in fstab.

What if you fix all your drives partitions in all systems fstab, with noauto flafs for non-system ones? If they are not present, there is no problem.

And what is unsafe without adding it to fstab at all ? :slight_smile:

Let's not transform this topic in a dedicated one on how to "fix" a problem i don't have. The OP might get confused. I did get your points and arguments, and i have nothing against them, but i will not add more personal reasons why i don't make use of fstab for DATA/STORAGE/WORK/MEDIA HDD's on my systems. Hope you don't mind! :wink:

1 Like

That is a religous statement.

Any structure you choose locally is a valid mount point.

The link OP reference contains a discussion on the very issue.

Please have a look at it.

1 Like

then i think he dont have a directory named data in root partition which he set as mount point

But in this Case, why not move your home directoy to that different partition in the first place?


If you dont have write permissions, you can just give them by

chmod $USER:$USER "/path/to/dir"

BTW, I'm using /home/share as mountpoint for my data partition, with /home/share/fabi as folder for myself, and only read/writable by myself (because many users on this computer).

Whoa, this got a lot more response than I had anticipated. It seems there are also a lot of preferences, which make sense depending on the way people intend to use their system. I suppose my thought about the seperate data partition was to have my main projects/important files separate from the OS, as I tend to reset/ change it every now and then. Not sure yet what is the 'correct' approach so I have some stuff to think about :slight_smile:

I am still wondering how architect mounted my /data though, i.e. if I decide to change, how to remove/unmount correctly.

I use a different folder hence the guide to make it.

The easiest way to move from a mount in /data is to create an empty folder some convenient place - I usually use my home folder.

When you have created that folder you edit your /etc/fstab and replace /data with your new location. Save the file and reboot or do sudo mount -a

Remember full path e.g. /home/username/Data

It does not - Architect only mounts what you specify - so you have done it by specifying that partition to be mounted at /data

Thanks correct, in architect I mounted /data myself during step 1.6 - just was a bit unsure how it did that did exactly.

I think I managed to work it all out now. Thanks to all for your help, it's much appreciated. I think I made a good choice with manjaro :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by