Permanently mount xfs formatted drive

I have a hard drive that was in a NAS that died ( the NAS, not the hard drive). It’s formatted XFS. I could just reformat it, but it has quite a few movies that I’d like to save. I tried (unsucessfully) to edit fstab by just adding the mount point ( it’s mounted in /var/run/“user”/media/******), but that rendered my system unbootable. I can open it using Dolphin, so I know 13.1 can mount the filesystem. I tried System Partitioner, but when try to mount it there, I just get an error message saying unknown file systems can’t be mounted.
Does anyone have any experience mounting XFS formatted drives in suse 13.1?
Thanks!

When Dolphin is able to mount it for you, you can do the

mount

command to see how it is mounted. You can then use the same parameters (fs type and options) to mount it yourself with the mount and also put them in an fstab entry. Should work IMHO.

The mount point when mounting yourself should of course be different. It is created by the mount process through Dolphin for you (and does not exist when you do it yourself). And you must create one yourself (and NOT in /va/run) for the mount.

On 2013-12-30 10:06, hcvv wrote:

> The mount point when mounting yourself should of course be different. It
> is created by the mount process through Dolphin for you (and does not
> exist when you do it yourself). And you must create one yourself (and
> NOT in /va/run) for the mount.

I suggest /mnt/something.

Plus, if it is an external disk, add “nofail” option or boot will crash if disk not present.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))

O.K., thanks. Mount gives me two mount points:

  1. /dev/md127 on /run/media/thomas/f611edef-44a2-447c-8938-d181aa0c829d type xfs (rw,nosuid,nodev,relatime,attr2,inode64,noquota,uhelper=udisks2)

  2. /dev/md127 on /var/run/media/thomas/f611edef-44a2-447c-8938-d181aa0c829d type xfs (rw,nosuid,nodev,relatime,attr2,inode64,noquota)

I’m not which one to use. Actually, when I look in fstab, the drives that are mounted are by device ID like this:

/dev/disk/by-id/ata-HDS724040KLAT80_KRFA06RAGRTYXC-part4 /home ext4 acl,user_xattr 1 2

Also, I’m a little unsure what you mean by this “And you must create one yourself (and NOT in /va/run) for the mount”.

The drive is connected internally, so it should always be there (unless it fails of course). I already fschked up fstab once and spent more time than I have fixing it, so I want to get it right this time. Sorry if I seem dense, but I haven’t used linux for almost 15 years, so I’m a little rusty.
Thanks!

As said, you need a mount point (and not in /var/run). If you do have no idea where you want it, I will prescibe one of my own invention. As root:

mkdir /mnt/movies-i-almost-lost
chown tpskipper:users /mnt/movies-i-almost-lost

And then make an fstab entry:

/dev/md127    /mnt/movies-i-almost-lost    xfs   defaults    0 0

And try this (of course umount it first when it is still mounted from your trials!)

For more information: SDB:Basics of partitions, filesystems, mount points - openSUSE

And please, when you want to post computer text (like the output of the mount command and the listing of fstab) use CODE tags around it. It is the # button in the tool bar of the post editor. When applicable (and that may covermpre cases then you think) copy/paste the prompt, the command, the output and the next prompt in one sweep and paste them between the tags. That gives other a lot of information wthout the need for you to tell stories.

O.K., thanks. That worked. This is what I did:

mkdir /mnt/archive chown thomas:users /mnt/archive

Then this in fstab:

/dev/md127   /mnt/archive    xfs   defaults     0 0

Rebooted and it’s mounted. Now I just have to figure out how to give it guest access for Samba.
And thanks for the advice about proper posting technique. The mount command gave a long list of mounts that I didn’t think were relevant which is why I edited them out. I’ll make sure to do it properly in the future.

On 2013-12-30 18:46, hcvv wrote:

> And then make an fstab entry:
>
> Code:
> --------------------
> /dev/md127 /mnt/movies-i-almost-lost xfs defaults 0 0
> --------------------

Why “0 0”? :-?

I would use “1 2” or similar. Arguably, “0 2”, so that the filesystem is checked at mount (dumping
is seldom used nowdays).


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))

That can not be true. These are two commands and they should either be on different lines, or they should be seperated by a ; .

The tags are most important. And when you edit output, you should allways tell. We are NOT clairvoyant. And it is not you, but we who have to decide what is relevant. :wink:
In this case you could have done:

mount | grep md127

When you post this as asked above, everybody can see that you restricted the output and in what way.

Samba is something completey different. When you have problems there, start a new thrread.

As I have no idea about the peculiarities of this particular case and only wanted to tell the OP how the “premanent” mounting is done in general, I took defaults, etc. I take it for granted that everybody, when I (or you) offer commands/conffile lines, this will trigger hem to read e appopriate man pages (were it only because they are resonsible for what they do with their system, not the advising members here).

In this case, I do not know enough about xfs to advise an fsck or not.

On 2013-12-31 10:36, hcvv wrote:
>
> robin_listas;2612595 Wrote:

>> Why “0 0”? :-?

> As I have no idea about the peculiarities of this particular case and
> only wanted to tell the OP how the “premanent” mounting is done in
> general, I took defaults, etc. I take it for granted that everybody,
> when I (or you) offer commands/conffile lines, this will trigger hem to
> read e appopriate man pages (were it only because they are resonsible
> for what they do with their system, not the advising members here).

Ah, ok, I see.

> In this case, I do not know enough about xfs to advise an fsck or not.

Mmm. I use xfs daily. I would recommend allowing filesystem check. It is normally so fast you don’t
even notice. I have the feeling that it does the check on mounting anyway, whatever setting you
choose, except on RO media.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))