I’m a bit confused about the mounting part. Please see the screenshot. Am I entering the commands right? Also, I have some files on the Usb drive that I would have to copy to the $HOME/eth2deposit-cli/validator_keys according to the guide. How would I mount the usb to the server?
On Jan 13, 2021, at 1:32 PM, Rich Freeman <r-plug@thefreemanclan.net> wrote:
On Wed, Jan 13, 2021 at 1:08 PM H Mottaleb <h_mottaleb@yahoo.com> wrote:
I re-configured to Raid 5+1 hot spare.
Below are the screenshots:
Excellent!Notice the output of vgs - it says you have 3.44t of free space. Thatis space that is allocated to the volume group (which gathers datafrom multiple drives into a single usable space, though right now youonly have one "physical drive" which is what your RAID card isexposing to the OS).That is, /dev/sda3 is a partition on /dev/sda which is your RAIDlogical drive. That partition is a physical volume in the ubuntu-vgvolume group.Ubuntu has created a 200gb logical volume called ubuntu-lv inside theubuntu-vg volume group, and that is mounted as your root.Suppose you want to allocate 1TiB for now for geth. You could dosomething like this:lvcreate --name geth --size 1T ubuntu-vgThen if you run lvs you'll see another line called geth that is 1TiB(I think it uses TiB but it calls them "t" - gotta love CS majors).Then you can format it with:mkfs.ext4 /dev/ubuntu-vg/geth(I normally stick -O dir_index,sparse_super in there but I suspectthose are defaults these days.)Then you can mount that:mkdir /var/lib/goethereumecho "/dev/ubuntu-vg/geth /var/lib/goethereum ext4 noatime,noexec 0 0"/etc/fstab
mount /var/lib/goethereumThen if you run df you should see the new mountpoint with 1TiB ofspace on /var/lib/goethereum.I did most of that off the top of my head - if you get an error juststop as it is easy to fix - none of those commands should do anythingbad if there is a problem.If it is all working you can just follow that guide you linked. Setany permissions on /var/lib/goethereum after it is mounted - thepermissions get overridden after mounting it and are stored on the newfilesystem. With that config it should auto-mount on boot andpreserve whatever permissions you set up.You will still have 2+TiB of space free. You can use that later asneeded. You can also expand the space available on/var/lib/goethereum at any time with two commands. Shrinking it isalso possible but slower (and I'm not sure if it can be mounted whilethat is in progress). Expanding can actually be done while geth isrunning.This is all just LVM-101. You seem relatively new to Linux so thatmight not be the first topic you'll want to study, but it is a VERYuseful topic to understand. Some of the newer filesystems(zfs/ceph/btrfs) are replacing it in some uses, but it is a bestpractice to use it unless you have something better instead.-- Rich
|