Page 4 of 9 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 88

Thread: Time to build a server with old hardware.

  1. #31
    Join Date
    Feb 2008
    Location
    Lincolnshire
    Beans
    210
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Time to build a server with old hardware.

    Do you drink this stuff called American IPA, or is that just how they market it in the UK. Good stuff; I enjoy the extra hoppyness, but I always think American India Pale Ale must be Sioux or Appache.

    Thanks. I have a trip now but I'll get to that when I get back.

  2. #32
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,164
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Time to build a server with old hardware.

    Quote Originally Posted by Phil Binner View Post
    Do you drink this stuff called American IPA, or is that just how they market it in the UK. Good stuff; I enjoy the extra hoppyness, but I always think American India Pale Ale must be Sioux or Appache.

    Thanks. I have a trip now but I'll get to that when I get back.
    OT:

    We just call it "IPA" - not my favorite. I prefer Bochs, because that is what we drank at University.
    https://www.shiner.com/beer/bock

    Never heard of "American India Pale Ale". Looked it up. I'm not much of a drinker - perhaps 4 beers in a month. Right now, there's some Blue Moon wheat in the fridge. I haven't been to a liquor store in over a year, so getting anything that isn't mass marketed is impossible. Grocery stores here tend to have lots of bad American beers because the majority of Americans think Miller or Bud (American) are fine beers. ;( They've not been to the Czech Republic for the real Budweiser which isn't bad, just not my choice if I'm picking.

    Oddly, my LUG (Linux Users Group), is called "ALE" - ale.org. A few of the members are brewers. There are long discussions about brewing at some meetings plus post-meeting happens at a local (local to the meeting location) pub. My sub-group in the LUG has been meeting 100% virtual since March, but the other groups have gone back to physical meetings.

  3. #33
    Join Date
    Feb 2008
    Location
    Lincolnshire
    Beans
    210
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Time to build a server with old hardware.

    Interesting you call a pub a pub. We call them pubs, but most American films call them bars. We also have bars, but they are not the same as pubs. Not sure if I could actually describe the difference. You certainly wouldn't get a bar in a village, so I suppose that's one difference. Plus a bar is altogether more trendy.

    I suspected American IPA was a British marketing term. Now I know.

    Anyway, back to work. I have formatted the new disk as Ext4, so lets see what happens now.

  4. #34
    Join Date
    Feb 2008
    Location
    Lincolnshire
    Beans
    210
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Time to build a server with old hardware.

    Formatting the hard drive as FAT does not seem to have been the problem. Unfortunately a couple of other things have gone wrong also, so I have had to go back to the start. So far I have:

    Loaded XUbuntu 18.04 onto an I5 desktop machine. This machine is called Bigbin-XUbuntu.
    Installed a hard drive and formatted it as Ext4 named Vol10
    in a terminal, run the command sudo apt install samba nfs-kernal-server
    Loaded Ubuntu 18.04 onto an I5 laptop. This machine is called firstmedion
    In Bigbin-XUbuntu, edited /etc/exports to add the line /Vol10 firstmedion(rw,async,root_squash)
    Logged onto the router to find that the IP address of Bigbin-Xubuntu is 192.168.1.168. Make that address fixed.
    In a terminal run the command sudo systemctl start nfs-kernel-server
    In firstmedion, edit /etc/fstab to add the line /Vol10 192.168.1.168/24(rw,async,root_squash)
    re-boot firstmedion

    firstmedion will not reboot properly. The first two lines of the error screen reads:

    /dev/sda2: clean, 179554/15597568 files, 3308911/62383360 blocks
    emergency mode.

    Entering my password gets to the command prompt, but I am not able to edit /etc/fstab to comment out the line I added.

    Interestingly, when I ran the command sudo systemctl start nfs-kernel-server in Bigbin-Xubuntu nothing happened. It just went back to the command prompt.

  5. #35
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,164
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Time to build a server with old hardware.

    Quote Originally Posted by Phil Binner View Post
    Interesting you call a pub a pub. We call them pubs, but most American films call them bars. We also have bars, but they are not the same as pubs. Not sure if I could actually describe the difference. You certainly wouldn't get a bar in a village, so I suppose that's one difference. Plus a bar is altogether more trendy.

    I suspected American IPA was a British marketing term. Now I know.

    Anyway, back to work. I have formatted the new disk as Ext4, so lets see what happens now.
    OT: A pub is more low-key, laid back, where families can come. Bars usually don't allow anyone under 21 inside, have loud music constantly. Every state has different laws, but I think allowing kids inside would be the main legal difference. Pubs would have a food menu, but still feature alcohol much more than a restaurant with a liquor license.

    Some of this is my best guess/opinion based on living in 12 states and going inside many bars and pubs. Important research, as you can understand. People from different parts of the country will probably have different ideas.

    We also have Sports Bars with 20-50 TVs with almost every conceivable sport playing.

    Because I live way outside any town, pubs and bars aren't really convenient even without COVID.

    ext4 will make lots of things easier for Linux - and faster.

  6. #36
    Join Date
    Feb 2008
    Location
    Lincolnshire
    Beans
    210
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Time to build a server with old hardware.

    I have ext4. The client still won't boot.

    The thing that stops the client booting is the line

    /Vol10 192.168.1.168(rw,async,root_squash) in fstab. I have loaded Ubuntu twice now, and it initially boots OK, then fails to boot when that line is added.

  7. #37
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,164
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Time to build a server with old hardware.

    Ok ... let me pass on 20+ yrs of a Unix admin knowledge, much of it not specific to getting NFS working, but to help avoid issues later.

    Quote Originally Posted by Phil Binner View Post
    Formatting the hard drive as FAT does not seem to have been the problem. Unfortunately a couple of other things have gone wrong also, so I have had to go back to the start. So far I have:
    FAT is always to be avoided, unless there isn't any other choice. Don't use non-Linux file systems with Linux/Unix services. Sometimes there are ways to make things work, but often basic things do not. This is mainly because Unix expects Unix permissions, owners, groups, ACLs, and xattrs to be supported. Avoid NTFS too, for the same reason. Also, both of those are 30% slower than the Unix file systems for a number of reasons.

    Quote Originally Posted by Phil Binner View Post
    Loaded XUbuntu 18.04 onto an I5 desktop machine. This machine is called Bigbin-XUbuntu.
    Do not use mixed case in hostname. bigbin-xubuntu would be fine. Sure, it should work and it might most of the time, but every script, written by every programmer, on every team has to take extra steps to ensure comparisons work correctly. hostnames and DNS names are all supposed to be case-insensitive, but there isn't any way to enforce Joey - programmer just learning php - to do that. Avoid this issue.

    Quote Originally Posted by Phil Binner View Post
    Installed a hard drive and formatted it as Ext4 named Vol10
    "names" are unclear. What exactly do you mean? Also, file systems shouldn't be put directly onto hard drives. There should be a partition table, then a partition created, then a file system, ext4, would be placed onto that partition. Never put a file system directly onto a non-partitioned drive. BTW, the tools will allow this, but it is a really, really, really, really, bad idea. People tend to do it when they are setting up RAID systems. There are reasons never to do it for RAID configs too. Always partition HDDs. Always.
    Multiple partitions are possible. So, the partition can have a "LABEL" - is that what you mean by "name"? It matters if the LABEL is used in the mounting configuration or not. For ext4, internal storage, we usually would use the UUID for the partition in the mount, but if you are careful to always have a unique LABEL, that can be used instead. If you didn't LABEL it during the format creation, I think you can add a label later. I'd use gparted for that. For simple storage setups, gparted is my go-to tool. Unfortunately, it doesn't support more advanced storage management, just simple partitioning, simple formatting, simple labels and partition bits.

    Quote Originally Posted by Phil Binner View Post
    in a terminal, run the command sudo apt install samba nfs-kernal-server
    I'd have to check if that was sufficient. The link above from Sensei has the commands to run. You can also check the Ubuntu Server Guide for the distro/release you are running. There will be a how-to for samba and a how-to for NFS in the Ubuntu Server Guide. Server stuff is in the Server guide. Desktop stuff is in the Desktop Guide.

    Quote Originally Posted by Phil Binner View Post
    Loaded Ubuntu 18.04 onto an I5 laptop. This machine is called firstmedion
    Why using 18.04? If you don't have a specific reason, today it is probably best to start with 20.04. Both have 5 yr support periods, but 18.04 has already used 2 yrs of that 5. I like to avoid having to reinstall a fresh OS every few years. 4-5 yrs is long enough to get good use from an install, but not so long as to make me afraid to migrate to newer. For me, it is about avoiding hassles for as long as possible. My NFS and Plex server runs 16.04. When I move it to the next release in the next few months, it will be 20.04, probably.

    Quote Originally Posted by Phil Binner View Post
    In Bigbin-XUbuntu, edited /etc/exports to add the line /Vol10 firstmedion(rw,async,root_squash)
    Ok, but you didn't mount /Vol10 in bigbin-xubuntu's fstab. Can't export storage that isn't mounted on the NFS server.

    Mount the partition using the fstab on bigbin-xubuntu. Look at the existing fstab lines. You need something like that, but with slight changes. The UUID will be different. Use blkid to find the correct UUID. The last number on the line needs to be a 1 for non-OS, internal storage. This tells it to run the fsck from time to time during boot. I think the default is every 30 or 60 days, but I don't recall exactly. The file system configuration controls how often. That is something for another day.
    After the fstab is done, use sudo mount -a to mount it. That looks through the fstab and if there are any new lines for storage that hasn't been already mounted, it mounts each.
    Search for "ubuntu fstab" for a how-to guide. On bigbin-xubuntu, mounting Vol10 on to /Vol10 is just like mounting any other local storage.

    Quote Originally Posted by Phil Binner View Post
    Logged onto the router to find that the IP address of Bigbin-Xubuntu is 192.168.1.168. Make that address fixed.
    DHCP has a range of addresses in your router. Static IPs need to be outside that range. Fix that. I use .1 - .100 for LAN static IPs. I use .101 - .200 for VPN IPs and I use .201-.250 for DHCP guests. All my portable devices use DHCP, but with DHCP reservations so they effectively get static IPs .... in the .1-.100 range. My LAN DNS server knows about these systems, by-name.

    Quote Originally Posted by Phil Binner View Post
    In a terminal run the command sudo systemctl start nfs-kernel-server
    But you haven't mounted the storage to be shared? edit the fstab, run sudo mount -a to mount it.
    After you start the nfs daemon, you need to tell it to read the modified exports file - sudo exportfs -a.

    Quote Originally Posted by Phil Binner View Post
    In firstmedion, edit /etc/fstab to add the line /Vol10 192.168.1.168/24(rw,async,root_squash)
    re-boot firstmedion
    That isn't a correct fstab entry.

    On first glance, it looks like an exports file line. You are getting confused between the fstab and exports. They are very different.

    192.168.1.168/24 is probably incorrect even in an exports file. You if you want to export to the entire subnet, use
    192.168.1.0/24. But this doesn't go into the fstab! It won't work there.

    When you look at the existing fstab lines, yours needs to look like that both on the NFS server and on the NFS client.
    On the NFS server, the new ext4 partition needs to be mounted just like the other ext4 partitions inside there.
    On the NFS client, the new NFS needs to point to the NFS server (by name or IP) with the exported directory name and the 'type' column needs to say 'nfs'. This is normal for client/server architecture.

    • /etc/fstab is how storage (local and nfs and cifs and ... lots of other types) is mounted to the local machine.
    • /etc/exports is read by the nfs-server to know which available storage to be shared via NFS to the machines listed.


    The format of the nfs-client machine /etc/fstab is this:
    Code:
    example.hostname.com:/srv /opt/example nfs timeo=14,proto=tcp,intr,rw,async
    So you should use something like this:
    Code:
    bigbin-xubuntu:/Vol10  /Vol10  nfs timeo=14,proto=tcp,intr,rw,async
    The /Vol10 directory must pre-exist. This is called a "Mount Point", but it is really just an empty directory for a storage device (local or remote) to be hooked into some other, existing, file system, that is already mounted.
    I use /d/D1 and /d/D2 and /d/D3 for my storage stuff. Because I use enterprise-LVM to manage storage, I don't want to post the 'df' output since that can be confusing since it uses different device names.

    Quote Originally Posted by Phil Binner View Post
    firstmedion will not reboot properly. The first two lines of the error screen reads:

    /dev/sda2: clean, 179554/15597568 files, 3308911/62383360 blocks
    emergency mode.

    Entering my password gets to the command prompt, but I am not able to edit /etc/fstab to comment out the line I added.
    Of course they won't. The NFS server was told to share storage that hasn't been mounted.
    As for the command prompt, I bet it is a trivial thing that you aren't seeing.
    A prompt with a '$' means that is a normal userid.
    A prompt with a '#' means that is a root prompt.
    Code:
    tf@regulus:/etc$
    • tf is my username.
    • regulus is the hostname.
    • /etc is the current working directory. This is exactly like on Windows.
    • $ says - I'm not root.

    It turns out that prompt is exactly the information that scp, rsync, sftp need for transferring files TO/FROM systems. It is brilliant that I can select it into a command with 1 left dbl-mouse click, then paste it using a center mouse click in any window I have open. Freakin' amazing.

    Anyway, I don't have enough information to provide the correct fstab line for either machine. Run blkid on the machine with the new partition (formatted to ext4) and then we can do the fstab. BTW, your system has reference manuals on it about all this stuff in the form of manpages. man fstab and man exports.

    Quote Originally Posted by Phil Binner View Post
    Interestingly, when I ran the command sudo systemctl start nfs-kernel-server in Bigbin-Xubuntu nothing happened. It just went back to the command prompt.
    Unix has a philosophy - if it did what you asked, don't return anything. Be silent on success. However, complain loudly on failure.

    I fear we/you have made this 100x harder than it needed to be.

    BTW, usernames should be all lower-case too for the same reason as hostnames should be all lower-case plus there are historical reasons from back when Unix terminals didn't support lower-case at all. Doing things a certain way to avoid future problems is one of those things Unix admins learn over years of practice.

    And 1 more experience thing - never edit a config file and remove the last empty line. Always have 1 empty line at the bottom of every config file. This is another historical thing. An end-of-line character isn't the same as an end-of-file character. Some programmers use the EoL to know that a record has been read. If they get to an EoF instead, then that last record/setting won't be seen. Again, Joey may not have been told this and his personal habit is to always leave 1 or more empty lines at the bottom of files, so it never impacts him. There is still some code that was written in 1970 being used on Unix systems today, so this issue still comes up from time to time. fstab? exports? Got an extra line at the end?

    Unix admins have always been expected to be power-users of the OS as a minimal entry point. This makes is hard for people forced to learn everything at once.

    Hope I didn't ramble too much.

  8. #38
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,495
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Time to build a server with old hardware.

    Quote Originally Posted by Phil Binner View Post
    The thing that stops the client booting is the line

    /Vol10 192.168.1.168(rw,async,root_squash) in fstab. I have loaded Ubuntu twice now, and it initially boots OK, then fails to boot when that line is added.
    As TheFu says, you're mixing up the entries in the file /etc/exports on the server (which look like the line above), and the entries in /etc/fstab which have a different syntax.

    I always use no_root_squash which lets me mount the exported shares to directories owned by root. Then I let the ordinary authentication systems on the client determine access to the exported shares. In this model, both the server and clients have to have the same user and group IDs in /etc/passwd. In my example above, if I create a mount point as root, then mount the share to it, each user can access his or her directory on the server as long as the IDs match.

    To see what might be going wrong, mount the remote NFS filesystem manually with the "mount" command and use the "-v" switch to get verbose results.

    Code:
    sudo mount -v server:/share /mnt/point
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  9. #39
    Join Date
    Feb 2008
    Location
    Lincolnshire
    Beans
    210
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Time to build a server with old hardware.

    Thank you. I'm aware this must be difficult for you, talking to someone who knows absolutely nothing. A lot of problems for people like me arise from philosophy and arcane language. By philosophy I mean the set of ideas a particular system is based on. Once you understand them it's difficult to imagine that someone else doesn't. And as to arcane language, by that I mean that when someone is familiar with the language of their specialty it is easy to forget that in their subset of language words tend to take on additional meaning that they do not necessarily have outside. And documentation can be very difficult to read, because when people are about to write documentation they tend to ask themselves "what would I like to find here?", rather than "who is going to read this and what would they like to find here?".

    That last post is incredibly useful. Some of it I understand, and some I don't. Ill go through it again and address things one at a time as they have been presented.

    First thing - FAT. I used FAT because I format disks using the Gnome Disk utility. It says NTFS is for Windows, Ext4 is for Linux, and FAT is for any system. Because this server needs to be available for Windows and Linux machines I used FAT. I was thinking about Windows machines reading it directly, as if it was a removable hard drive that can be connected to either system. Obviously that is not the case. It will be permanently mounted inside an Ubuntu server. I will not make that mistake again.

    Second, I loaded XUbuntu 18.04 onto an I5 desktop machine. This machine is called Bigbin-Xubuntu. Is there any way to change that name without re-installing. I’d like to get the little problems out of the way, so if I have to re-install I will. This is all in the sandbox.

    Third, I formatted the hard drive as Ext4. What I actually did was to use the Gnome Disks utility to remove all partitions from the hard drive then add a new partition. I called that partition Vol10 and said the format was Ext4. I did not do an aggressive format. This disk was originally a boot disk in a windows system, so the partition table would have been created by the windows installer. Should I have been more fundamental.

    Fourth, I got the command “sudo apt install samba nfs-kernal-server” from SeijiSensei’s post. I will have to address samba later, but for now I just want to get NFS working. Would I be best with just “sudo apt install nfs-kernal-server”.

    Fifth, I loaded Ubuntu 18.04 onto the client. The client is essentially temporary, but in it’s temporary use it may require access to the D-Link NAS, which is SMB1. I don’t want to have to configure Samba for this purpose. I’ll address that problem later.

    Sixth, I think I am now getting to where the real problem is. I have looked up the mount command and it’s clear I need to understand lots more things before I understand that. Also, the command seems to be different in fstab than at the command prompt. On the other hand, if I double click the Vol10 icon on the desktop it get’s mounted, without asking for anything else. Do I need anything more than “/Vol10” in fstab.

    I think that’s the next problem I have to solve, so for now I’m going to leave it at that. Think I can see why the client machine was refusing to beet, however, so I may not be too far away.

    Thanks again. I do hope you’re not getting too frustrated.

    Have a good day.

  10. #40
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,164
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Time to build a server with old hardware.

    Quote Originally Posted by Phil Binner View Post
    That last post is incredibly useful. Some of it I understand, and some I don't. Ill go through it again and address things one at a time as they have been presented.

    First thing - FAT.
    You've got the understanding for FAT. File systems are all about where they will physically be connected. Maybe want to skip using Gnome-Disks. That program has a fairly dumb interface in the Gnone team attempt to over-simplify stuff. It has bugs and lies.

    Quote Originally Posted by Phil Binner View Post
    Second, I loaded XUbuntu 18.04 onto an I5 desktop machine. This machine is called Bigbin-Xubuntu. Is there any way to change that name without re-installing. I’d like to get the little problems out of the way, so if I have to re-install I will. This is all in the sandbox.
    Yes, changing the hostname isn't hard - basically 3 things ... plus any were you've pointed to the hostname in config files and from other systems. Again, in theory, case shouldn't matter ... until it does.

    Make your life easier now by using all lower-case everywhere. Most things on Unix are case sensitive - files, directories, programs, options for programs ... but hostnames and FQDN shouldn't matter.

    Quote Originally Posted by Phil Binner View Post
    Third, I formatted the hard drive as Ext4. What I actually did was to use the Gnome Disks utility to remove all partitions from the hard drive then add a new partition. I called that partition Vol10 and said the format was Ext4. I did not do an aggressive format. This disk was originally a boot disk in a windows system, so the partition table would have been created by the windows installer. Should I have been more fundamental.
    That should be fine.

    Quote Originally Posted by Phil Binner View Post
    Fourth, I got the command “sudo apt install samba nfs-kernal-server” from SeijiSensei’s post. I will have to address samba later, but for now I just want to get NFS working. Would I be best with just “sudo apt install nfs-kernal-server”.
    Installing 1, 5, 50 things on the same sudo apt install .... command is fine, assuming the system has been maintained. A link for later: https://blog.jdpfu.com/2011/06/24/sy...-for-linux-pcs

    Quote Originally Posted by Phil Binner View Post
    Fifth, I loaded Ubuntu 18.04 onto the client. The client is essentially temporary, but in it’s temporary use it may require access to the D-Link NAS, which is SMB1. I don’t want to have to configure Samba for this purpose. I’ll address that problem later.
    Not an issue, provided you understood the remaining support period. Accessing SMB1 shares will need some non-default settings. Look through Morbius1's posts here for that. Every time I think I understand, there's a new-to-me caveat, so I've decided it is best to avoid helping with Samba connections. I've only been using samba since around 1995 and only had an issue this last summer that took a few weeks to figure out. Never had issues before, but I don't have any SMB1 stuff.

    Quote Originally Posted by Phil Binner View Post
    Sixth, I think I am now getting to where the real problem is. I have looked up the mount command and it’s clear I need to understand lots more things before I understand that. Also, the command seems to be different in fstab than at the command prompt. On the other hand, if I double click the Vol10 icon on the desktop it get’s mounted, without asking for anything else. Do I need anything more than “/Vol10” in fstab.
    Yes. You must specify the "device". That is either using the UUID or the LABEL or directly using the device file (this last one is dangerous, since device files move around).
    To get the UUID, run blkid command and trace the storage you call "/Vol10" back to a UUID. That should be used in the 1 fstab line on the server system. 1 line is all that is needed in each computer fstab.

    Quote Originally Posted by Phil Binner View Post
    I think that’s the next problem I have to solve, so for now I’m going to leave it at that. Think I can see why the client machine was refusing to beet, however, so I may not be too far away.
    "beet?"
    You've never been more than 10 lines total away. 3 in config files (server fstab, server experts, client fstab) and perhaps 5-7 commands to be run between the two systems.

    Quote Originally Posted by Phil Binner View Post
    Thanks again. I do hope you’re not getting too frustrated.

    Have a good day.
    One more "mentoring" tidbit. When you edit system files, the safest way for almost all of them is to use sudoedit /etc/fstab. There are a few exceptions, like to modify the sudoers and the passwd file - those both have special commands just for each which do some extra validation and attempt to prevent bogus configurations in those specific files. sudoedit supports using any editor you like. That is controlled by the EDITOR environment variable. Save this for later too.

Page 4 of 9 FirstFirst ... 23456 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •