08-27-2019
An additional note:
Under Linux there are SELinux and AppArmor around. They take care that services have only read/write/execute permissions which they need(predefined via config).
I do not know if they are armed at CentOS.
But if they are, file permissions are restricted to the configured mysql data location and one will get permission errors if moving the data directory without changing SELinux/AppArmor configuration as well.
---
What's regarding partition separation: I prefer all on the root-partition - as opposed to many recommendations especially from traditional unix administration point of view. My reason: It is simpler. I'm monitoring filespace, so it won't go undetected if the machines run low on space. I have a lot not so big machines. In another environment I might prefer seperated partitions.
What I recommend is to always use LVM. It's very flexible and you can move around filesystems to different disks online and can increase fs size online.
But to see the fact partition separation would have saved you in this case.
Last edited by stomp; 08-27-2019 at 02:04 PM..
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
hi,
I have a SCO unix server which has a 36gb hard drive, but the IT company who supplied it assigned 1gb to /dev/root, 15mb to /dev/boot and 33gb to /dev/u.
The /dev/root partition is now full, is there a way I can use the 33gb assigned to /dev/u without loosing any data, preferably... (2 Replies)
Discussion started by: Martyn
2 Replies
2. Shell Programming and Scripting
can we come to know all the command ran bya user for last 1 day (1 Reply)
Discussion started by: narang.mohit
1 Replies
3. UNIX for Dummies Questions & Answers
I have a disk space issue on one of my unix servers.
it is showing 98% full.. i found the offending folder and removed it. but i have not reclaimed the disk space.
is there another command that i need ?
thank you in advance for any assistance. (4 Replies)
Discussion started by: JanSP
4 Replies
4. Shell Programming and Scripting
Recently I was on an operational call and heard the people running my code placing the code in the /tmp directory and running as root. I had not planned on that. So I want to add some checks to my code (using ksh93):
# ---------- ---------- ----------
# root not allowed to run this
#... (3 Replies)
Discussion started by: ericdp63
3 Replies
5. Shell Programming and Scripting
Hi, I have written a script and placed in an application and the script can be executed manually only. But somehow one of the method in the script is being called and bringing the application down. But we are not able to find any instance of script running.
Is there a way to findout whether the... (1 Reply)
Discussion started by: Satyak
1 Replies
6. Linux
Hi,
i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :-
1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024
1057 ls -l /root/myswapfile
1058 chmod 600 /root/myswapfile
1059 mkswap /root/myswapfile
1060 swapon /root/myswapfile
... (1 Reply)
Discussion started by: apm
1 Replies
7. Red Hat
Hi. My "/usr" folder is running out of space. My "/home" folder is quite large and has a lot of free space. As follows:
Filesystem Type Size Used Avail Use% Mounted on
...
/dev/sda5 ext3 9.7G 2.6G 6.7G 28% /
/dev/sda7 ext3 152G 16G 128G 11% /home
/dev/sda3 ... (7 Replies)
Discussion started by: pkiula
7 Replies
8. Red Hat
Dear Linux Experts,
On my windows 7 desktop with the help of Vmware workstation (Version 7.1),
created virtual machine and installed Centos 5.7 successfully using ISO image.
Query : Is this possible to upgrade the Centos 5.7 using Centos 5.8 ISO image to Centos version 5.8?.. if yes kindly... (2 Replies)
Discussion started by: Ananthcn
2 Replies
9. AIX
Hello
I recently received a request to reclaim hard disks and IP addresses within an AIX system(s). THe file systems are no longer in use and the client has indicated that it is OK to remove them and reclaim the disks and release the IP's. Now, since the file systems belong to a Volume group I... (8 Replies)
Discussion started by: Joseph Sabo
8 Replies
10. UNIX for Beginners Questions & Answers
Hello,
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sda 8:0 0 38.2G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 ... (2 Replies)
Discussion started by: centosadmin
2 Replies
LEARN ABOUT X11R4
fmthard
fmthard(1M) fmthard(1M)
NAME
fmthard - populate label on hard disks
SYNOPSIS
SPARC
fmthard -d data | -n volume_name | -s datafile [-i] /dev/rdsk/c? [t?] d?s2
fmthard -d data | -n volume_name | -s datafile [-i] /dev/rdsk/c? [t?] d?s2
The fmthard command updates the VTOC (Volume Table of Contents) on hard disks and, on systems, adds boot information to the Solaris fdisk
partition. One or more of the options -s datafile, -d data, or -n volume_name must be used to request modifications to the disk label. To
print disk label contents, see prtvtoc(1M). The /dev/rdsk/c?[t?]d?s2 file must be the character special file of the device where the new
label is to be installed. On systems, fdisk(1M) must be run on the drive before fmthard.
If you are using an system, note that the term ``partition'' in this page refers to slices within the fdisk partition on machines. Do
not confuse the partitions created by fmthard with the partitions created by fdisk.
The following options are supported:
-d data The data argument of this option is a string representing the information for a particular partition in the current
VTOC. The string must be of the format part:tag:flag:start:size where part is the partition number, tag is the ID
TAG of the partition, flag is the set of permission flags, start is the starting sector number of the partition,
and size is the number of sectors in the partition. See the description of the datafile below for more information
on these fields.
-i This option allows the command to create the desired VTOC table, but prints the information to standard output
instead of modifying the VTOC on the disk.
-n volume_name This option is used to give the disk a volume_name up to 8 characters long.
-s datafile This option is used to populate the VTOC according to a datafile created by the user. If the datafile is "-",
fmthard reads from standard input. The datafile format is described below. This option causes all of the disk par-
tition timestamp fields to be set to zero.
Every VTOC generated by fmthard will also have partition 2, by convention, that corresponds to the whole disk. If
the input in datafile does not specify an entry for partition 2, a default partition 2 entry will be created auto-
matically in VTOC with the tag V_BACKUP and size equal to the full size of the disk.
The datafile contains one specification line for each partition, starting with partition 0. Each line is delimited
by a new-line character (
). If the first character of a line is an asterisk (*), the line is treated as a com-
ment. Each line is composed of entries that are position-dependent, separated by "white space" and having the fol-
lowing format:
partition tag flag starting_sector size_in_sectors
where the entries have the following values:
partition The partition number. Currently, for Solaris SPARC, a disk can have up to 8 partitions, 0-7. Even
though the partition field has 4 bits, only 3 bits are currently used. For , all 4 bits are used to
allow slices 0-15. Each Solaris fdisk partition can have up to 16 slices.
tag The partition tag: a decimal number. The following are reserved codes: 0 (V_UNASSIGNED), 1
(V_BOOT), 2 (V_ROOT), 3 (V_SWAP), 4 (V_USR), 5 (V_BACKUP), 6 (V_STAND), 7 (V_VAR), and 8 (V_HOME).
flag The flag allows a partition to be flagged as unmountable or read only, the masks being: V_UNMNT
0x01, and V_RONLY 0x10. For mountable partitions use 0x00.
starting_sector The sector number (decimal) on which the partition starts.
size_in_sectors The number (decimal) of sectors occupied by the partition.
You can save the output of a prtvtoc command to a file, edit the file, and use it as the datafile argument to the
-s option.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
uname(1), format(1M), prtvtoc(1M), attributes(5)
Only
fdisk(1M), installgrub(1M)
Special care should be exercised when overwriting an existing VTOC, as incorrect entries could result in current data being inaccessible.
As a precaution, save the old VTOC.
For disks under one terabyte, fmthard cannot write a VTOC on an unlabeled disk. Use format(1M) for this purpose.
11 Apr 2005 fmthard(1M)