1 |
On Wednesday, 4 March 2020 09:24:31 GMT n952162 wrote: |
2 |
> On 2020-03-04 10:10, Michael wrote: |
3 |
> > On Wednesday, 4 March 2020 08:09:45 GMT n952162 wrote: |
4 |
> >> Hi, |
5 |
> >> |
6 |
> >> I have 3 swap devices and files. At boot, it seems indeterminate which |
7 |
> >> ones get "mounted" (as swap areas). |
8 |
> >> |
9 |
> >> Does anyone have an idea why they're not all mounted? |
10 |
> >> |
11 |
> >> Here are the swap lines from my fstab: |
12 |
> >> |
13 |
> >> #LABEL=swap none swap sw 0 0 |
14 |
> >> |
15 |
> >> /dev/disk/by-id/ata-TOSHIBA_DT01ACA300_xxxxxxxx-part1 none swap |
16 |
> >> |
17 |
> >> sw,pri=10 0 0 |
18 |
> >> |
19 |
> >> /swap none swap sw,pri=5 0 0 |
20 |
> >> |
21 |
> >> /lcl/WDC_WD20EFRX-68EUZN0_WD-yyyyyyyyyy/1/swap none swap |
22 |
> >> sw,pri=1 0 0 |
23 |
> > |
24 |
> > The second entry is missing the device you intend to mount. |
25 |
> > |
26 |
> > When you list the first and third devices do you see anything wrong with |
27 |
> > them? |
28 |
> > |
29 |
> > When you try to enable them manually with 'swapon -v' what do you get? |
30 |
> > |
31 |
> > PS. If any of these swap block devices are actually files within a fs make |
32 |
> > sure you first fill them up with dd, because files with holes in them |
33 |
> > could |
34 |
> > fail to be enabled. Also some fs (btrfs?) are not good candidates for |
35 |
> > having swap files on them, if they move data around with cow. |
36 |
> |
37 |
> The second and third entries are files, created with dd(1), from |
38 |
> /dev/zeros, as shown on the mkswap(8) man page. No word in |
39 |
> /var/log/messages for non-mounted swaps. |
40 |
|
41 |
I assume you have run something like this: |
42 |
|
43 |
dd if=/dev/zero of=/swap bs=4096 count=xxxxxxxx |
44 |
mkswap -c -f -L moreswap /swap |
45 |
swapon -v -o pri=5 /swap |
46 |
|
47 |
When you run 'swapon -v /swap' does it enable it? Is dmesg happy? |